DistributedProofreaders / guiguts-py

Guiguts rewrite using Python/tkinter
GNU General Public License v2.0
2 stars 7 forks source link

User defined keyboard shortcuts #143

Open windymilla opened 7 months ago

windymilla commented 7 months ago

Relates to #135, since once every command has a unique identifier, it makes user-defined shortcuts for any command possible. Note that Tk supports multiple keystrokes, so it could be implemented such that the user hits a key combination prior to their chosen shortcut, e.g. Ctrl+u, Ctrl+l to mean "User shortcut", "Lowercase selection". This would leave Ctrl+l free as a system-defined shortcut (need to check if that's true).

windymilla commented 3 months ago

Comment from alpha tester:

It would be very helpful to have keyboard shortcuts for changing the case of text in GuiGuts. Specifically, shortcuts for UPPERCASE, lowercase, and Title Case functionality would be much appreciated. Alternatively, for easier access, consider moving the change case functions to the main Edit menu.

tangledhelix commented 3 months ago

Note that Tk supports multiple keystrokes, so it could be implemented such that the user hits a key combination prior to their chosen shortcut, e.g. Ctrl+u, Ctrl+l to mean "User shortcut", "Lowercase selection".

User-defined shortcuts aside, this would be of use to us for the defaults as well IMHO. As we've seen, it can be quite challenging to find keys that aren't used already and also work on all the platforms. VSCode went the multi-key route as well (a lot of things are hidden behind Cmd-K, ).

windymilla commented 3 months ago

Yes, it could. They are a little more awkward to use though, and it seems a shame to say to the many Windows users (for example) that they have to use Ctrl+u Ctrl+l rather than just Ctrl+l because Cmd+l means something on macOS. It will be a question of balancing our desire to reduce cross-platform differences, and not making things awkward for everyone because they are tiptoeing around the requirements of an OS they don't use.

tangledhelix commented 3 months ago

It's not only useful due to conflicts (such as Win vs. Mac) although that might help. What I really meant is might be useful to fit more keys into the overall keymap. There are only so many keys on the keyboard, and we'll end up running out.

srjfoo commented 3 months ago

And it's apparently not even just differences between Win and macOS -- witness the problem with cmd+; for Compose Sequence on Linux.