Skip to content

Commit

Permalink
Also disable num lock sync on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
otthou committed Aug 22, 2023
1 parent 3356ce4 commit f585dbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/input/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ export default class Keyboard {

// Same goes for numlock is almost the same, except getModifierState for NumLock doesn't work on Mac,
// since Macs don't have a numlock key. So we just never try to fix numlock state on Mac.
// Also isn't supported for iOS.
if (code == 'NumLock') {
this._remoteNumLock = null;
}
if (!browser.isMac() && this._remoteNumLock !== null && this._remoteNumLock !== e.getModifierState('NumLock')) {
if (!browser.isMac() && !browser.isIOS() && this._remoteNumLock !== null && this._remoteNumLock !== e.getModifierState('NumLock')) {
Log.Warn("Fixing remote num lock");
this._sendKeyEvent(KeyTable.XK_Num_Lock, 'NumLock', true);
this._sendKeyEvent(KeyTable.XK_Num_Lock, 'NumLock', false);
Expand Down

0 comments on commit f585dbb

Please sign in to comment.