diff --git a/build.yaml b/build.yaml index cc5c25f..dd323f3 100644 --- a/build.yaml +++ b/build.yaml @@ -14,4 +14,4 @@ --- include: - board: nice_nano - shield: eek + shield: absolem diff --git a/config/boards/shields/absolem/Kconfig.defconfig b/config/boards/shields/absolem/Kconfig.defconfig new file mode 100644 index 0000000..2beb62c --- /dev/null +++ b/config/boards/shields/absolem/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_ABSOLEM + +config ZMK_KEYBOARD_NAME + default "Absolem" + +endif diff --git a/config/boards/shields/absolem/Kconfig.shield b/config/boards/shields/absolem/Kconfig.shield new file mode 100644 index 0000000..5c194b3 --- /dev/null +++ b/config/boards/shields/absolem/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_ABSOLEM + def_bool $(shields_list_contains,absolem) diff --git a/config/boards/shields/absolem/README.md b/config/boards/shields/absolem/README.md new file mode 100644 index 0000000..19397ea --- /dev/null +++ b/config/boards/shields/absolem/README.md @@ -0,0 +1,4 @@ +# zmk-config + +A ZMK-ized version of my keymap, using a custom Absolem PCB shield. +Huge thanks to @davidphilipbarr, who prepared a template for me, so I only had to tweak things here and there! diff --git a/config/boards/shields/absolem/absolem.conf b/config/boards/shields/absolem/absolem.conf new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/config/boards/shields/absolem/absolem.conf @@ -0,0 +1 @@ + diff --git a/config/boards/shields/absolem/absolem.keymap b/config/boards/shields/absolem/absolem.keymap new file mode 100644 index 0000000..ac7fb8f --- /dev/null +++ b/config/boards/shields/absolem/absolem.keymap @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include "hungarian.h" + + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + + bindings = < + &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp HU_Y &kp HU_AA + &kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O + &kp HU_Z &kp X &kp C &kp D &kp V &kp K &kp H &sl 1 &sl 2 &kp HU_EE + &mt LCTL TAB < 3 SPACE &mt LC(LS(LALT)) RET &sk LSFT < 4 BKSP &mt LGUI ESC + >; + }; + + + + sym_layer { + + bindings = < + &kp HU_MORE &kp HU_RCBR &kp HU_RBKT &kp HU_RPRN &kp HU_BSLS &kp HU_TILD &kp HU_CIRC &kp HU_PARA &kp HU_EURO &kp HU_AT + &kp HU_LESS &kp HU_LCBR &kp HU_LBKT &kp HU_LPRN &kp HU_SLSH &kp HU_PERC &kp HU_ASTR &kp HU_RING &kp HU_COLN &kp HU_SCLN + &kp HU_HASH &kp HU_DLR &kp HU_QST &kp HU_EXLM &kp HU_PIPE &kp HU_AMPR &kp HU_EQL &trans &kp HU_PLUS &kp HU_GRV + &kp HU_UNDS &kp HU_QUOT &kp HU_DQOT &kp HU_DOT &kp HU_COMM &kp HU_MINS + >; + }; + + + + msc_layer { + + bindings = < + &trans &kp HU_UEE &kp HU_UE &kp HU_UU &trans &trans &trans &trans &trans &trans + &kp HU_II &kp HU_OEE &kp HU_OE &kp HU_OO &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp HU_UNDS &kp HU_QUOT &kp HU_DQOT &kp HU_DOT &kp HU_COMM &kp HU_MINS + >; + }; + + + + nav_layer { + + bindings = < + &kp K_MUTE &kp K_PREV &kp K_PP &kp K_NEXT &kp K_VOL_UP &none &kp PG_UP &kp SPACE &kp PG_DN &kp INS + &sk LGUI &sk LALT &sk LSFT &sk LCTL &kp K_VOL_DN &kp K_APP &kp LEFT &kp UP &kp RIGHT &kp TAB + &kp LC(HU_Z) &kp LC(X) &kp LC(C) &kp LC(D) &kp LC(V) &none &kp HOME &kp DOWN &kp END &kp RET + &trans &trans &trans &kp DEL &kp BKSP &kp ESC + >; + }; + + + + num_layer { + + bindings = < + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp HU_MINS &kp HU_7 &kp HU_8 &kp HU_9 &kp BKSP + &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp HU_0 &kp HU_4 &kp HU_5 &kp HU_6 &kp HU_DOT + &kp F11 &kp F12 &kp F13 &kp PRINTSCREEN &kp PAUSE_BREAK &kp HU_PLUS &kp HU_1 &kp HU_2 &kp HU_3 &kp HU_COMM + &kp TAB &kp SPACE &kp RET &trans &trans &trans + >; + }; + + + }; +}; \ No newline at end of file diff --git a/config/boards/shields/absolem/absolem.overlay b/config/boards/shields/absolem/absolem.overlay new file mode 100644 index 0000000..c12f05d --- /dev/null +++ b/config/boards/shields/absolem/absolem.overlay @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <5>; + rows = <8>; + + map = < +RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) +RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) +RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) + RC(3,2) RC(3,1) RC(3,0) RC(7,0) RC(7,1) RC(7,2) + >; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + + + + col-gpios + = <&pro_micro_d 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 8 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 7 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 6 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; \ No newline at end of file diff --git a/config/boards/shields/absolem/hungarian.h b/config/boards/shields/absolem/hungarian.h new file mode 100644 index 0000000..93170fc --- /dev/null +++ b/config/boards/shields/absolem/hungarian.h @@ -0,0 +1,112 @@ +// copied from QMK, then adapted for ZMK by MrZealot +// original copyright notice below + +/* Copyright 2018 fuge + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef KEYMAP_HUNGARIAN +#define KEYMAP_HUNGARIAN + +// basic letters +#define HU_Z (Y) +#define HU_Y (Z) + +// num row +#define HU_0 (GRAVE) +#define HU_1 (N1) +#define HU_2 (N2) +#define HU_3 (N3) +#define HU_4 (N4) +#define HU_5 (N5) +#define HU_6 (N6) +#define HU_7 (N7) +#define HU_8 (N8) +#define HU_9 (N9) +#define HU_OE (N0) // ö + +#define HU_UE (MINUS) // ü +#define HU_OO (EQUAL) // ó + +// q row +#define HU_OEE (LBKT) // ő +#define HU_UU (RBKT) // ú + +// a row +#define HU_EE (SCLN) // é +#define HU_AA (QUOT) // á +#define HU_UEE (NON_US_HASH) // ű + +#define HU_MINS (SLASH) // - + +#define HU_DOT (DOT) // . +#define HU_COMM (COMMA) // , + +// shifted characters +// num row +#define HU_PARA (LS(HU_0)) // § +#define HU_QUOT (LS(HU_1)) // ' +#define HU_DQOT (LS(HU_2)) // " +#define HU_PLUS (LS(HU_3)) // + +#define HU_EXLM (LS(HU_4)) // ! +#define HU_PERC (LS(HU_5)) // % +#define HU_SLSH (LS(HU_6)) // / +#define HU_EQL (LS(HU_7)) // = +#define HU_LPRN (LS(HU_8)) // ( +#define HU_RPRN (LS(HU_9)) // ) + +// í,y row +#define HU_II (NON_US_BACKSLASH) // í +#define HU_QST (LS(HU_COMM)) // ? +#define HU_COLN (LS(HU_DOT)) // : +#define HU_UNDS (LS(HU_MINS)) // _ + +// Alt Gr'd characters +// num row +#define HU_TILD (RA(HU_1)) // ~ +//#define HU_?? (RA(HU_2)) // ˇ (proper name?) +#define HU_CIRC (RA(HU_3)) // ^ +#define HU_BRV (RA(HU_4)) // ˘ +#define HU_RING (RA(HU_5)) // ° +//#define HU_?? (RA(HU_6)) // ˛ (proper name?) +#define HU_GRV (RA(HU_7)) // ` +//#define HU_?? (RA(HU_8)) // ˙ (proper name?) +#define HU_ACUT (RA(HU_9)) // ´ + +// q row +#define HU_BSLS (RA(Q)) // \ backslash +#define HU_PIPE (RA(W)) // | +#define HU_DIV (RA(HU_OEE)) // ÷ +#define HU_CRSS (RA(HU_UU)) // × +#define HU_EURO (RA(U)) // € + +// a row +#define HU_LBKT (RA(F)) // [ +#define HU_RBKT (RA(G)) // ] +#define HU_DLR (RA(HU_EE)) // $ +#define HU_SS (RA(HU_AA)) // ß + +// í,y row +#define HU_LESS (RA(HU_II)) // < +#define HU_MORE (RA(HU_Y)) // > +#define HU_HASH (RA(X)) // # +#define HU_AMPR (RA(C)) // & +#define HU_AT (RA(V)) // @ +#define HU_LCBR (RA(B))// { +#define HU_RCBR (RA(N)) // } +#define HU_SCLN (RA(HU_COMM)) // ; +#define HU_ASTR (RA(HU_MINS)) // * + +#endif \ No newline at end of file diff --git a/config/eek.conf b/config/eek.conf deleted file mode 100644 index e69de29..0000000 diff --git a/config/eek.keymap b/config/eek.keymap deleted file mode 100644 index f54dc01..0000000 --- a/config/eek.keymap +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include -#include -#include -#include - -/ { - keymap { - compatible = "zmk,keymap"; - - default { -// -------------------------------------------------------------------------------------------------------------------------------------------------------------------- -// Q | W | E | R | T | | Y | U | I | O | P | -// A | S | D | F | G | | H | J | K | L | ; | -// Lsft/Z| X | C | V | B | | N | M | , | . |Rsft//| -// | LCTL | Bspc/LMOD | SPC | | Del/Num | Ent | Sym | - bindings = < - &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P - &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI - &mt LSHFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RSHFT FSLH - &kp LCTRL &mt LGUI BSPC &kp SPACE < 1 DEL &kp RET &mo 2 - >; - }; - numbers { -// -------------------------------------------------------------------------------------------------------------------------------------------------------------------- -// 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | -// TAB | BT_PRV | BT_NXT | VOL-| VOL+| | < | v | ∧ | > | ' | -// Lsft| BT_SEL0| BT_CLR | MUTE| | | HOME| END | PGUP| PGDN| Rsft| -// | LCTL | LMOD| LALT | | Num | | BL-reset | - bindings = < - &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 - &kp TAB &bt BT_PRV &bt BT_NXT &kp C_VOL_DN &kp C_VOL_UP &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp SQT - &kp LSHFT &bt BT_SEL 0 &bt BT_CLR &kp C_MUTE &none &kp HOME &kp END &kp PG_UP &kp PG_DN &kp RSHFT - &kp LCTRL &kp LGUI &kp LALT &trans &none &bootloader - >; - }; - symbols { -// -------------------------------------------------------------------------------------------------------------------------------------------------------------------- -// ESC | F1 | F2 | F3 | F4 | | OUT_USB | OUT_BLE | | = | - | -// CAPS| F5 | F6 | F7 | F8 | | [ | ] | | ` | \ | -// LSFT| F9 | F10 | F11 | F12 | | | | | | RSFT | -// | LCTL | LMOD| LALT | | RESET | | SYM | - bindings = < - &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &out OUT_USB &out OUT_BLE &none &kp EQUAL &kp MINUS - &kp CAPS &kp F5 &kp F6 &kp F7 &kp F8 &kp LBKT &kp RBKT &none &kp GRAVE &kp BSLH - &kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &kp RSHFT - &kp LCTRL &kp LGUI &kp LALT &reset &none &trans - >; - }; - }; -}; \ No newline at end of file