diff options
| author | 2025-09-12 16:10:56 -0700 | |
|---|---|---|
| committer | 2025-09-12 16:25:21 -0700 | |
| commit | 3f936d71716abbb32a1fdcae904793209eaa4a8e (patch) | |
| tree | 87aa6f1e3707e212e99a59e838ea75bf2b44d784 | |
| parent | 7371835283a2c741a5180b453db2b89dad171dff (diff) | |
| download | my-keymaps-3f936d71716abbb32a1fdcae904793209eaa4a8e.tar.gz my-keymaps-3f936d71716abbb32a1fdcae904793209eaa4a8e.zip | |
voyager: Add mouse support
- Enable auto mouse mode. This is necessary so that when I move the trackball it
automatically switches to the layer with the mouse keys.
- Set a long time out to switch off the mouse layer. Since I'm just getting used
to this I'll start with a long time out and then tweak it as I like. 1000 was
the highest recommended value according to the documentation.
- Add a mouse button layer to my layout. This only has the mouse buttons 1 and 2
for now, but I'll adjust as I try it out. It also has no way to access it
other than with the auto mouse mode feature.
- Add ‘pointing_device_init_user’ function. This function must call
‘set_auto_mouse_enable’ because the auto mouse feature can be toggled on and
off at runtime and it's off by default. This enables it when the pointing
device is initialized. It also calls the ‘set_auto_mouse_layer’, which can
also be done in the ‘rules.mk’ file, but here I can make sure that what I
define as the mouse layer will always be what's called, even if the layer
numbering changes.
- Enable the pointing device feature, set it to ‘navigator_trackball’, which is
the ZSA trackball that attaches to the Voyager. This requires the ZSA fork of
QMK to work, since the navigator device hasn't been pulled into the main QMK
repository yet.
- Enable the mouse key feature. This is necessary to be able to use mouse keys
such as the mouse buttons 1 and 2.
| -rw-r--r-- | keyboards/zsa/voyager/keymaps/ryuk/config.h | 4 | ||||
| -rw-r--r-- | keyboards/zsa/voyager/keymaps/ryuk/keymap.c | 12 | ||||
| -rw-r--r-- | keyboards/zsa/voyager/keymaps/ryuk/rules.mk | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/keyboards/zsa/voyager/keymaps/ryuk/config.h b/keyboards/zsa/voyager/keymaps/ryuk/config.h new file mode 100644 index 0000000..09e36e8 --- /dev/null +++ b/keyboards/zsa/voyager/keymaps/ryuk/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_TIME 1000 diff --git a/keyboards/zsa/voyager/keymaps/ryuk/keymap.c b/keyboards/zsa/voyager/keymaps/ryuk/keymap.c index f76e8d7..2d52d7e 100644 --- a/keyboards/zsa/voyager/keymaps/ryuk/keymap.c +++ b/keyboards/zsa/voyager/keymaps/ryuk/keymap.c @@ -63,5 +63,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, C(S(KC_TAB)), C(KC_TAB), _______, _______, _______, _______, _______, _______, _______ ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MS_BTN1, _______, MS_BTN2, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), // clang-format on }; + +void pointing_device_init_user(void) { + set_auto_mouse_layer(3); + set_auto_mouse_enable(true); +} diff --git a/keyboards/zsa/voyager/keymaps/ryuk/rules.mk b/keyboards/zsa/voyager/keymaps/ryuk/rules.mk new file mode 100644 index 0000000..da2cc70 --- /dev/null +++ b/keyboards/zsa/voyager/keymaps/ryuk/rules.mk @@ -0,0 +1,3 @@ +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = navigator_trackball +MOUSEKEY_ENABLE = yes |
