Use cross-platform modifier shortcut for Mousetrap when possible
See https://craig.is/killing/mice#api.bind.combo
This commit is contained in:
parent
ffe8f2899b
commit
cd606b8c28
@ -37,10 +37,8 @@ Mousetrap.bind([
|
|||||||
});
|
});
|
||||||
|
|
||||||
Mousetrap.bind([
|
Mousetrap.bind([
|
||||||
"command+up",
|
"mod+up",
|
||||||
"command+down",
|
"mod+down",
|
||||||
"ctrl+up",
|
|
||||||
"ctrl+down",
|
|
||||||
], function(e, keys) {
|
], function(e, keys) {
|
||||||
const channels = sidebar.find(".chan");
|
const channels = sidebar.find(".chan");
|
||||||
const index = channels.index(channels.filter(".active"));
|
const index = channels.index(channels.filter(".active"));
|
||||||
@ -77,10 +75,7 @@ const colorsHotkeys = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (const hotkey in colorsHotkeys) {
|
for (const hotkey in colorsHotkeys) {
|
||||||
Mousetrap.bind([
|
Mousetrap.bind("mod+" + hotkey, function(e) {
|
||||||
"command+" + hotkey,
|
|
||||||
"ctrl+" + hotkey,
|
|
||||||
], function(e) {
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const cursorPosStart = input.prop("selectionStart");
|
const cursorPosStart = input.prop("selectionStart");
|
||||||
|
Loading…
Reference in New Issue
Block a user