diff options
author | Joel Challis <git@zvecr.com> | 2020-02-23 22:03:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-23 14:03:01 -0800 |
commit | f76f9c7d2abd1901be45431c5b2ea435c8c472b2 (patch) | |
tree | 03e0c74e011316e9df7f07cfbe7951aa1b01f517 /quantum/send_string_keycodes.h | |
parent | 530c9976382a321d65c0339e0465932bd28f8cb9 (diff) | |
download | qmk_firmware-f76f9c7d2abd1901be45431c5b2ea435c8c472b2.tar.gz qmk_firmware-f76f9c7d2abd1901be45431c5b2ea435c8c472b2.zip |
Add mouse support to SEND_STRING (#8223)
* Add mouse support to SEND_STRING
* add short forms
Diffstat (limited to 'quantum/send_string_keycodes.h')
-rw-r--r-- | quantum/send_string_keycodes.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/quantum/send_string_keycodes.h b/quantum/send_string_keycodes.h index fc6467a74..b4a50f84d 100644 --- a/quantum/send_string_keycodes.h +++ b/quantum/send_string_keycodes.h | |||
@@ -137,6 +137,24 @@ | |||
137 | #define X_BRMU X_PAUSE | 137 | #define X_BRMU X_PAUSE |
138 | #define X_BRMD X_SCROLLLOCK | 138 | #define X_BRMD X_SCROLLLOCK |
139 | 139 | ||
140 | /* Mouse Keys */ | ||
141 | #define X_MS_U X_MS_UP | ||
142 | #define X_MS_D X_MS_DOWN | ||
143 | #define X_MS_L X_MS_LEFT | ||
144 | #define X_MS_R X_MS_RIGHT | ||
145 | #define X_BTN1 X_MS_BTN1 | ||
146 | #define X_BTN2 X_MS_BTN2 | ||
147 | #define X_BTN3 X_MS_BTN3 | ||
148 | #define X_BTN4 X_MS_BTN4 | ||
149 | #define X_BTN5 X_MS_BTN5 | ||
150 | #define X_WH_U X_MS_WH_UP | ||
151 | #define X_WH_D X_MS_WH_DOWN | ||
152 | #define X_WH_L X_MS_WH_LEFT | ||
153 | #define X_WH_R X_MS_WH_RIGHT | ||
154 | #define X_ACL0 X_MS_ACCEL0 | ||
155 | #define X_ACL1 X_MS_ACCEL1 | ||
156 | #define X_ACL2 X_MS_ACCEL2 | ||
157 | |||
140 | /* Keyboard/Keypad Page (0x07) */ | 158 | /* Keyboard/Keypad Page (0x07) */ |
141 | #define X_A 04 | 159 | #define X_A 04 |
142 | #define X_B 05 | 160 | #define X_B 05 |
@@ -341,6 +359,24 @@ | |||
341 | #define X_BRIGHTNESS_UP bd | 359 | #define X_BRIGHTNESS_UP bd |
342 | #define X_BRIGHTNESS_DOWN be | 360 | #define X_BRIGHTNESS_DOWN be |
343 | 361 | ||
362 | /* Mouse Buttons (unallocated range in HID spec) */ | ||
363 | #define X_MS_UP f0 | ||
364 | #define X_MS_DOWN f1 | ||
365 | #define X_MS_LEFT f2 | ||
366 | #define X_MS_RIGHT f3 | ||
367 | #define X_MS_BTN1 f4 | ||
368 | #define X_MS_BTN2 f5 | ||
369 | #define X_MS_BTN3 f6 | ||
370 | #define X_MS_BTN4 f7 | ||
371 | #define X_MS_BTN5 f8 | ||
372 | #define X_MS_WH_UP f9 | ||
373 | #define X_MS_WH_DOWN fa | ||
374 | #define X_MS_WH_LEFT fb | ||
375 | #define X_MS_WH_RIGHT fc | ||
376 | #define X_MS_ACCEL0 fd | ||
377 | #define X_MS_ACCEL1 fe | ||
378 | #define X_MS_ACCEL2 ff | ||
379 | |||
344 | // Send string macros | 380 | // Send string macros |
345 | #define STRINGIZE(z) #z | 381 | #define STRINGIZE(z) #z |
346 | #define ADD_SLASH_X(y) STRINGIZE(\x##y) | 382 | #define ADD_SLASH_X(y) STRINGIZE(\x##y) |