Created
March 26, 2019 00:39
-
-
Save thnikk/d7dc5fbaa11516f3b19dac03d53bf3e3 to your computer and use it in GitHub Desktop.
testing single key evdev switching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ui/input-linux.c b/ui/input-linux.c | |
index 9720333b2c..485b3bc9c6 100644 | |
--- a/ui/input-linux.c | |
+++ b/ui/input-linux.c | |
@@ -16,6 +16,14 @@ | |
#include <sys/ioctl.h> | |
#include "standard-headers/linux/input.h" | |
+#ifndef EVDEV_SWITCH_KEY_1 | |
+#define EVDEV_SWITCH_KEY_1 KEY_CAPSLOCK | |
+#endif | |
+ | |
static bool linux_is_button(unsigned int lnx) | |
{ | |
if (lnx < 0x100) { | |
@@ -134,8 +142,8 @@ static void input_linux_handle_keyboard(InputLinux *il, | |
} | |
/* hotkey -> record switch request ... */ | |
- if (il->keydown[KEY_LEFTCTRL] && | |
- il->keydown[KEY_RIGHTCTRL]) { | |
+ if (il->keydown[EVDEV_SWITCH_KEY_1] { | |
il->grab_request = true; | |
} | |
-- | |
2.20.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment