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

Commit 43d83d91 authored by android-build-team Robot's avatar android-build-team Robot Committed by Android (Google) Code Review
Browse files

Merge "Use Meta+Space for hard-keyboard layout switching"

parents 05f09f17 61932f38
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1725,8 +1725,8 @@
    <string name="keyboard_shortcut_group_system_notifications">Notifications</string>
    <!-- User visible title for the the keyboard shortcut that triggers the keyboard shortcuts helper. -->
    <string name="keyboard_shortcut_group_system_shortcuts_helper">Keyboard Shortcuts</string>
    <!-- User visible title for the the keyboard shortcut that switches input methods. -->
    <string name="keyboard_shortcut_group_system_switch_input">Switch input method</string>
    <!-- User visible title for the the keyboard shortcut that switches to the next hardware keyboard layout. [CHAR LIMIT=30] -->
    <string name="keyboard_shortcut_group_system_switch_input">Switch keyboard layout</string>

    <!-- User visible title for the system-wide applications keyboard shortcuts list. -->
    <string name="keyboard_shortcut_group_applications">Applications</string>
+3 −3
Original line number Diff line number Diff line
@@ -3986,10 +3986,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }

        // Handle keyboard language switching.
        final boolean isCtrlOrMetaSpace = keyCode == KeyEvent.KEYCODE_SPACE
                && (metaState & (KeyEvent.META_CTRL_MASK | KeyEvent.META_META_MASK)) != 0;
        if (down && repeatCount == 0
                && (keyCode == KeyEvent.KEYCODE_LANGUAGE_SWITCH
                        || (keyCode == KeyEvent.KEYCODE_SPACE
                                && (metaState & KeyEvent.META_CTRL_MASK) != 0))) {
                && (keyCode == KeyEvent.KEYCODE_LANGUAGE_SWITCH || isCtrlOrMetaSpace)) {
            int direction = (metaState & KeyEvent.META_SHIFT_MASK) != 0 ? -1 : 1;
            mWindowManagerFuncs.switchKeyboardLayout(event.getDeviceId(), direction);
            return -1;