From 0f62b3044c501dc5679583e06447285ebeb31118 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 12 Feb 2023 23:20:11 +0100 Subject: Option to switch to the previous input method A new option changes the "change_method" into the new "change_method_prev". It switch to the previously used input method. A long press on "change_method_prev" sends "change_method". A new section is added in the settings and existing options are moved. --- srcs/juloo.keyboard2/KeyEventHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java') diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java index 5b0762e..1a591c8 100644 --- a/srcs/juloo.keyboard2/KeyEventHandler.java +++ b/srcs/juloo.keyboard2/KeyEventHandler.java @@ -48,7 +48,8 @@ class KeyEventHandler implements Config.IKeyEventHandler case SWITCH_NUMERIC: _recv.set_layout(Layout.Numeric); break; case SWITCH_EMOJI: _recv.setPane_emoji(); break; case SWITCH_BACK_EMOJI: _recv.setPane_normal(); break; - case CHANGE_METHOD: _recv.switchToNextInputMethod(); break; + case CHANGE_METHOD: _recv.switchInputMethod(); break; + case CHANGE_METHOD_PREV: _recv.switchToPrevInputMethod(); break; case ACTION: InputConnection conn = _recv.getCurrentInputConnection(); if (conn != null) @@ -179,7 +180,8 @@ class KeyEventHandler implements Config.IKeyEventHandler public static interface IReceiver { - public void switchToNextInputMethod(); + public void switchInputMethod(); + public void switchToPrevInputMethod(); public void setPane_emoji(); public void setPane_normal(); public void showKeyboardConfig(); -- cgit v1.2.3