fix: More browser support. #129

pull/130/head
jaywcjlove 5 years ago
parent 4cac856524
commit 054d0bb4a5

@ -245,8 +245,12 @@ function dispatch(event) {
_mods[e] = event[modifierMap[e]];
}
}
if (event.getModifierState('AltGraph')) {
/**
* https://github.com/jaywcjlove/hotkeys/pull/129
* This solves the issue in Firefox on Windows where hotkeys corresponding to special characters would not trigger.
* An example of this is ctrl+alt+m on a Swedish keyboard which is used to type μ.
*/
if (event.getModifierState && event.getModifierState('AltGraph')) {
_downKeys.push(17, 18);
_mods[17] = true;
_mods[18] = true;

Loading…
Cancel
Save