diff options
-rw-r--r-- | config.h | 10 | ||||
-rw-r--r-- | makefile | 2 | ||||
-rwxr-xr-x | rose | bin | 39008 -> 39008 bytes | |||
-rw-r--r-- | rose.c | 9 |
4 files changed, 15 insertions, 6 deletions
@@ -1,5 +1,7 @@ -#include <gdk/gdkkeysyms.h> #include <stdbool.h> +#include <gdk/gdk.h> +// Previously: #include <gdk/gdkkeysyms.h> +// But GTK now discourages including the individual headers // Key user config #define WIDTH 1920 // 960 for half-width, 1920 for full width @@ -82,8 +84,8 @@ static struct { { CTRL, KEY(h), goback }, { CTRL, KEY(j), goforward }, { CTRL, KEY(r), refresh }, - { CTRL | SFT, KEY(R), refresh_force }, - { CTRL | SFT, KEY(H), back_to_home }, + { CTRL, KEY(R), refresh_force }, + { CTRL, KEY(H), back_to_home }, { CTRL, KEY(equal), zoomin }, { CTRL, KEY(minus), zoomout }, { CTRL, KEY(0), zoom_reset }, @@ -96,7 +98,7 @@ static struct { { CTRL, KEY(semicolon), hide_bar }, { CTRL, KEY(f), show_finder }, { CTRL, KEY(n), finder_next }, - { CTRL | SFT, KEY(N), finder_prev }, + { CTRL, KEY(N), finder_prev }, { CTRL, KEY(p), prettify } }; /* ^ For controls more akin to normal browsers */ @@ -64,7 +64,7 @@ fast: $(SRC) $(PLUGINS) $(CONFIG) rm -f *.gcda lint: - clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.0'` -o rose `pkg-config --libs 'webkit2gtk-4.0'` + clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.1'` -o rose `pkg-config --libs 'webkit2gtk-4.1'` inspect: build GTK_DEBUG=interactive ./rose Binary files differ@@ -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, |