Refactor dtsi files
This commit is contained in:
parent
7e632e223a
commit
3fda0cc152
4 changed files with 115 additions and 76 deletions
|
@ -1,6 +1,5 @@
|
||||||
#include <behaviors.dtsi>
|
#include <behaviors.dtsi>
|
||||||
#include <dt-bindings/zmk/keys.h>
|
#include <dt-bindings/zmk/keys.h>
|
||||||
#include <dt-bindings/zmk/mouse.h>
|
|
||||||
|
|
||||||
#define XXX &none
|
#define XXX &none
|
||||||
#define ___ &trans
|
#define ___ &trans
|
||||||
|
@ -14,6 +13,10 @@
|
||||||
#define FN 4
|
#define FN 4
|
||||||
#define UC 5
|
#define UC 5
|
||||||
|
|
||||||
|
#include "mouse.dtsi"
|
||||||
|
#include "unicode.dtsi"
|
||||||
|
#include "combos.dtsi"
|
||||||
|
|
||||||
/* create stubs if undefined */
|
/* create stubs if undefined */
|
||||||
#if !defined EXTRA_MID
|
#if !defined EXTRA_MID
|
||||||
#define EXTRA_MID
|
#define EXTRA_MID
|
||||||
|
@ -31,11 +34,11 @@ TODOs and ISSUES
|
||||||
* tap-only combos not yet possible (#544), prevents rapid chaining of HRMs
|
* tap-only combos not yet possible (#544), prevents rapid chaining of HRMs
|
||||||
* &bootloader doesn't work with Planck_rev6 (#1086)
|
* &bootloader doesn't work with Planck_rev6 (#1086)
|
||||||
* no global-quick-tap for combos
|
* no global-quick-tap for combos
|
||||||
* mouse wheel keys not yet implemented (#319), using up/down for now
|
|
||||||
* mod-taps getting stuck with heterogenous combo-terms (#986, #905)
|
* mod-taps getting stuck with heterogenous combo-terms (#986, #905)
|
||||||
* sticky-hold swallows OS shift when typing quickly, using sticky-tap for now
|
* sticky-hold swallows OS shift when typing quickly, using sticky-tap for now
|
||||||
* native sleep key doesn't work with windows (#1077), using sleep-macro for now
|
* native sleep key doesn't work with windows (#1077), using sleep-macro for now
|
||||||
* no native unicode support (#232), using preprocessor workaround instead
|
* no native unicode support (#232), using preprocessor workaround instead
|
||||||
|
* no native mouse keys (#319), using mouse PR #778
|
||||||
* mod-morph doesn't swallow mod (#686), using masked-mod PR #1114
|
* mod-morph doesn't swallow mod (#686), using masked-mod PR #1114
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -56,9 +59,6 @@ TODOs and ISSUES
|
||||||
/* root node */
|
/* root node */
|
||||||
/ {
|
/ {
|
||||||
|
|
||||||
#include "unicode.dtsi"
|
|
||||||
#include "combos.dtsi"
|
|
||||||
|
|
||||||
macros {
|
macros {
|
||||||
// Windows sleep key
|
// Windows sleep key
|
||||||
win_sleep: win_sleep {
|
win_sleep: win_sleep {
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
layers = <LAYERS>; \
|
layers = <LAYERS>; \
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
combos {
|
combos {
|
||||||
|
|
||||||
compatible = "zmk,combos";
|
compatible = "zmk,combos";
|
||||||
|
|
||||||
/* Capsword */
|
/* Capsword */
|
||||||
|
@ -70,3 +70,4 @@ combos {
|
||||||
COMBO(pipe, &kp PIPE, RM3 RB3, DEF NUM, COMBO_TERM_V)
|
COMBO(pipe, &kp PIPE, RM3 RB3, DEF NUM, COMBO_TERM_V)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
35
config/mouse.dtsi
Normal file
35
config/mouse.dtsi
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#include <dt-bindings/zmk/mouse.h>
|
||||||
|
|
||||||
|
&mmv {
|
||||||
|
time-to-max-speed-ms = <1500>; // 300
|
||||||
|
acceleration-exponent = <1>;
|
||||||
|
delay-ms = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&mwh {
|
||||||
|
time-to-max-speed-ms = <5000>; // 300
|
||||||
|
acceleration-exponent = <1>; // 0
|
||||||
|
delay-ms = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define U_MOUSE_MOVE_MAX 1250
|
||||||
|
#define U_MOUSE_SCROLL_MAX 100
|
||||||
|
|
||||||
|
#undef MOVE_UP
|
||||||
|
#undef MOVE_DOWN
|
||||||
|
#undef MOVE_LEFT
|
||||||
|
#undef MOVE_RIGHT
|
||||||
|
#define MOVE_UP MOVE_VERT(-U_MOUSE_MOVE_MAX)
|
||||||
|
#define MOVE_DOWN MOVE_VERT(U_MOUSE_MOVE_MAX)
|
||||||
|
#define MOVE_LEFT MOVE_HOR(-U_MOUSE_MOVE_MAX)
|
||||||
|
#define MOVE_RIGHT MOVE_HOR(U_MOUSE_MOVE_MAX)
|
||||||
|
|
||||||
|
#undef SCROLL_UP
|
||||||
|
#undef SCROLL_DOWN
|
||||||
|
#undef SCROLL_LEFT
|
||||||
|
#undef SCROLL_RIGHT
|
||||||
|
#define SCROLL_UP SCROLL_VERT(U_MOUSE_SCROLL_MAX)
|
||||||
|
#define SCROLL_DOWN SCROLL_VERT(-U_MOUSE_SCROLL_MAX)
|
||||||
|
#define SCROLL_LEFT SCROLL_HOR(-U_MOUSE_SCROLL_MAX)
|
||||||
|
#define SCROLL_RIGHT SCROLL_HOR(U_MOUSE_SCROLL_MAX)
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
UC_MODMORPH(uc_ ## NAME, &uc_lower_ ## NAME, &uc_upper_ ## NAME)
|
UC_MODMORPH(uc_ ## NAME, &uc_lower_ ## NAME, &uc_upper_ ## NAME)
|
||||||
|
|
||||||
/* User definitions */
|
/* User definitions */
|
||||||
|
/ {
|
||||||
|
|
||||||
UNICODE_SINGLE( alpha, N0, N3, B, N1)
|
UNICODE_SINGLE( alpha, N0, N3, B, N1)
|
||||||
UNICODE_SINGLE( beta, N0, N3, B, N2)
|
UNICODE_SINGLE( beta, N0, N3, B, N2)
|
||||||
UNICODE_PAIR( gamma, N0, N3, B, N3, N0, N3, N9, N3)
|
UNICODE_PAIR( gamma, N0, N3, B, N3, N0, N3, N9, N3)
|
||||||
|
@ -67,3 +69,4 @@ UNICODE_PAIR( oe, N0, N0, F, N6, N0, N0, D, N6)
|
||||||
UNICODE_PAIR( ue, N0, N0, F, C, N0, N0, D, C)
|
UNICODE_PAIR( ue, N0, N0, F, C, N0, N0, D, C)
|
||||||
UNICODE_SINGLE( eszett, N0, N0, D, F)
|
UNICODE_SINGLE( eszett, N0, N0, D, F)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue