summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-02-23 22:03:01 +0000
committerFlorian Didron <fdidron@users.noreply.github.com>2020-03-24 16:04:05 +0900
commit75ca366082c6a048a0fa0f91315719b2ae88b153 (patch)
treec31790689baab185d98983b7d6702a69d86bed39
parentff1a52360e3b7013a6b9694002543f89c05fd6ef (diff)
Add mouse support to SEND_STRING (#8223)
* Add mouse support to SEND_STRING * add short forms
-rw-r--r--quantum/send_string_keycodes.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/quantum/send_string_keycodes.h b/quantum/send_string_keycodes.h
index fc6467a741..b4a50f84d3 100644
--- a/quantum/send_string_keycodes.h
+++ b/quantum/send_string_keycodes.h
@@ -137,6 +137,24 @@
#define X_BRMU X_PAUSE
#define X_BRMD X_SCROLLLOCK
+/* Mouse Keys */
+#define X_MS_U X_MS_UP
+#define X_MS_D X_MS_DOWN
+#define X_MS_L X_MS_LEFT
+#define X_MS_R X_MS_RIGHT
+#define X_BTN1 X_MS_BTN1
+#define X_BTN2 X_MS_BTN2
+#define X_BTN3 X_MS_BTN3
+#define X_BTN4 X_MS_BTN4
+#define X_BTN5 X_MS_BTN5
+#define X_WH_U X_MS_WH_UP
+#define X_WH_D X_MS_WH_DOWN
+#define X_WH_L X_MS_WH_LEFT
+#define X_WH_R X_MS_WH_RIGHT
+#define X_ACL0 X_MS_ACCEL0
+#define X_ACL1 X_MS_ACCEL1
+#define X_ACL2 X_MS_ACCEL2
+
/* Keyboard/Keypad Page (0x07) */
#define X_A 04
#define X_B 05
@@ -341,6 +359,24 @@
#define X_BRIGHTNESS_UP bd
#define X_BRIGHTNESS_DOWN be
+/* Mouse Buttons (unallocated range in HID spec) */
+#define X_MS_UP f0
+#define X_MS_DOWN f1
+#define X_MS_LEFT f2
+#define X_MS_RIGHT f3
+#define X_MS_BTN1 f4
+#define X_MS_BTN2 f5
+#define X_MS_BTN3 f6
+#define X_MS_BTN4 f7
+#define X_MS_BTN5 f8
+#define X_MS_WH_UP f9
+#define X_MS_WH_DOWN fa
+#define X_MS_WH_LEFT fb
+#define X_MS_WH_RIGHT fc
+#define X_MS_ACCEL0 fd
+#define X_MS_ACCEL1 fe
+#define X_MS_ACCEL2 ff
+
// Send string macros
#define STRINGIZE(z) #z
#define ADD_SLASH_X(y) STRINGIZE(\x##y)