diff options
author | Drashna Jaelre <[email protected]> | 2021-01-27 09:38:34 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-28 04:38:34 +1100 |
commit | 99f3df28939d89b7fc2d2e7c0ee21b0879c7813f (patch) | |
tree | 2d399785f60ddc0bae95c11e7d6f1462a5511ca1 /tmk_core/common/action.c | |
parent | bab9849a8bc799f43e4dc18674c07625630cab0d (diff) | |
download | qmk_firmware-99f3df28939d89b7fc2d2e7c0ee21b0879c7813f.tar.gz qmk_firmware-99f3df28939d89b7fc2d2e7c0ee21b0879c7813f.zip |
Add support for 8 buttons to mouse report (#10807)
* Add support for 8 buttons to mouse report
This includes support for 8 buttons in mousekeys. However, this does move the keys around due to the fact that the last mousekey keycode is already 0xFF, so any past that would not work with register_code and the like, breaking them for tap hold keys, encoders, and other features.
* Update mouse key docs
* Add changes based on feedback
* Fix VUSB report size comment
Because drashna red gud
* Fix typo in action.c
* Fix IS_MOUSE_BUTTON check
* Change start range for mousekeys so that the end is 0xFF properly
* condense mousekeys check
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r-- | tmk_core/common/action.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index a7432bae59..a3830abbff 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -443,6 +443,15 @@ void process_action(keyrecord_t *record, action_t action) { case KC_MS_BTN5: register_button(true, MOUSE_BTN5); break; + case KC_MS_BTN6: + register_button(true, MOUSE_BTN6); + break; + case KC_MS_BTN7: + register_button(true, MOUSE_BTN7); + break; + case KC_MS_BTN8: + register_button(true, MOUSE_BTN8); + break; # endif default: mousekey_send(); @@ -469,6 +478,15 @@ void process_action(keyrecord_t *record, action_t action) { case KC_MS_BTN5: register_button(false, MOUSE_BTN5); break; + case KC_MS_BTN6: + register_button(false, MOUSE_BTN6); + break; + case KC_MS_BTN7: + register_button(false, MOUSE_BTN7); + break; + case KC_MS_BTN8: + register_button(false, MOUSE_BTN8); + break; # endif default: mousekey_send(); |