From 9a09eb14af7be29078d668ea492f2b2c78022d19 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 27 May 2020 00:48:03 -0400 Subject: Initial composite kscan driver. * For now, to be used for FrankenKyria, where both matrix halves will be attached to the same MCU, but should be a stepping stone to proper split support once we have a kscan driver over a split transport. * Implement multiple instances for mock kscan driver. --- boards/native_posix.overlay | 47 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) (limited to 'boards/native_posix.overlay') diff --git a/boards/native_posix.overlay b/boards/native_posix.overlay index 1d692d4..9d92bee 100644 --- a/boards/native_posix.overlay +++ b/boards/native_posix.overlay @@ -7,9 +7,25 @@ zmk,keymap = &keymap0; }; - kscan0: kscan { + kscan0: kscan_0 { + compatible = "zmk,kscan-composite"; + label = "KSCAN_COMP"; + rows = <2>; + columns = <4>; + + left: left { + kscan = <&left_hand>; + }; + + right: right { + kscan = <&right_hand>; + column-offset = <2>; + }; + }; + + left_hand: kscan_1 { compatible = "zmk,kscan-mock"; - label = "KSCAN_MOCK0"; + label = "KSCAN_LEFT"; rows = <2>; columns = <2>; @@ -17,6 +33,15 @@ // events = ; }; + right_hand: kscan_2 { + compatible = "zmk,kscan-mock"; + label = "KSCAN_RIGHT"; + + rows = <2>; + columns = <2>; + events = ; + }; + keymap0: keymap { compatible = "zmk,keymap"; label ="Default keymap"; @@ -29,20 +54,26 @@ default: layer_0 { label = "DEFAULT"; keys = - < - KC_A MT(MOD_LSFT, KC_B) - KC_C KC_D - >; + < + KC_A MT(MOD_LSFT, KC_B) KC_C KC_D + KC_E KC_F KC_G KC_H + >; }; lower: layer_1 { label = "LOWER"; - keys = ; + keys = < + KC_A KC_B KC_C KC_D + KC_E KC_F KC_G KC_H + >; }; raise: layer_2 { label = "RAISE"; - keys = ; + keys = < + KC_E KC_F KC_G KC_H + KC_A KC_B KC_C KC_D + >; }; }; }; -- cgit v1.2.3