Pressing enter should correspond to default button action
In shortcut customization dialogs, pressing enter should correspond to the default button action. This is achieved by setting default focus to the default buttons in reset and delete confirmation dialogs, and by capturing and processing Enter key event for Add shortcut dialog. For this key interception to work seamlessly, I've updated the implementation of viewModel.onKeyPressed to only process key events on ACTION_UP events as opposed to ACTION_DOWN previously. This is necessary to ensure that when the user selects an keycombination such as Meta+Enter in the add shortcut dialog, the dialog doesn't close immediately in response to Enter key being pressed. Test: ShortcutCustomizationViewModelTest Flag: com.android.systemui.keyboard_shortcut_helper_shortcut_customizer Fix: 381065266 Change-Id: I9f8fbc107ea3c1725ae3e756a62c95a4336c549a
Loading
Please register or sign in to comment