mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-21 23:27:39 +00:00
chore(web): Merge remote-tracking branch 'origin/fix/web/state-key-management' into fix/web/state-key-management
This commit is contained in:
commit
b0d541a005
1 changed files with 7 additions and 13 deletions
|
|
@ -219,18 +219,12 @@ namespace com.keyman.keyboards {
|
|||
|
||||
// If it's a state key modifier, trigger its effects as part of the
|
||||
// keystroke.
|
||||
let bitmask = 0;
|
||||
switch(Lkc.kName) {
|
||||
case 'K_CAPS':
|
||||
bitmask = text.Codes.stateBitmasks.CAPS;
|
||||
break;
|
||||
case 'K_NUMLOCK':
|
||||
bitmask = text.Codes.stateBitmasks.NUM_LOCK;
|
||||
break;
|
||||
case 'K_SCROLL':
|
||||
bitmask = text.Codes.stateBitmasks.SCROLL_LOCK;
|
||||
break;
|
||||
}
|
||||
const bitmap = {
|
||||
'K_CAPS': text.Codes.stateBitmasks.CAPS,
|
||||
'K_NUMLOCK': text.Codes.stateBitmasks.NUM_LOCK,
|
||||
'K_SCROLL': text.Codes.stateBitmasks.SCROLL_LOCK
|
||||
};
|
||||
const bitmask = bitmap[Lkc.kName];
|
||||
|
||||
if(bitmask) {
|
||||
Lkc.Lstates ^= bitmask;
|
||||
|
|
@ -690,4 +684,4 @@ namespace com.keyman.keyboards {
|
|||
return aLayout;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue