From 1f751d83742c967357687c9f4d340a88f9230589 Mon Sep 17 00:00:00 2001 From: xs5871 Date: Mon, 20 Feb 2023 20:24:13 +0000 Subject: [PATCH] Add mouse buttons 4/5 --- docs/en/mouse_keys.md | 2 ++ kmk/modules/mouse_keys.py | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/docs/en/mouse_keys.md b/docs/en/mouse_keys.md index bb749d1..d57ff0d 100644 --- a/docs/en/mouse_keys.md +++ b/docs/en/mouse_keys.md @@ -15,6 +15,8 @@ keyboard.modules.append(MouseKeys()) | `KC.MB_LMB` | Left mouse button | | `KC.MB_RMB` | Right 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_DOWN`, `KC.MW_DN` | Mouse wheel down | | `KC.MS_UP` | Move mouse cursor up | diff --git a/kmk/modules/mouse_keys.py b/kmk/modules/mouse_keys.py index d4dd4b4..55dacab 100644 --- a/kmk/modules/mouse_keys.py +++ b/kmk/modules/mouse_keys.py @@ -28,6 +28,14 @@ class MouseKeys(Module): names=('MB_RMB',), code=2, ) + make_mouse_key( + names=('MB_BTN4',), + code=8, + ) + make_mouse_key( + names=('MB_BTN5',), + code=16, + ) make_key( names=('MW_UP',), on_press=self._mw_up_press,