-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add keybindings with numpad keys for Zoom commands and handle multiple keybindings per command #11363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexandraBuzila do you mind taking a look at the failing tests?
- display all available keybindings for a command in the Keyboard Shortcuts dialog and handle multiple keybindings in the keymaps.json (eclipse-theia#11240) - add keybindings with the + and - keys from the numpad for the Zoom In and Zoom Out commands, in the electron app (Fixes eclipse-theia#11239) Signed-off-by: Alexandra Buzila <[email protected]>
3c8e3af
to
4bb7450
Compare
I rebased the branch and updated the failing test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that the changes work well for me 👍
There is a difference between our behavior and that of vscode but I prefer ours. Basically I noticed in VS Code that if you modify each entry for a command that has multiple keybindings vscode will only have one active at a time.
I did notice some issues when performing updates, and doing a revert (where the whole file is deleted) so I opened #11399 which should fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me as well 👍
- The view displays all keybindings when multiple keybindings exist
- Changing these keybindings is correctly applied (after saving the
keymaps.json
) - Reseting a keybinding resets all of the keybindings for the same command
I originally though I've noticed an issue when swapping two keybindings for a command (one disappears), but vscode behaves in the same way, so at least it is consistent. I also believe there's no better way dealing with this.
@vince-fugnitto : Are you fin with merging this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
What it does
Zoom In
andZoom Out
commands, in the electron app (Fixes [electron] Zoom commands don't work with the numpad keys #11239)keymaps.json
(Fixes Only one keybinding is visible per command in Keybindings dialog #11240)How to test
Zoom In and Out should work with the + and - keys from the numpad.
To test the handling of multiple keybindings for one command:
keymaps.json
Zoom In
command in the editor -> two entries should showkeymaps.json
, one for the new keybinding and one that disables the default onekeymaps.json
to update the UIZoom In
command in the editor -> two new entries should be visible inkeymaps.json
, one for the new keybinding and one that disables the default onekeymaps.json
to update the UIkeymaps.json
(the one that was added at step 5)keymaps.json
to update the UIZoom In
commands in the editor -> both commands should return to their default values and the command should be removed completely fromkeymaps.json
Review checklist
Reminder for reviewers