New issue
Advanced search Search tips

Issue 626014 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Ash should list repeatable, rather than non-repeatable, accelerators

Project Member Reported by derat@chromium.org, Jul 6 2016

Issue description

ash/accelerators/accelerator_table.cc currently has a kNonrepeatableActions array listing accelerators that shouldn't be repeated if the user holds down keys, but it's way out of date. We should instead just list the few accelerators that are intended to be repeatable -- from scanning the list, I suspect it's only around 14 of them.
 

Comment 1 by derat@chromium.org, Jul 6 2016

I believe that these are the currently-repeatable accelerators in ash:

BRIGHTNESS_DOWN
BRIGHTNESS_UP
DEBUG_ADD_REMOVE_DISPLAY
DEBUG_PRINT_LAYER_HIERARCHY
DEBUG_PRINT_VIEW_HIERARCHY
DEBUG_PRINT_WINDOW_HIERARCHY
DEBUG_SHOW_TOAST
DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE
DEBUG_TOGGLE_DEVICE_SCALE_FACTOR
DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN
DEBUG_TOGGLE_SHOW_DEBUG_BORDERS
DEBUG_TOGGLE_SHOW_FPS_COUNTER
DEBUG_TOGGLE_SHOW_PAINT_RECTS
DEBUG_TOGGLE_TOUCH_VIEW
DEBUG_TOGGLE_UNIFIED_DESKTOP
DISABLE_CAPS_LOCK
DISABLE_GPU_WATCHDOG
FOCUS_NEXT_PANE
FOCUS_PREVIOUS_PANE
FOCUS_SHELF
KEYBOARD_BRIGHTNESS_DOWN
KEYBOARD_BRIGHTNESS_UP
LAUNCH_APP_0
LAUNCH_APP_1
LAUNCH_APP_2
LAUNCH_APP_3
LAUNCH_APP_4
LAUNCH_APP_5
LAUNCH_APP_6
LAUNCH_APP_7
LAUNCH_LAST_APP
LOCK_PRESSED
LOCK_RELEASED
MAGNIFY_SCREEN_ZOOM_IN
MAGNIFY_SCREEN_ZOOM_OUT
MEDIA_NEXT_TRACK
MEDIA_PLAY_PAUSE
MEDIA_PREV_TRACK
NEW_INCOGNITO_WINDOW
NEW_TAB
NEW_WINDOW
OPEN_CROSH
OPEN_FILE_MANAGER
OPEN_GET_HELP
POWER_PRESSED
POWER_RELEASED
RESTORE_TAB
SHOW_KEYBOARD_OVERLAY
SHOW_MESSAGE_CENTER_BUBBLE
SHOW_SYSTEM_TRAY_BUBBLE
SHOW_TASK_MANAGER
SWAP_PRIMARY_DISPLAY
SWITCH_IME
SWITCH_TO_NEXT_USER
SWITCH_TO_PREVIOUS_USER
TOGGLE_APP_LIST
TOGGLE_CAPS_LOCK
TOGGLE_MIRROR_MODE
TOGGLE_SPOKEN_FEEDBACK
TOGGLE_WIFI
TOUCH_HUD_CLEAR
TOUCH_HUD_MODE_CHANGE
TOUCH_HUD_PROJECTION_TOGGLE
UNPIN
VOLUME_DOWN
VOLUME_MUTE
VOLUME_UP
WINDOW_CYCLE_SNAP_DOCK_LEFT
WINDOW_CYCLE_SNAP_DOCK_RIGHT
WINDOW_POSITION_CENTER

Of those, I think that the list of ones that we actually want to repeat is much shorter; probably something like this:

BRIGHTNESS_DOWN
BRIGHTNESS_UP
FOCUS_NEXT_PANE
FOCUS_PREVIOUS_PANE
KEYBOARD_BRIGHTNESS_DOWN
KEYBOARD_BRIGHTNESS_UP
MAGNIFY_SCREEN_ZOOM_IN
MAGNIFY_SCREEN_ZOOM_OUT
MEDIA_NEXT_TRACK
MEDIA_PREV_TRACK
RESTORE_TAB
VOLUME_DOWN
VOLUME_UP

I could be convinced otherwise about some of those, though:

- SCALE_UI_DOWN and SCALE_UI_UP are currently nonrepeatable. Should MAGNIFY_SCREEN_ZOOM_IN and MAGNIFY_SCREEN_ZOOM_OUT also be nonrepeatable?
- What about FOCUS_NEXT_PANE and FOCUS_PREVIOUS_PANE?
- What about RESTORE_TAB?

Comment 2 by derat@chromium.org, Jul 6 2016

I only find RESTORE_TAB's current repeatability to be useful since Ctrl-W (handled by Chrome rather than ash) is repeatable and I sometimes trigger it accidentally. :-/
Your short list sounds good to me. I don't have an opinion about SCALE_UI, MAGNIFY_SCREEN, and FOCUS_*_PANE and would just leave them as they are.

RESTORE_TAB being repeatable is fine with me.

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c061dd11ada8a97335b2ef9b13757cdb780f84e8

commit c061dd11ada8a97335b2ef9b13757cdb780f84e8
Author: derat <derat@chromium.org>
Date: Thu Jul 07 16:35:52 2016

ash: Explicitly enumerate repeatable accelerators.

Instead of designating specific accelerators as
non-repeatable (which is prone to getting outdated), keep
track of the few accelerators that should be repeatable.

Also make many probably-inadvertently-repeatable
accelerators instead be non-repeatable.

BUG= 626014 
TEST=manual

Review-Url: https://codereview.chromium.org/2130603002
Cr-Commit-Position: refs/heads/master@{#404161}

[modify] https://crrev.com/c061dd11ada8a97335b2ef9b13757cdb780f84e8/ash/accelerators/accelerator_controller.cc
[modify] https://crrev.com/c061dd11ada8a97335b2ef9b13757cdb780f84e8/ash/accelerators/accelerator_controller.h
[modify] https://crrev.com/c061dd11ada8a97335b2ef9b13757cdb780f84e8/ash/accelerators/accelerator_table.cc
[modify] https://crrev.com/c061dd11ada8a97335b2ef9b13757cdb780f84e8/ash/accelerators/accelerator_table.h
[modify] https://crrev.com/c061dd11ada8a97335b2ef9b13757cdb780f84e8/ash/accelerators/accelerator_table_unittest.cc
[modify] https://crrev.com/c061dd11ada8a97335b2ef9b13757cdb780f84e8/ash/accelerators/exit_warning_handler.h

Comment 5 by derat@chromium.org, Jul 7 2016

Status: Fixed (was: Started)
Labels: VerifyIn-54

Comment 7 by dchan@chromium.org, Oct 7 2016

Labels: VerifyIn-55
Status: Verified (was: Fixed)
Closing bug as per comment #3 and #4

Sign in to add a comment