mirror of
https://github.com/9001/copyparty.git
synced 2025-10-03 09:49:29 +02:00
apparently the convention is that hotkeys should follow the letters according to the layout, and not remain in the qwerty position this breaks apart the cluster of media controls (uiojkl), but that's the intended and expected behavior so it should be fine
This commit is contained in:
parent
09e3018bf9
commit
e798a9a53a
6 changed files with 128 additions and 98 deletions
|
@ -101,10 +101,10 @@
|
|||
|
||||
function our_hotkey_handler(e) {
|
||||
// bail if either ALT, CTRL, or SHIFT is pressed
|
||||
if (e.altKey || e.shiftKey || e.isComposing || ctrl(e))
|
||||
if (anymod(e))
|
||||
return main_hotkey_handler(e); // let copyparty handle this keystroke
|
||||
|
||||
var key_name = (e.code || e.key) + '',
|
||||
var keycode = (e.key || e.code) + '',
|
||||
ae = document.activeElement,
|
||||
aet = ae && ae != document.body ? ae.nodeName.toLowerCase() : '';
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
|||
if (aet && !/^(a|button|tr|td|div|pre)$/.test(aet))
|
||||
return main_hotkey_handler(e); // let copyparty handle this keystroke
|
||||
|
||||
if (key_name == 'KeyW') {
|
||||
if (keycode == 'w' || keycode == 'KeyW') {
|
||||
// okay, this one's for us... do the thing
|
||||
action_to_perform();
|
||||
return ev(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue