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
This commit is contained in:
parent
bab9849a8b
commit
99f3df2893
9 changed files with 54 additions and 61 deletions
|
@ -29,6 +29,9 @@ In your keymap you can use the following keycodes to map key presses to mouse ac
|
|||
|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 |
|
||||
|`KC_MS_BTN6` |`KC_BTN6`|Press button 6 |
|
||||
|`KC_MS_BTN7` |`KC_BTN7`|Press button 7 |
|
||||
|`KC_MS_BTN8` |`KC_BTN8`|Press button 8 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left |
|
||||
|
|
|
@ -19,7 +19,7 @@ Keep in mind that a report_mouse_t (here "mouseReport") has the following proper
|
|||
* `mouseReport.y` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ upward, - downward) on the y axis.
|
||||
* `mouseReport.v` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing vertical scrolling (+ upward, - downward).
|
||||
* `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left).
|
||||
* `mouseReport.buttons` - this is a uint8_t in which the last 5 bits are used. These bits represent the mouse button state - bit 3 is mouse button 5, and bit 7 is mouse button 1.
|
||||
* `mouseReport.buttons` - this is a uint8_t in which all 8 bits are used. These bits represent the mouse button state - bit 0 is mouse button 1, and bit 7 is mouse button 8.
|
||||
|
||||
Once you have made the necessary changes to the mouse report, you need to send it:
|
||||
|
||||
|
|
|
@ -34,6 +34,9 @@ MOUSEKEY_ENABLE = yes
|
|||
| `KC_MS_BTN3` | `KC_BTN3` | ボタン3を押す |
|
||||
| `KC_MS_BTN4` | `KC_BTN4` | ボタン4を押す |
|
||||
| `KC_MS_BTN5` | `KC_BTN5` | ボタン5を押す |
|
||||
| `KC_MS_BTN6` | `KC_BTN6` | ボタン6を押す |
|
||||
| `KC_MS_BTN7` | `KC_BTN7` | ボタン7を押す |
|
||||
| `KC_MS_BTN8` | `KC_BTN8` | ボタン8を押す |
|
||||
| `KC_MS_WH_UP` | `KC_WH_U` | ホイールを向こう側に回転 |
|
||||
| `KC_MS_WH_DOWN` | `KC_WH_D` | ホイールを手前側に回転 |
|
||||
| `KC_MS_WH_LEFT` | `KC_WH_L` | ホイールを左に倒す |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue