While looking for information on whether Ctrl+Shift+z is standard for ‘redo’ on Linux (as opposed to Windows using Ctrl+y), I ran across this tidbit in the “GTK Configuration” documentation for ArchLinux
Is it actually this straight-forward to add a GUI option for configuring hotkeys?
4.3 Keyboard shortcuts
Keyboard shortcuts (otherwise known as accelerators in GTK) may be changed by hovering the mouse over the respective menu item, and pressing the desired key combination. To enable this feature, set: gtk-can-change-accels = 1
4.31 Emacs key bindings
To have Emacs-like key bindings in GTK applications add the following: ~/.gtkrc-2.0 gtk-key-theme-name = "Emacs"
For GTK3 also run: $ gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
XFCE has a similar setting: $ xfconf-query -c xsettings -p /Gtk/KeyThemeName -s Emacs
The configuration files in /usr/share/themes/Emacs/ determine what the Emacs bindings are, and can be changed. Copying sections to the users ~/.gtkrc-2.0 file allows for changes on a per user basis.
I’ve begun a fairly complete keyboard shortcut configuration framework. It has to cover a few different types of methods of bindings, but I think it includes everything that is configurable (including Glade files) with a GUI editor. It is alpha now, but planning on releasing with Gramps 6.2.
Thanks! Does it address this topic, i.e. will it allow Mac and Linux users to have a shortcut for the OK button, and let Windows users change it from Alt+O to something else if they wish?
My biggest hope is to remap the Ctrl+c for the Gramps Clipboard so that it does not highjack the OS clipboarding.
Maybe to Ctrl+Alt+c
And to fix the Ctrl+a in the Edit Person dialog. Right now it is useless because you ALWAYS have to follow up the enabling of Multiple Surnames with click on the + button. So there is no sense in a keybinding that only does half the job.
Good news everyone! I was able to allow editing of the Alt+O keybinding for “Open”, and Control+C for “Copy To Clipboard”/“Copy text”. Oh, that last one had been bothering me for years!
I also remember some warnings (comments or workarounds) in my locale (translation file).
# avoid the shortcut on y or p
#: ../gramps/gui/dbloader.py:326
msgid "Select file _type:"
msgstr "Choisir un _type de fichier :"
# avoid the shortcut on y or p
#: ../gramps/gui/glade/editdate.glade:290
msgid "_Type"
msgstr "_Type"
# avoid the shortcut on y or p
#: ../gramps/gui/glade/editevent.glade:97
#: ../gramps/gui/glade/editeventref.glade:241
msgid "_Event type:"
msgstr "_Type d'évènement :"
# avoid the shortcut on y or p
#: ../gramps/gui/glade/editfamily.glade:713
#: ../gramps/gui/glade/editname.glade:99 ../gramps/gui/glade/editnote.glade:131
#: ../gramps/gui/glade/editperson.glade:721
#: ../gramps/gui/glade/editreporef.glade:287
#: ../gramps/gui/glade/editrepository.glade:113
#: ../gramps/gui/glade/editurl.glade:124
msgid "_Type:"
msgstr "_Type :"
etc.
In summary, you might get strange feelings with strings or labels like: “T_ype” or “Ty_pe”…
I spent some time on accessibility and I think we are in pretty good shape: added tool-tips, and a way to edit the keyboard shortcuts outside of Gramps if needed.
Almost every command in Gramps 6.2 now has a keyboard shortcut you can change — found in Preferences → Keyboard Shortcuts. That includes the main menu and toolbar, every view’s own commands (People, Events, Places, etc.), the Note editor’s formatting buttons, and the small icon buttons inside editing windows (like the “Private” lock icon, or the button that opens the date picker). The list of configurable shortcuts includes the Control+C that was hard coded to bring up the clipboard, and Alt+O for “OK” in many editors. Right now that adds up to 189 shortcuts you can search, rebind, or reset — with Gramps warning you if a new choice is already used somewhere else.
What’s not on that configurable list: the underlined letters you see when you hold Alt in an editing window (like the underlined “T” in “Type” or “N” in “Nickname”). Those aren’t separate commands — they’re just a quick way to jump straight to a specific box on the screen, built directly into that box’s label. Because they’re tied to the label’s own wording (and that wording is translated differently in every language), there’s no separate “shortcut” underneath them to reassign. They’ll keep working exactly as they always have; they just won’t show up in the Keyboard Shortcuts list.
Yes, these won’t change, and the awkwardness remains. Perhaps we do something to help, but that is a different issue than the one I addressed for making all other shortcuts configurable.
BTW, I also checked on what would need to change if/when we switch to Gtk4. It won’t be too much work, all constrained to be in one file.
We probably will move to Gtk4 at some point. Quite a lot of work has already been done removing deprecation warnings in preparation. The main issue holding us back is the lack of osm-gps-map for Gtk4.