I’m about a week in on my work on darktable’s keyboard input system, and I’m hoping by the end of this week to be more or less done. Here’s a quick look at where I am and where I’m going.
The Current Status
If you check out my git branch (it’s called bieber), you’ll find that so far I’ve removed all of the explicit calls to darktable’s old accelerator registration system, and replaced them with calls to gtk_accel_map_add_entry and gtk_accel_group_connect_by_path. These functions create an entry in a global accelerator table, linking an accelerator to a path that looks something like, for instance, /iops/clipping/commit, rather than a specific keycode. Other GTK function calls will later give us the ability to change the actual key mappings for these paths at runtime, so user remapping will be a breeze. If you compile and run darktable from my branch at the moment, you’ll see a file called “testkeys” pop up in your current working directory. This is what the GTK keybindings file looks like, at this point just auto-generated from the default key mappings specified in the source code. Soon you’ll be able to modify this file (either directly or from an interface within Dartable’s preferences) to change your shortcut key mappings.