Hi, I'm thinking about changing the keybindings_send_command() / keybinding enums code, for two reasons: 1. We can't change the order of keybindings without breaking the plugin ABI. 2. We can't reorder/move keybindings in groups without breaking the plugin ABI and the API. 3. The keybindings_send_command(GEANY_KEY_GROUP_FOCUS, GEANY_KEYS_FOCUS_COMPILER) syntax seems redundant - why not just keybindings_send_command(GEANY_KEYS_FOCUS_COMPILER)?
The 3rd issue isn't that important, but it would be nice to avoid it, as it could be a source of bugs.
To solve this, we could have the GEANY_KEYS_ commands share a single enum, but unsorted so we can append items as needed. All the group enums could be moved into keybindings.c, renaming them so all the existing code works without changes. The only function that would need updating would be keybindings_send_command(), plus storing the GEANY_KEYS_ enum value in each keybinding struct, so that function can find the callback.
Does this sound a good idea?
Regards, Nick