feat: switch to mouse key layer when moving pointing device (auto mouse)

This commit is contained in:
Orangerot 2025-07-20 13:03:56 +02:00
parent 9ca1747162
commit f6a1b8c1e5
2 changed files with 15 additions and 1 deletions

View file

@ -6,3 +6,6 @@
#define POINTING_DEVICE_INVERT_X
#define ANALOG_JOYSTICK_WEIGHTS {0,0,0,0,0,0,0,0,0,0,0,15,15,16,17,18,18,19,19,20,20,21,21,21,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,25,25,25,26,26,26,27,28,28,29,29,30,31,32,33,34,35,36,37,38,40,41,43,44,46,48,49,51,53,56,58,60,62,65,68,70,73,76,79,82,85,89,92,96,100}
#define POINTING_DEVICE_AUTO_MOUSE_ENABLE
#define AUTO_MOUSE_TIME 1500

View file

@ -21,6 +21,11 @@ and the number & navigation block combo, so you never have to move your hands fr
Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
*/
void pointing_device_init_user(void) {
set_auto_mouse_layer(6); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of <mouse_layer>
set_auto_mouse_enable(true); // always required before the auto mouse feature will work
}
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Bone2 (adapted)
@ -137,5 +142,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ ,
_______, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ ,
_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______
)
),
[6] = LAYOUT_ortho_4x12(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, MS_BTN3, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};