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

Commit 550eae79 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add Meta + Ctrl + Down desktop view shortcut helper." into main

parents 5e0ebc6d 62cccbf0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -541,7 +541,7 @@ object TestShortcuts {
            simpleShortcutCategory(System, "System apps", "Take a note"),
            simpleShortcutCategory(System, "System controls", "Take screenshot"),
            simpleShortcutCategory(System, "System controls", "Go back"),
            simpleShortcutCategory(MultiTasking, "Split screen", "Switch to full screen"),
            simpleShortcutCategory(MultiTasking, "Split screen", "Use full screen"),
            simpleShortcutCategory(
                MultiTasking,
                "Split screen",
+3 −1
Original line number Diff line number Diff line
@@ -2341,7 +2341,9 @@
    <!-- User visible title for the keyboard shortcut that enters split screen with current app on the left [CHAR LIMIT=70] -->
    <string name="system_multitasking_lhs">Use split screen with app on the left</string>
    <!-- User visible title for the keyboard shortcut that switches from split screen to full screen [CHAR LIMIT=70] -->
    <string name="system_multitasking_full_screen">Switch to full screen</string>
    <string name="system_multitasking_full_screen">Use full screen</string>
    <!-- User visible title for the keyboard shortcut that switches to desktop view [CHAR LIMIT=70] -->
    <string name="system_multitasking_desktop_view">Use desktop view</string>
    <!-- User visible title for the keyboard shortcut that switches to app on right or below while using split screen [CHAR LIMIT=70] -->
    <string name="system_multitasking_splitscreen_focus_rhs">Switch to app on right or below while using split screen</string>
    <!-- User visible title for the keyboard shortcut that switches to app on left or above while using split screen [CHAR LIMIT=70] -->
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.keyboard.shortcut.data.source
import android.content.Context
import android.content.res.Resources
import android.view.KeyEvent.KEYCODE_D
import android.view.KeyEvent.KEYCODE_DPAD_DOWN
import android.view.KeyEvent.KEYCODE_DPAD_LEFT
import android.view.KeyEvent.KEYCODE_DPAD_RIGHT
import android.view.KeyEvent.KEYCODE_DPAD_UP
@@ -73,6 +74,15 @@ constructor(@Main private val resources: Resources, @Application private val con
                command(META_META_ON or META_CTRL_ON, KEYCODE_DPAD_UP)
            }
        )
        if (DesktopModeStatus.canEnterDesktopMode(context)) {
            //  Switch to desktop view
            //   - Meta + Ctrl + Down arrow
            add(
                shortcutInfo(resources.getString(R.string.system_multitasking_desktop_view)) {
                    command(META_META_ON or META_CTRL_ON, KEYCODE_DPAD_DOWN)
                }
            )
        }
        if (enableMoveToNextDisplayShortcut()) {
            // Move a window to the next display:
            //  - Meta + Ctrl + D