From b77ac77b1bd509acd995f2a0166b742f2e6775ed Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Wed, 10 Jan 2024 00:48:00 -0500 Subject: [PATCH] slicemk: boards: add ansi104 converter shield (to squash 2024-01-15) --- .../shields/slicemk_usbconv/Kconfig.shield | 3 ++ .../slicemk_usbconv_ansi104.overlay | 30 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 app/boards/shields/slicemk_usbconv/slicemk_usbconv_ansi104.overlay diff --git a/app/boards/shields/slicemk_usbconv/Kconfig.shield b/app/boards/shields/slicemk_usbconv/Kconfig.shield index 5aeac03b462b..2db095c8d973 100644 --- a/app/boards/shields/slicemk_usbconv/Kconfig.shield +++ b/app/boards/shields/slicemk_usbconv/Kconfig.shield @@ -1,2 +1,5 @@ +config SHIELD_SLICEMK_USBCONV_ANSI104 + def_bool $(shields_list_contains,slicemk_usbconv_ansi104) + config SHIELD_SLICEMK_USBCONV_ERGODOX def_bool $(shields_list_contains,slicemk_usbconv_ergodox) diff --git a/app/boards/shields/slicemk_usbconv/slicemk_usbconv_ansi104.overlay b/app/boards/shields/slicemk_usbconv/slicemk_usbconv_ansi104.overlay new file mode 100644 index 000000000000..45a39d2249b9 --- /dev/null +++ b/app/boards/shields/slicemk_usbconv/slicemk_usbconv_ansi104.overlay @@ -0,0 +1,30 @@ +#include +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + // Specify placeholder button for consistency with ErgoDox Wireless. + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + input-gpios = <&gpio0 28 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <1>; + rows = <256>; + map = < +RC(0,0) +CV(ESCAPE) CV(F1) CV(F2) CV(F3) CV(F4) CV(F5) CV(F6) CV(F7) CV(F8) CV(F9) CV(F10) CV(F11) CV(F12) CV(PRINTSCREEN) CV(SCROLLLOCK) CV(PAUSE_BREAK) +CV(GRAVE) CV(NUMBER_1) CV(NUMBER_2) CV(NUMBER_3) CV(NUMBER_4) CV(NUMBER_5) CV(NUMBER_6) CV(NUMBER_7) CV(NUMBER_8) CV(NUMBER_9) CV(NUMBER_0) CV(MINUS) CV(EQUAL) CV(BACKSPACE) CV(INSERT) CV(HOME) CV(PAGE_UP) CV(KP_NUMLOCK) CV(KP_DIVIDE) CV(KP_MULTIPLY) CV(KP_MINUS) +CV(TAB) CV(Q) CV(W) CV(E) CV(R) CV(T) CV(Y) CV(U) CV(I) CV(O) CV(P) CV(LEFT_BRACKET) CV(RIGHT_BRACKET) CV(BACKSLASH) CV(DELETE) CV(END) CV(PAGE_DOWN) CV(KP_NUMBER_7) CV(KP_NUMBER_8) CV(KP_NUMBER_9) CV(KP_PLUS) +CV(CAPSLOCK) CV(A) CV(S) CV(D) CV(F) CV(G) CV(H) CV(J) CV(K) CV(L) CV(SEMICOLON) CV(SINGLE_QUOTE) CV(RETURN) CV(KP_NUMBER_4) CV(KP_NUMBER_5) CV(KP_NUMBER_6) +CV(LEFT_SHIFT) CV(Z) CV(X) CV(C) CV(V) CV(B) CV(N) CV(M) CV(COMMA) CV(PERIOD) CV(SLASH) CV(RIGHT_SHIFT) CV(UP_ARROW) CV(KP_NUMBER_1) CV(KP_NUMBER_2) CV(KP_NUMBER_3) CV(KP_ENTER) +CV(LEFT_CONTROL) CV(LEFT_GUI) CV(LEFT_ALT) CV(SPACE) CV(RIGHT_ALT) CV(RIGHT_GUI) CV(K_APPLICATION) CV(RIGHT_CONTROL) CV(LEFT_ARROW) CV(DOWN_ARROW) CV(RIGHT_ARROW) CV(KP_NUMBER_0) CV(KP_DOT) + >; + }; +};