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

Commit 62cccbf0 authored by Vania Desmonda's avatar Vania Desmonda
Browse files

Add Meta + Ctrl + Down desktop view shortcut helper.

Also update string to "Use full screen" as requested by UXW.

Fixes: 395071836
Flag: com.android.window.flags.enable_desktop_windowing_mode
Test: manual test
Change-Id: Ie8e496605fd044949a8b06a465f10a9217ad5079
parent 9431c1b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -541,7 +541,7 @@ object TestShortcuts {
            simpleShortcutCategory(System, "System apps", "Take a note"),
            simpleShortcutCategory(System, "System apps", "Take a note"),
            simpleShortcutCategory(System, "System controls", "Take screenshot"),
            simpleShortcutCategory(System, "System controls", "Take screenshot"),
            simpleShortcutCategory(System, "System controls", "Go back"),
            simpleShortcutCategory(System, "System controls", "Go back"),
            simpleShortcutCategory(MultiTasking, "Split screen", "Switch to full screen"),
            simpleShortcutCategory(MultiTasking, "Split screen", "Use full screen"),
            simpleShortcutCategory(
            simpleShortcutCategory(
                MultiTasking,
                MultiTasking,
                "Split screen",
                "Split screen",
+3 −1
Original line number Original line Diff line number Diff line
@@ -2331,7 +2331,9 @@
    <!-- User visible title for the keyboard shortcut that enters split screen with current app on the left [CHAR LIMIT=70] -->
    <!-- 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>
    <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] -->
    <!-- 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] -->
    <!-- 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>
    <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] -->
    <!-- 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 Original line Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.keyboard.shortcut.data.source
import android.content.Context
import android.content.Context
import android.content.res.Resources
import android.content.res.Resources
import android.view.KeyEvent.KEYCODE_D
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_LEFT
import android.view.KeyEvent.KEYCODE_DPAD_RIGHT
import android.view.KeyEvent.KEYCODE_DPAD_RIGHT
import android.view.KeyEvent.KEYCODE_DPAD_UP
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)
                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()) {
        if (enableMoveToNextDisplayShortcut()) {
            // Move a window to the next display:
            // Move a window to the next display:
            //  - Meta + Ctrl + D
            //  - Meta + Ctrl + D