mirror of
https://github.com/ClaytonWWilson/miryoku_zmk.git
synced 2025-12-13 09:48:47 +00:00
Add mousekeys buttons 2 and 3
This commit is contained in:
parent
fa3258eba2
commit
47a3e34b21
@ -7,9 +7,6 @@
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
#include <dt-bindings/zmk/outputs.h>
|
||||
#include <dt-bindings/zmk/ext_power.h>
|
||||
#if defined (MIRYOKU_KLUDGE_MOUSEKEYSPR)
|
||||
#include <dt-bindings/zmk/mouse.h>
|
||||
#endif
|
||||
|
||||
#include "miryoku.h"
|
||||
|
||||
@ -76,6 +73,8 @@
|
||||
|
||||
#if defined (MIRYOKU_KLUDGE_MOUSEKEYSPR)
|
||||
#include "miryoku_kludge_mousekeyspr.dtsi"
|
||||
#else
|
||||
#include "miryoku_mousekeys.dtsi"
|
||||
#endif
|
||||
|
||||
#if defined (MIRYOKU_KLUDGE_THUMBCOMBOS)
|
||||
|
||||
@ -15,44 +15,10 @@
|
||||
|
||||
#define U_TAPPING_TERM 200
|
||||
|
||||
#if defined (MIRYOKU_CLIPBOARD_FUN)
|
||||
#define U_RDO &kp K_AGAIN
|
||||
#define U_PST &kp K_PASTE
|
||||
#define U_CPY &kp K_COPY
|
||||
#define U_CUT &kp K_CUT
|
||||
#define U_UND &kp K_UNDO
|
||||
#elif defined (MIRYOKU_CLIPBOARD_MAC)
|
||||
#define U_RDO &kp LS(LG(Z))
|
||||
#define U_PST &kp LG(V)
|
||||
#define U_CPY &kp LG(C)
|
||||
#define U_CUT &kp LG(X)
|
||||
#define U_UND &kp LG(Z)
|
||||
#elif defined (MIRYOKU_CLIPBOARD_WIN)
|
||||
#define U_RDO &kp LC(Y)
|
||||
#define U_PST &kp LC(V)
|
||||
#define U_CPY &kp LC(C)
|
||||
#define U_CUT &kp LC(X)
|
||||
#define U_UND &kp LC(Z)
|
||||
#else
|
||||
#define U_RDO &kp K_AGAIN
|
||||
#define U_PST &kp LS(INS)
|
||||
#define U_CPY &kp LC(INS)
|
||||
#define U_CUT &kp LS(DEL)
|
||||
#define U_UND &kp K_UNDO
|
||||
#endif
|
||||
#include "miryoku_clipboard.h"
|
||||
|
||||
#if defined (MIRYOKU_KLUDGE_MOUSEKEYSPR)
|
||||
#include "miryoku_kludge_mousekeyspr.h"
|
||||
#else
|
||||
#define U_BTN1 &kp KP_N5
|
||||
#define U_BTN2 U_NU
|
||||
#define U_BTN3 U_NU
|
||||
#define U_MS_D &kp KP_N2
|
||||
#define U_MS_L &kp KP_N4
|
||||
#define U_MS_R &kp KP_N6
|
||||
#define U_MS_U &kp KP_N8
|
||||
#define U_WH_D U_NU
|
||||
#define U_WH_L U_NU
|
||||
#define U_WH_R U_NU
|
||||
#define U_WH_U U_NU
|
||||
#include "miryoku_mousekeys.h"
|
||||
#endif
|
||||
|
||||
30
miryoku/miryoku_clipboard.h
Normal file
30
miryoku/miryoku_clipboard.h
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright 2022 Manna Harbour
|
||||
// https://github.com/manna-harbour/miryoku
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined (MIRYOKU_CLIPBOARD_FUN)
|
||||
#define U_RDO &kp K_AGAIN
|
||||
#define U_PST &kp K_PASTE
|
||||
#define U_CPY &kp K_COPY
|
||||
#define U_CUT &kp K_CUT
|
||||
#define U_UND &kp K_UNDO
|
||||
#elif defined (MIRYOKU_CLIPBOARD_MAC)
|
||||
#define U_RDO &kp LS(LG(Z))
|
||||
#define U_PST &kp LG(V)
|
||||
#define U_CPY &kp LG(C)
|
||||
#define U_CUT &kp LG(X)
|
||||
#define U_UND &kp LG(Z)
|
||||
#elif defined (MIRYOKU_CLIPBOARD_WIN)
|
||||
#define U_RDO &kp LC(Y)
|
||||
#define U_PST &kp LC(V)
|
||||
#define U_CPY &kp LC(C)
|
||||
#define U_CUT &kp LC(X)
|
||||
#define U_UND &kp LC(Z)
|
||||
#else
|
||||
#define U_RDO &kp K_AGAIN
|
||||
#define U_PST &kp LS(INS)
|
||||
#define U_CPY &kp LC(INS)
|
||||
#define U_CUT &kp LS(DEL)
|
||||
#define U_UND &kp K_UNDO
|
||||
#endif
|
||||
@ -1,6 +1,10 @@
|
||||
// Copyright 2022 Manna Harbour
|
||||
// https://github.com/manna-harbour/miryoku
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <dt-bindings/zmk/mouse.h>
|
||||
|
||||
#define U_MOUSE_MOVE_MAX 1250
|
||||
#define U_MOUSE_MOVE_EXPONENT 1
|
||||
#define U_MOUSE_MOVE_TIME 1500
|
||||
|
||||
10
miryoku/miryoku_mousekeys.dtsi
Normal file
10
miryoku/miryoku_mousekeys.dtsi
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright 2022 Manna Harbour
|
||||
// https://github.com/manna-harbour/miryoku
|
||||
|
||||
/ {
|
||||
macros {
|
||||
ZMK_MACRO(u_macro_btn1, wait-ms = <0>; bindings = <&kp KP_SLASH &kp KP_N5>;)
|
||||
ZMK_MACRO(u_macro_btn2, wait-ms = <0>; bindings = <&kp KP_MINUS &kp KP_N5>;)
|
||||
ZMK_MACRO(u_macro_btn3, wait-ms = <0>; bindings = <&kp KP_ASTERISK &kp KP_N5>;)
|
||||
};
|
||||
};
|
||||
16
miryoku/miryoku_mousekeys.h
Normal file
16
miryoku/miryoku_mousekeys.h
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2022 Manna Harbour
|
||||
// https://github.com/manna-harbour/miryoku
|
||||
|
||||
#pragma once
|
||||
|
||||
#define U_BTN1 &u_macro_btn1
|
||||
#define U_BTN2 &u_macro_btn2
|
||||
#define U_BTN3 &u_macro_btn3
|
||||
#define U_MS_D &kp KP_N2
|
||||
#define U_MS_L &kp KP_N4
|
||||
#define U_MS_R &kp KP_N6
|
||||
#define U_MS_U &kp KP_N8
|
||||
#define U_WH_D U_NU
|
||||
#define U_WH_L U_NU
|
||||
#define U_WH_R U_NU
|
||||
#define U_WH_U U_NU
|
||||
@ -344,7 +344,7 @@ Examples include ~CONFIG_ZMK_SLEEP=y~, ~CONFIG_ZMK_DISPLAY=y~, ~CONFIG_BT_CTLR_T
|
||||
|
||||
**** Mouse Keys on Host
|
||||
|
||||
The Mouse and Button layers use [[https://en.wikipedia.org/wiki/Mouse_keys][mouse keys on the host]]. Middle button, right button, and scroll are not supported.
|
||||
The Mouse and Button layers use [[https://en.wikipedia.org/wiki/Mouse_keys][mouse keys on the host]]. Scroll is not supported.
|
||||
|
||||
- [[https://linuxreviews.org/HOWTO_use_the_numeric_keyboard_keys_as_mouse_in_XOrg][X11]]
|
||||
- [[https://support.apple.com/en-au/guide/mac-help/mh27469/mac][Mac]]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user