mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 08:55:34 +00:00
Merge pull request #10745 from keymanapp/fix/web/no-modipress-if-subkeys
fix(web): disables modipress for layer-switch keys with subkeys
This commit is contained in:
commit
5884ed6a39
1 changed files with 8 additions and 0 deletions
|
|
@ -153,8 +153,16 @@ function buildDistFromKeyCentroidFunctor(key: KeyElement) {
|
|||
|
||||
export function keySupportsModipress(key: KeyElement) {
|
||||
const keySpec = key.key.spec;
|
||||
|
||||
// A key cannot reasonably support both longpresses and modipresses.
|
||||
// It'd be quite ugly to overlay the subkey menu over the new layer during a modipress.
|
||||
if(keySpec.sk) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const modifierKeyIds = ['K_SHIFT', 'K_ALT', 'K_CTRL', 'K_NUMERALS', 'K_SYMBOLS', 'K_CURRENCIES'];
|
||||
for(const modKeyId of modifierKeyIds) {
|
||||
|
||||
if(keySpec.id == modKeyId) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue