Shortcut viewer: Determine string to use based on shortcut
Most shortcuts in the shortcut viewer use one of four strings, representing a single key with 0-3 modifiers. This is currently hard-coded with the shortcuts. This CL refactors that to automatically determine the correct string based on the number of modifiers, eliminating the need to specify the shortcut string for most shortcuts. This refactor is intended to make way for having a runtime-determined number of modifiers for a given shortcut, as #new-shortcut-mapping changes shortcuts involving Shift - for those shortcuts, we need to display the shifted key instead of Shift + unshifted key. Bug: 1139080 Change-Id: I8bb2c71a31fb1eb546aee88d6690990afd6c2f92 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494205 Commit-Queue: Michael Cui <mlcui@google.com> Reviewed-by:Tao Wu <wutao@chromium.org> Cr-Commit-Position: refs/heads/master@{#820643}
Showing
This diff is collapsed.
Please register or sign in to comment