also handle NumpadEnter

This commit is contained in:
ed 2023-12-01 21:10:51 +00:00
parent 1be85bdb26
commit 5fc04152bd
3 changed files with 6 additions and 6 deletions

View file

@ -3656,7 +3656,7 @@ var fileman = (function () {
(function (a) {
f[a].inew.onkeydown = function (e) {
rn_ok(a, true);
if (e.key == 'Enter')
if (e.key.endsWith('Enter'))
return rn_apply();
};
QS('.rn_dec' + k).onclick = function (e) {
@ -3751,7 +3751,7 @@ var fileman = (function () {
if (e.key == 'Escape')
return rn_cancel();
if (e.key == 'Enter')
if (e.key.endsWith('Enter'))
return rn_apply();
};
@ -4999,7 +4999,7 @@ document.onkeydown = function (e) {
}
}
if (k == 'Enter' && ae && (ae.onclick || ae.hasAttribute('tabIndex')))
if (k.endsWith('Enter') && ae && (ae.onclick || ae.hasAttribute('tabIndex')))
return ev(e) && ae.click() || true;
if (aet && aet != 'a' && aet != 'tr' && aet != 'pre')
@ -5197,7 +5197,7 @@ document.onkeydown = function (e) {
}
function ev_search_keydown(e) {
if (e.key == 'Enter')
if (e.key.endsWith('Enter'))
do_search();
}

View file

@ -1009,7 +1009,7 @@ var set_lno = (function () {
md_home(ev.shiftKey);
return false;
}
if (!ev.shiftKey && (ev.code == "Enter" || kc == 13)) {
if (!ev.shiftKey && (ev.code.endsWith("Enter") || kc == 13)) {
return md_newline();
}
if (!ev.shiftKey && kc == 8) {

View file

@ -1566,7 +1566,7 @@ var modal = (function () {
if (k == 'Space' && ae && (ae === eok || ae === eng))
k = 'Enter';
if (k == 'Enter') {
if (k.endsWith('Enter')) {
if (ae && ae == eng)
return ng(e);