diff options
author | NunoSempere <nuno.semperelh@protonmail.com> | 2024-03-12 14:39:03 -0300 |
---|---|---|
committer | NunoSempere <nuno.semperelh@protonmail.com> | 2024-03-12 14:40:50 -0300 |
commit | bb9d791a62808b973c8258edd921d1c78e0b1df4 (patch) | |
tree | 6432f0d9ef92603377b0b78ccd10bdd9ca3d2aca /rose.c | |
parent | 8907cbb063f4369bfba554f3fb6f1fc2a9a17fd9 (diff) |
get shortcuts working again
Diffstat (limited to 'rose.c')
-rw-r--r-- | rose.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -381,8 +381,15 @@ int handle_signal_keypress(void* self, GdkEvent* event, GtkNotebook* notebook) { (void)self; + /* + printf("Keypress state: %d\n", event->key.state); + if(event->key.state & GDK_CONTROL_MASK){ + printf("Keypress state is: CONTROL\n"); + } + printf("Keypress value: %d\n", event->key.keyval); + */ for (int i = 0; i < sizeof(shortcut) / sizeof(shortcut[0]); i++) - if ((event->key.state == shortcut[i].mod || shortcut[i].mod == 0x0) && event->key.keyval == shortcut[i].key) + if ((event->key.state & shortcut[i].mod || shortcut[i].mod == 0x0) && event->key.keyval == shortcut[i].key) return handle_shortcut(shortcut[i].id, notebook); /* If I wanted to bind button presses, like the extra button in the mouse, |