GNOME Bugzilla – Bug 737135
keybindings: Don't assume a fixed above_tab keycode on non-linux systems
Last modified: 2014-09-22 19:57:48 UTC
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=729490#c24.
Created attachment 286834 [details] [review] keybindings: Expose get_keycodes_for_keysym() We will soon use it to compute the key-above-tab on non-linux systems.
Created attachment 286835 [details] [review] keybindings: Don't assume a fixed above_tab keycode on non-linux systems Commit 2f229c3928be3a removed the code to compute the above-tab keycode and replaced it with a simple constant. However the new code assumes evdev on linux, which obviously breaks on other systems; restore most of commit 2f229c3928be3a for those.
These patches build and work on FreeBSD 10.
Review of attachment 286835 [details] [review]: No.
Created attachment 286839 [details] [review] keybindings: Do not depend on linux headers for above-tab key Commit 2f229c3928be3a removed the code to compute the above-tab keycode and replaced it with a simple constant from linux/input.h. We obviously cannot depend on linux headers on non-linux systems, so provide a fallback definition in that case (which is expected to work assuming the system is using the Xorg xf86-input-keyboard driver). I'm not overly happy with making blunt assumptions like that, but well ...
Review of attachment 286839 [details] [review]: Looks good to me. ::: src/core/keybindings.c @@ +44,3 @@ #include <linux/input.h> +#elif !defined KEY_GRAVE +#define KEY_GRAVE 0x29 /* assume the use of xf86-input-keyboard */ This is the same exact value as in linux/input.h, so the comment might be a bit misleading, but I'm fine with it.
Attachment 286839 [details] pushed as 565b9d7 - keybindings: Do not depend on linux headers for above-tab key