From 53113cadd9654c827ae306905dae4d738dedf818 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 9 Jan 2022 20:26:06 +0100 Subject: 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. --- srcs/juloo.keyboard2/KeyEventHandler.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java') 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); -- cgit v1.2.3