Merge pull request #1844 from thelounge/astorije/mousetrap-mod
Use cross-platform modifier shortcut for Mousetrap when possible
This commit is contained in:
commit
bf602db991
@ -37,10 +37,8 @@ Mousetrap.bind([
|
||||
});
|
||||
|
||||
Mousetrap.bind([
|
||||
"command+up",
|
||||
"command+down",
|
||||
"ctrl+up",
|
||||
"ctrl+down",
|
||||
"mod+up",
|
||||
"mod+down",
|
||||
], function(e, keys) {
|
||||
const channels = sidebar.find(".chan");
|
||||
const index = channels.index(channels.filter(".active"));
|
||||
@ -77,10 +75,7 @@ const colorsHotkeys = {
|
||||
};
|
||||
|
||||
for (const hotkey in colorsHotkeys) {
|
||||
Mousetrap.bind([
|
||||
"command+" + hotkey,
|
||||
"ctrl+" + hotkey,
|
||||
], function(e) {
|
||||
Mousetrap.bind("mod+" + hotkey, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const cursorPosStart = input.prop("selectionStart");
|
||||
|
Loading…
Reference in New Issue
Block a user