Add mouse buttons 4/5

This commit is contained in:
xs5871 2023-02-20 20:24:13 +00:00 committed by xs5871
parent d4fe745e71
commit 1f751d8374
2 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,8 @@ keyboard.modules.append(MouseKeys())
| `KC.MB_LMB` | Left mouse button | | `KC.MB_LMB` | Left mouse button |
| `KC.MB_RMB` | Right mouse button | | `KC.MB_RMB` | Right mouse button |
| `KC.MB_MMB` | Middle mouse button | | `KC.MB_MMB` | Middle mouse button |
| `KC.MB_BTN4` | mouse button 4 |
| `KC.MB_BTN5` | mouse button 5 |
| `KC.MW_UP` | Mouse wheel up | | `KC.MW_UP` | Mouse wheel up |
| `KC.MW_DOWN`, `KC.MW_DN` | Mouse wheel down | | `KC.MW_DOWN`, `KC.MW_DN` | Mouse wheel down |
| `KC.MS_UP` | Move mouse cursor up | | `KC.MS_UP` | Move mouse cursor up |

View File

@ -28,6 +28,14 @@ class MouseKeys(Module):
names=('MB_RMB',), names=('MB_RMB',),
code=2, code=2,
) )
make_mouse_key(
names=('MB_BTN4',),
code=8,
)
make_mouse_key(
names=('MB_BTN5',),
code=16,
)
make_key( make_key(
names=('MW_UP',), names=('MW_UP',),
on_press=self._mw_up_press, on_press=self._mw_up_press,