Skip to content

Conversation

@amieiro
Copy link
Member

@amieiro amieiro commented Jun 15, 2022

What?

This PR improves the GlotPress hotkeys, as we discussed here.

Why?

In the last years, GlotDict has added some interesting hotkeys for translate.wordpress.org. This PR tries to bring the changes to GlotPress, so we can have the same new or updated hotkeys in GlotPress an at translate.w.org. Also, fixes some missing hotkeys for macOS.

How?

This PR updates the hook for the keydown event, available in the editor.js file. This update only affects the editor.
This PR adds a new file, assets/js/hotkeys.js with the global hotkeys, working in all GlotPress functionality, not only in the editor.

Testing Instructions

  1. Press ? to show the popup with the help, or click on the new link in the footer.
  2. Press Esc to close the help.
  3. In the help popup, you can see all the hotkeys available.

Screenshots or screencast

This is the new link in the footer. When you click it, you will see the popover.

image

This is the popover with a list of the hotkeys. This popover can be used as documentation of the hotkeys.

image

image

amieiro added 25 commits June 15, 2022 15:09
…e one

Add this new hotkeys:
- Ctrl-Shift-C
- Cmd-Shift-B
- Cmd-Shift-C

Remove the Ctrl-Enter hotkey, because it will be used to Suggest or Save in another commiit.
…ning validation for the current visible editor.
…editor

- Ctrl-Shift-D -> Ctrl-D
- Cmd-Shift-D -> Cmd-D
- Ctrl-Left Arrow
- Cmd-Left Arrow
- Ctrl-Right Arrow
- Cmd-Right Arrow
- Alt-Left Arrow or Option-Left Arrow = Move to the previous page.
- Alt-Right Arrow or Option-Right Arrow = Move to the next page.
…rst translation in the table

Alt-1 or Option-1 = Show the editor for the first translation in the table
@amieiro amieiro marked this pull request as ready for review August 25, 2022 14:02
@amieiro amieiro added the [Type] Enhancement A suggestion for improvement. label Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant