Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd5025d8 authored by Alexandre Dumont's avatar Alexandre Dumont Committed by Gerrit Code Review
Browse files

Prevent Sym key from showing the IME picker

By default InputMethodManager will popup an IME picker when pressing
the Sym key.

This can be disabled by setting config_symKeyShowsImePicker to false in the
overlay (so the Sym key will show the symbol windows selector for ex.)
parent 37307e61
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -1523,6 +1523,7 @@ public final class InputMethodManager {
                return;
            }
    
            if (context.getResources().getBoolean(com.android.internal.R.bool.config_symKeyShowsImePicker)) {
                if (key.getAction() == KeyEvent.ACTION_DOWN
                        && key.getKeyCode() == KeyEvent.KEYCODE_SYM) {
                    showInputMethodPicker();
@@ -1532,6 +1533,7 @@ public final class InputMethodManager {
                    }
                    return;
                }
            }
            try {
                if (DEBUG) Log.v(TAG, "DISPATCH KEY: " + mCurMethod);
                mCurMethod.dispatchKeyEvent(seq, key, callback);
+4 −0
Original line number Diff line number Diff line
@@ -967,4 +967,8 @@
         the wallpaper width suggestion by the launcher may be too large for
         the GPU to handle. -->
    <integer name="config_wallpaperMaxWidth">-1</integer>

    <!-- True if the Sym key should open the InputMethodPicker (default) -->
    <bool name="config_symKeyShowsImePicker">true</bool>

</resources>
+4 −0
Original line number Diff line number Diff line
@@ -3935,4 +3935,8 @@
  <!-- HW rotation lock -->
  <java-symbol type="string" name="toast_rotation_unlocked" />
  <java-symbol type="string" name="toast_rotation_locked" />

  <!-- IME Picker showing upon pressing Sym Key -->
  <java-symbol type="bool" name="config_symKeyShowsImePicker" />

</resources>