abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2View.java
diff options
context:
space:
mode:
authorJules Aguillon2024-04-01 22:57:53 +0200
committerJules Aguillon2024-04-01 23:01:21 +0200
commit3f6b6fd23253e5326d9ba29cac10be36305b3019 (patch)
treed4ab221a7ddbd45224d9742846e9531716ccf8fc /srcs/juloo.keyboard2/Keyboard2View.java
parentf17afba7be0ddf91ae0e67dcfba3c24833c0f6cc (diff)
downloadunexpected-keyboard-3f6b6fd23253e5326d9ba29cac10be36305b3019.tar.gz
unexpected-keyboard-3f6b6fd23253e5326d9ba29cac10be36305b3019.zip
refactor: Apply the modmap in KeyModifier
This makes possible to apply other modifiers to mapped keys and ensures that the modmap really override the shift key behavior.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2View.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java
index 61a62e9..40def60 100644
--- a/srcs/juloo.keyboard2/Keyboard2View.java
+++ b/srcs/juloo.keyboard2/Keyboard2View.java
@@ -104,6 +104,7 @@ public class Keyboard2View extends View
}
_compose_kv = KeyValue.getKeyByName("compose");
_compose_key = _keyboard.findKeyWithValue(_compose_kv);
+ KeyModifier.set_modmap(_keyboard.modmap);
reset();
}
@@ -137,15 +138,6 @@ public class Keyboard2View extends View
public KeyValue modifyKey(KeyValue k, Pointers.Modifiers mods)
{
- if (_keyboard.modmap != null)
- {
- if (mods.has(KeyValue.Modifier.SHIFT))
- {
- KeyValue km = _keyboard.modmap.shift.get(k);
- if (km != null)
- return km;
- }
- }
return KeyModifier.modify(k, mods);
}