diff options
| author | Jules Aguillon | 2022-01-09 20:26:06 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2022-01-09 20:26:06 +0100 |
| commit | 53113cadd9654c827ae306905dae4d738dedf818 (patch) | |
| tree | fe56afe810939608893fd82732e9f7f29105a563 /srcs/juloo.keyboard2/KeyEventHandler.java | |
| parent | 4b43645c4b6632d0cd2388b90e7bc2bbde98087e (diff) | |
| download | unexpected-keyboard-53113cadd9654c827ae306905dae4d738dedf818.tar.gz unexpected-keyboard-53113cadd9654c827ae306905dae4d738dedf818.zip | |
Add the Action key
It is placed on the top-right of the enter key on every layouts.
It sends a special event (performEditorAction) instead of writing a
newline.
The "actionId" is passed through the EditorInfo object in an obfuscated
way so it's not clear whether it's using the right one.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyEventHandler.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java index cba10dc..39e56d5 100644 --- a/srcs/juloo.keyboard2/KeyEventHandler.java +++ b/srcs/juloo.keyboard2/KeyEventHandler.java @@ -22,6 +22,7 @@ class KeyEventHandler implements Config.IKeyEventHandler case KeyValue.EVENT_SWITCH_EMOJI: _recv.setPane_emoji(); return; case KeyValue.EVENT_SWITCH_BACK_EMOJI: _recv.setPane_normal(); return; case KeyValue.EVENT_CHANGE_METHOD: _recv.switchToNextInputMethod(); return; + case KeyValue.EVENT_ACTION: _recv.performAction(); return; default: if ((flags & (KeyValue.FLAG_CTRL | KeyValue.FLAG_ALT)) != 0) handleMetaKeyUp(key, flags); @@ -64,6 +65,7 @@ class KeyEventHandler implements Config.IKeyEventHandler public void setPane_emoji(); public void setPane_normal(); public void showKeyboardConfig(); + public void performAction(); /** 'res_id' is '-1' for the currently selected layout. */ public void setLayout(int res_id); |
