commit 09e869d0a3718c95ac50d455cc1e594bfd8de7af Author: XLE <38703509+tcaxle@users.noreply.github.com> Date: Thu Apr 13 10:08:55 2023 +0000 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e9d2db9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.keymap linguist-language=C + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..37cba72 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,5 @@ +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..feb55c8 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Keymap Editor Demo - Corne + +This is a customization of the ZMK config for the Corne keyboard with machine +readable layout and keymap definitions for use with my [keymap-editor] tool. + +**⚠️ If you aren't here to see how you can use my [keymap-editor] you would be +better off not forking this repository.** + +It's not that you _can't_ or are not welcome to, but as I made this is for +demonstration purposes I've never actually tested it on a corne keyboard. You're +just better off using the one that is provided in the ZMK repo. + +![Screenshot](screenshot.png) + + +[keymap-editor]:https://github.com/nickcoutsos/keymap-editor \ No newline at end of file diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..c39bb79 --- /dev/null +++ b/build.yaml @@ -0,0 +1,5 @@ +include: + - board: nice_nano_v2 + shield: corne_left + - board: nice_nano_v2 + shield: corne_right \ No newline at end of file diff --git a/config/corne.conf b/config/corne.conf new file mode 100644 index 0000000..974243c --- /dev/null +++ b/config/corne.conf @@ -0,0 +1,6 @@ +# Uncomment the following lines to enable the Corne RGB Underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y + +# Uncomment the following line to enable the Corne OLED Display +# CONFIG_ZMK_DISPLAY=y diff --git a/config/corne.json b/config/corne.json new file mode 100644 index 0000000..867124d --- /dev/null +++ b/config/corne.json @@ -0,0 +1,53 @@ +{ + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Tab", "row": 0, "col": 0, "x": 0, "y": 0.360 }, + { "label": "Q", "row": 0, "col": 1, "x": 1, "y": 0.360 }, + { "label": "W", "row": 0, "col": 2, "x": 2, "y": 0.110 }, + { "label": "E", "row": 0, "col": 3, "x": 3, "y": -0.015 }, + { "label": "R", "row": 0, "col": 4, "x": 4, "y": 0.110 }, + { "label": "T", "row": 0, "col": 5, "x": 5, "y": 0.235 }, + { "label": "Y", "row": 0, "col": 7, "x": 9, "y": 0.235 }, + { "label": "U", "row": 0, "col": 8, "x": 10, "y": 0.110 }, + { "label": "I", "row": 0, "col": 9, "x": 11, "y": -0.015 }, + { "label": "O", "row": 0, "col": 10, "x": 12, "y": 0.110 }, + { "label": "P", "row": 0, "col": 11, "x": 13, "y": 0.360 }, + { "label": "BSPC", "row": 0, "col": 12, "x": 14, "y": 0.360 }, + + { "label": "Ctrl", "row": 1, "col": 0, "x": 0, "y": 1.360 }, + { "label": "A", "row": 1, "col": 1, "x": 1, "y": 1.360 }, + { "label": "S", "row": 1, "col": 2, "x": 2, "y": 1.110 }, + { "label": "D", "row": 1, "col": 3, "x": 3, "y": 0.985 }, + { "label": "F", "row": 1, "col": 4, "x": 4, "y": 1.110 }, + { "label": "G", "row": 1, "col": 5, "x": 5, "y": 1.235 }, + { "label": "H", "row": 1, "col": 7, "x": 9, "y": 1.235 }, + { "label": "J", "row": 1, "col": 8, "x": 10, "y": 1.110 }, + { "label": "K", "row": 1, "col": 9, "x": 11, "y": 0.985 }, + { "label": "L", "row": 1, "col": 10, "x": 12, "y": 1.110 }, + { "label": ";", "row": 1, "col": 11, "x": 13, "y": 1.360 }, + { "label": "'", "row": 1, "col": 12, "x": 14, "y": 1.360 }, + + { "label": "LShift", "row": 2, "col": 0, "x": 0, "y": 2.360 }, + { "label": "Z", "row": 2, "col": 1, "x": 1, "y": 2.360 }, + { "label": "X", "row": 2, "col": 2, "x": 2, "y": 2.110 }, + { "label": "C", "row": 2, "col": 3, "x": 3, "y": 1.985 }, + { "label": "V", "row": 2, "col": 4, "x": 4, "y": 2.110 }, + { "label": "B", "row": 2, "col": 5, "x": 5, "y": 2.235 }, + { "label": "N", "row": 2, "col": 7, "x": 9, "y": 2.235 }, + { "label": "M", "row": 2, "col": 8, "x": 10, "y": 2.110 }, + { "label": ",", "row": 2, "col": 9, "x": 11, "y": 1.985 }, + { "label": ".", "row": 2, "col": 10, "x": 12, "y": 2.110 }, + { "label": "/", "row": 2, "col": 11, "x": 13, "y": 2.360 }, + { "label": "Esc", "row": 2, "col": 12, "x": 14, "y": 2.360 }, + + { "label": "GUI", "row": 3, "col": 3, "x": 3.48, "y": 3.13 }, + { "label": "LWR", "row": 3, "col": 4, "x": 3.48, "y": 3.13, "r": 15, "rx": 3.98, "ry": 7.63 }, + { "label": "SPC", "row": 3, "col": 5, "x": 3.48, "y": 2.63, "r": 30, "rx": 3.98, "ry": 7.63, "h": 1.5 }, + { "label": "ENT", "row": 3, "col": 7, "x": 10.52, "y": 2.63, "r": -30, "rx": 11.02, "ry": 7.63, "h": 1.5 }, + { "label": "RSE", "row": 3, "col": 8, "x": 10.52, "y": 3.13, "r": -15, "rx": 11.02, "ry": 7.63 }, + { "label": "ALT", "row": 3, "col": 9, "x": 10.52, "y": 3.13 } + ] + } + } +} diff --git a/config/corne.keymap b/config/corne.keymap new file mode 100644 index 0000000..22c559c --- /dev/null +++ b/config/corne.keymap @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +// dt-formatter: indent = " " +// dt-formatter: reindentMultilineIntegerCells = "dedent" + +/ { + behaviors { + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "HOMEROW_MODS"; + #binding-cells = <2>; + tapping-term-ms = <150>; + quick-tap-ms = <0>; + flavor = "tap-preferred"; + bindings = + <&kp>, + <&kp>; + }; + }; + + combos { + compatible = "zmk,combos"; + + tab { + bindings = <&trans>; + key-positions = <2 3>; + }; + + ctrl { + bindings = <&kp LCTRL>; + key-positions = <26 27>; + }; + + cmd { + bindings = <&kp LCMD>; + key-positions = <37 38>; + }; + + alt { + bindings = <&kp LEFT_ALT>; + key-positions = <39 40>; + }; + + shift { + bindings = <&kp LSHIFT>; + key-positions = <8 9>; + }; + + caps_word { + bindings = <&caps_word>; + key-positions = <17 18>; + }; + + delete { + bindings = <&kp DEL>; + key-positions = <32 33>; + }; + }; + + macros { + zed_em_kay: zed_em_kay { + compatible = "zmk,behavior-macro"; + label = "ZM_zed_em_kay"; + #binding-cells = <0>; + bindings = + <¯o_press>, + <&kp LSHFT>, + <¯o_tap>, + <&kp Z &kp M &kp K>, + <¯o_release>, + <&kp LSHFT>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + base { + bindings = < + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH + &kp LCTRL &hm LGUI A &hm LALT S &hm LCTRL D &hm LSHIFT F &kp G &kp H &hm RSHIFT J &hm RCTRL K &hm RALT L &hm RGUI SEMI &kp APOS + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC + &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT + >; + }; + + raise { + bindings = < + &trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &mo 3 &trans + >; + }; + + lower { + bindings = < + &trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &trans + &trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE + &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE + &trans &mo 3 &trans &trans &trans &trans + >; + }; + + both { + bindings = < + &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 3 &trans &trans &trans &trans &rgb_ug RGB_COLOR_HSB(0,60,50) + &trans &trans &trans &trans &trans &bt BT_SEL 1 &bt BT_SEL 4 &trans &trans &trans &trans &rgb_ug RGB_COLOR_HSB(120,60,50) + &trans &trans &trans &trans &trans &bt BT_SEL 2 &bt BT_CLR &trans &trans &trans &trans &rgb_ug RGB_COLOR_HSB(240,60,50) + &trans &trans &trans &trans &trans &trans + >; + }; + }; +}; \ No newline at end of file diff --git a/config/keymap.json b/config/keymap.json new file mode 100644 index 0000000..38e7d6d --- /dev/null +++ b/config/keymap.json @@ -0,0 +1,9 @@ +Hey. + +This file is deprecated. + +Are you attempting to use this with Nick Coutsos' keymap +editor (https://nickcoutsos.github.io/keymap-editor)? If +so, you can ignore or delete this file. If you are +attempting to use this with some other keymap editor, I +would encourage you to reconsider. diff --git a/config/west.yml b/config/west.yml new file mode 100644 index 0000000..379d291 --- /dev/null +++ b/config/west.yml @@ -0,0 +1,11 @@ +manifest: + remotes: + - name: zmkfirmware + url-base: https://github.com/zmkfirmware + projects: + - name: zmk + remote: zmkfirmware + revision: main + import: app/west.yml + self: + path: config diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..105873f Binary files /dev/null and b/screenshot.png differ