diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d74fb89 --- /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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3f6facc --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/.west +/bootloader +/modules +/tools +/zephyr +/zmk +/build diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..b444937 --- /dev/null +++ b/build.yaml @@ -0,0 +1,6 @@ +include: + - board: seeeduino_xiao_ble + shield: mnhttn_left + - board: seeeduino_xiao_ble + shield: mnhttn_right + diff --git a/config/boards/shields/mnhttn/Kconfig.defconfig b/config/boards/shields/mnhttn/Kconfig.defconfig new file mode 100644 index 0000000..a30a1e0 --- /dev/null +++ b/config/boards/shields/mnhttn/Kconfig.defconfig @@ -0,0 +1,22 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_MNHTTN_LEFT + +config ZMK_KEYBOARD_NAME + default "MNHTTN" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif + +if SHIELD_MNHTTN_LEFT || SHIELD_MNHTTN_RIGHT + +config ZMK_SPLIT + default y + +config ZMK_USB + default y + +endif diff --git a/config/boards/shields/mnhttn/Kconfig.shield b/config/boards/shields/mnhttn/Kconfig.shield new file mode 100644 index 0000000..0ecf484 --- /dev/null +++ b/config/boards/shields/mnhttn/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_MNHTTN_LEFT + def_bool $(shields_list_contains,mnhttn_left) + +config SHIELD_MNHTTN_RIGHT + def_bool $(shields_list_contains,mnhttn_right) diff --git a/config/boards/shields/mnhttn/mnhttn.conf b/config/boards/shields/mnhttn/mnhttn.conf new file mode 100644 index 0000000..e69de29 diff --git a/config/boards/shields/mnhttn/mnhttn.dtsi b/config/boards/shields/mnhttn/mnhttn.dtsi new file mode 100644 index 0000000..101d3cd --- /dev/null +++ b/config/boards/shields/mnhttn/mnhttn.dtsi @@ -0,0 +1,34 @@ +/* + x Copyright (c) 2022 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 = <10>; + rows = <4>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) + RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) + >; + }; + + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + }; +}; diff --git a/config/boards/shields/mnhttn/mnhttn.zmk.yml b/config/boards/shields/mnhttn/mnhttn.zmk.yml new file mode 100644 index 0000000..ec4a277 --- /dev/null +++ b/config/boards/shields/mnhttn/mnhttn.zmk.yml @@ -0,0 +1,11 @@ +file_format: "1" +id: mnhttn +name: MNHTTN +type: shield +url: https://github.com/fooker/mnhttn +requires: [seeeduino_xiao_ble] +features: + - keys +siblings: + - mnhttn_left + - mnhttn_right diff --git a/config/boards/shields/mnhttn/mnhttn_left.conf b/config/boards/shields/mnhttn/mnhttn_left.conf new file mode 100644 index 0000000..e69de29 diff --git a/config/boards/shields/mnhttn/mnhttn_left.overlay b/config/boards/shields/mnhttn/mnhttn_left.overlay new file mode 100644 index 0000000..ba65d12 --- /dev/null +++ b/config/boards/shields/mnhttn/mnhttn_left.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "mnhttn.dtsi" + +&kscan0 { + col-gpios + = <&xiao_d 4 GPIO_ACTIVE_HIGH> + , <&xiao_d 5 GPIO_ACTIVE_HIGH> + , <&xiao_d 10 GPIO_ACTIVE_HIGH> + , <&xiao_d 9 GPIO_ACTIVE_HIGH> + , <&xiao_d 8 GPIO_ACTIVE_HIGH> + ; + row-gpios + = <&xiao_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; +}; diff --git a/config/boards/shields/mnhttn/mnhttn_right.conf b/config/boards/shields/mnhttn/mnhttn_right.conf new file mode 100644 index 0000000..e69de29 diff --git a/config/boards/shields/mnhttn/mnhttn_right.overlay b/config/boards/shields/mnhttn/mnhttn_right.overlay new file mode 100644 index 0000000..cf1fc4b --- /dev/null +++ b/config/boards/shields/mnhttn/mnhttn_right.overlay @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "mnhttn.dtsi" + +&default_transform { + col-offset = <5>; +}; + +&kscan0 { + col-gpios + = <&xiao_d 5 GPIO_ACTIVE_HIGH> + , <&xiao_d 4 GPIO_ACTIVE_HIGH> + , <&xiao_d 9 GPIO_ACTIVE_HIGH> + , <&xiao_d 8 GPIO_ACTIVE_HIGH> + , <&xiao_d 10 GPIO_ACTIVE_HIGH> + ; + row-gpios + = <&xiao_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; +}; diff --git a/config/keys_de.h b/config/keys_de.h new file mode 100644 index 0000000..19ae67d --- /dev/null +++ b/config/keys_de.h @@ -0,0 +1,341 @@ +/* + * Localized Keys for German + * + * This file was generated from data with the following license: + * + * UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + * + * See Terms of Use for definitions of Unicode Inc.'s + * Data Files and Software. + * + * NOTICE TO USER: Carefully read the following legal agreement. + * BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S + * DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), + * YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE + * TERMS AND CONDITIONS OF THIS AGREEMENT. + * IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE + * THE DATA FILES OR SOFTWARE. + * + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright © 1991-2022 Unicode, Inc. All rights reserved. + * Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of the Unicode data files and any associated documentation + * (the "Data Files") or Unicode software and any associated documentation + * (the "Software") to deal in the Data Files or Software + * without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, and/or sell copies of + * the Data Files or Software, and to permit persons to whom the Data Files + * or Software are furnished to do so, provided that either + * (a) this copyright and permission notice appear with all copies + * of the Data Files or Software, or + * (b) this copyright and permission notice appear in associated + * Documentation. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in these Data Files or Software without prior + * written authorization of the copyright holder. + */ + +#pragma once + +#include +#include +#include + +#define DE_ESCAPE_CHARACTER (LC(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_LEFT_BRACKET_AND_LEFT_BRACE))) + +#define DE_FILE_SEPARATOR (LC(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_BACKSLASH_AND_PIPE))) + +#define DE_GROUP_SEPARATOR (LC(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_RIGHT_BRACKET_AND_RIGHT_BRACE))) + +#define DE_SPACE (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_SPACEBAR)) + +/* ! */ +#define DE_EXCLAMATION (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_1_AND_EXCLAMATION))) +#define DE_EXCL (DE_EXCLAMATION) + +/* " */ +#define DE_DOUBLE_QUOTES (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_2_AND_AT))) +#define DE_DQT (DE_DOUBLE_QUOTES) + +/* # */ +#define DE_HASH (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_BACKSLASH_AND_PIPE)) +#define DE_POUND (DE_HASH) + +/* $ */ +#define DE_DOLLAR (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_4_AND_DOLLAR))) +#define DE_DLLR (DE_DOLLAR) + +/* % */ +#define DE_PERCENT (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_5_AND_PERCENT))) +#define DE_PRCNT (DE_PERCENT) + +/* & */ +#define DE_AMPERSAND (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_6_AND_CARET))) +#define DE_AMPS (DE_AMPERSAND) + +/* ' */ +#define DE_SINGLE_QUOTE (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_BACKSLASH_AND_PIPE))) +#define DE_SQT (DE_SINGLE_QUOTE) +#define DE_APOSTROPHE (DE_SINGLE_QUOTE) +#define DE_APOS (DE_SINGLE_QUOTE) + +/* ( */ +#define DE_LEFT_PARENTHESIS (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_8_AND_ASTERISK))) +#define DE_LPAR (DE_LEFT_PARENTHESIS) + +/* ) */ +#define DE_RIGHT_PARENTHESIS (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_9_AND_LEFT_PARENTHESIS))) +#define DE_RPAR (DE_RIGHT_PARENTHESIS) + +/* * */ +#define DE_ASTERISK (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_RIGHT_BRACKET_AND_RIGHT_BRACE))) +#define DE_ASTRK (DE_ASTERISK) +#define DE_STAR (DE_ASTERISK) + +/* + */ +#define DE_PLUS (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_RIGHT_BRACKET_AND_RIGHT_BRACE)) + +/* , */ +#define DE_COMMA (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_COMMA_AND_LESS_THAN)) + +/* - */ +#define DE_MINUS (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_SLASH_AND_QUESTION_MARK)) + +/* . */ +#define DE_PERIOD (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_PERIOD_AND_GREATER_THAN)) +#define DE_DOT (DE_PERIOD) + +/* / */ +#define DE_SLASH (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_7_AND_AMPERSAND))) +#define DE_FSLH (DE_SLASH) + +/* 0 */ +#define DE_N0 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_0_AND_RIGHT_PARENTHESIS)) + +/* 1 */ +#define DE_N1 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_1_AND_EXCLAMATION)) + +/* 2 */ +#define DE_N2 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_2_AND_AT)) + +/* 3 */ +#define DE_N3 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_3_AND_HASH)) + +/* 4 */ +#define DE_N4 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_4_AND_DOLLAR)) + +/* 5 */ +#define DE_N5 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_5_AND_PERCENT)) + +/* 6 */ +#define DE_N6 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_6_AND_CARET)) + +/* 7 */ +#define DE_N7 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_7_AND_AMPERSAND)) + +/* 8 */ +#define DE_N8 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_8_AND_ASTERISK)) + +/* 9 */ +#define DE_N9 (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_9_AND_LEFT_PARENTHESIS)) + +/* : */ +#define DE_COLON (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_PERIOD_AND_GREATER_THAN))) + +/* ; */ +#define DE_SEMICOLON (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_COMMA_AND_LESS_THAN))) +#define DE_SEMI (DE_SEMICOLON) + +/* < */ +#define DE_LESS_THAN (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_NON_US_BACKSLASH_AND_PIPE)) +#define DE_LT (DE_LESS_THAN) + +/* = */ +#define DE_EQUAL (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_0_AND_RIGHT_PARENTHESIS))) + +/* > */ +#define DE_GREATER_THAN (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_NON_US_BACKSLASH_AND_PIPE))) +#define DE_GT (DE_GREATER_THAN) + +/* ? */ +#define DE_QUESTION (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_MINUS_AND_UNDERSCORE))) +#define DE_QMARK (DE_QUESTION) + +/* @ */ +#define DE_AT_SIGN (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_Q))) +#define DE_AT (DE_AT_SIGN) + +/* [ */ +#define DE_LEFT_BRACKET (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_8_AND_ASTERISK))) +#define DE_LBKT (DE_LEFT_BRACKET) + +/* \ */ +#define DE_BACKSLASH (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_MINUS_AND_UNDERSCORE))) +#define DE_BSLH (DE_BACKSLASH) + +/* ] */ +#define DE_RIGHT_BRACKET (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_9_AND_LEFT_PARENTHESIS))) +#define DE_RBKT (DE_RIGHT_BRACKET) + +/* ^ */ +#define DE_CARET (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_GRAVE_ACCENT_AND_TILDE)) + +/* _ */ +#define DE_UNDERSCORE (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_SLASH_AND_QUESTION_MARK))) +#define DE_UNDER (DE_UNDERSCORE) + +/* ` */ +#define DE_GRAVE (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_EQUAL_AND_PLUS))) + +/* a */ +#define DE_A (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_A)) + +/* b */ +#define DE_B (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_B)) + +/* c */ +#define DE_C (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_C)) + +/* d */ +#define DE_D (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_D)) + +/* e */ +#define DE_E (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_E)) + +/* f */ +#define DE_F (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_F)) + +/* g */ +#define DE_G (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_G)) + +/* h */ +#define DE_H (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_H)) + +/* i */ +#define DE_I (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_I)) + +/* j */ +#define DE_J (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_J)) + +/* k */ +#define DE_K (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_K)) + +/* l */ +#define DE_L (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_L)) + +/* m */ +#define DE_M (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_M)) + +/* n */ +#define DE_N (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_N)) + +/* o */ +#define DE_O (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_O)) + +/* p */ +#define DE_P (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_P)) + +/* q */ +#define DE_Q (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_Q)) + +/* r */ +#define DE_R (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_R)) + +/* s */ +#define DE_S (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_S)) + +/* t */ +#define DE_T (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_T)) + +/* u */ +#define DE_U (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_U)) + +/* v */ +#define DE_V (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_V)) + +/* w */ +#define DE_W (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_W)) + +/* x */ +#define DE_X (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_X)) + +/* y */ +#define DE_Y (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_Z)) + +/* z */ +#define DE_Z (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_Y)) + +/* { */ +#define DE_LEFT_BRACE (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_7_AND_AMPERSAND))) +#define DE_LBRC (DE_LEFT_BRACE) + +/* | */ +#define DE_PIPE (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_NON_US_BACKSLASH_AND_PIPE))) + +/* } */ +#define DE_RIGHT_BRACE (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_0_AND_RIGHT_PARENTHESIS))) +#define DE_RBRC (DE_RIGHT_BRACE) + +/* ~ */ +#define DE_TILDE (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_RIGHT_BRACKET_AND_RIGHT_BRACE))) + +/* § */ +#define DE_SECTION (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_3_AND_HASH))) +#define DE_SECT (DE_SECTION) + +/* ° */ +#define DE_DEGREE (LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_GRAVE_ACCENT_AND_TILDE))) +#define DE_DEG (DE_DEGREE) + +/* ² */ +#define DE_SUPER2 (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_2_AND_AT))) +#define DE_SQUARE (DE_SUPER2) + +/* ³ */ +#define DE_SUPER3 (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_3_AND_HASH))) +#define DE_CUBE (DE_SUPER3) + +/* ´ */ +#define DE_ACUTE (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_EQUAL_AND_PLUS)) + +/* µ */ +#define DE_MU (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_M))) +#define DE_MICRO (DE_MU) + +/* ß */ +#define DE_SHARP_S (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_MINUS_AND_UNDERSCORE)) +#define DE_ESZETT (DE_SHARP_S) +#define DE_SZ (DE_SHARP_S) + +/* ẞ */ +#define DE_CAPITAL_SHARP_S (RA(LS(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_MINUS_AND_UNDERSCORE)))) +#define DE_CAPITAL_ESZETT (DE_CAPITAL_SHARP_S) +#define DE_CAPITAL_SZ (DE_CAPITAL_SHARP_S) + +/* ä */ +#define DE_A_UMLAUT (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_APOSTROPHE_AND_QUOTE)) + +/* ö */ +#define DE_O_UMLAUT (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_SEMICOLON_AND_COLON)) + +/* ü */ +#define DE_U_UMLAUT (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_LEFT_BRACKET_AND_LEFT_BRACE)) + +/* € */ +#define DE_EURO (RA(ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_E))) diff --git a/config/mnhttn.conf b/config/mnhttn.conf new file mode 100644 index 0000000..0b6c2f2 --- /dev/null +++ b/config/mnhttn.conf @@ -0,0 +1 @@ +CONFIG_ZMK_USB_LOGGING=n diff --git a/config/mnhttn.keymap b/config/mnhttn.keymap new file mode 100644 index 0000000..ea421bc --- /dev/null +++ b/config/mnhttn.keymap @@ -0,0 +1,83 @@ +#include +#include +#include +#include + +#include "keys_de.h" + +#define BASE 0 +#define SYM 1 +#define NAV 2 +#define NUM 3 +#define ADJ 4 + +&mt { + quick-tap-ms = <200>; + global-quick-tap; + flavor = "balanced"; + tapping-term-ms = <120>; +}; + +/ { + combos { + compatible = "zmk,combos"; + combo_esc { + timeout-ms = <100>; + key-positions = <0 1>; + bindings = <&kp ESC>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + base_layer { + label= "BASE"; + bindings = < + &kp Q &kp W &kp E &kp R &kp T &kp Z &kp U &kp I &kp O &kp P + &mt LALT A &mt LCTRL S &mt LGUI D &mt LSHFT F &kp G &kp H &mt RSHFT J &mt RGUI K &mt RCTRL L &mt RALT DE_COLON + &kp Y &kp X &kp C &kp V &kp B &kp N &kp M &kp DE_COMMA &kp DE_DOT &kp DE_MINUS + &trans < SYM SPACE < NUM BSPC < NAV TAB &mt LSHFT RET &trans + >; + }; + + sim_layer { + label= "SYM"; + bindings = < + &kp DE_EXCL &kp DE_AT &kp DE_LBRC &kp DE_RBRC &kp DE_GRAVE &kp DE_SQT &kp DE_U_UMLAUT &kp DE_CARET &kp DE_O_UMLAUT &kp DE_STAR + &kp DE_A_UMLAUT &kp DE_SZ &kp DE_LPAR &kp DE_RPAR &kp DE_PLUS &kp DE_DQT &kp DE_EQUAL &kp DE_DLLR &kp DE_POUND &kp DE_SEMI + &kp DE_PIPE &kp DE_PRCNT &kp DE_LBKT &kp DE_RBKT &kp DE_TILDE &kp DE_AMPS &kp DE_LT &kp DE_GT &kp DE_QMARK &kp DE_UNDER + &trans &trans &trans &kp DE_SLASH &kp RSHFT &trans + >; + }; + + nav_layer { + label= "NAV"; + bindings = < + &kp ESC &trans &trans &trans &trans &kp DEL &kp PG_UP &kp UP &kp PG_DN &kp INS + &kp LALT &kp LCTRL &kp LGUI &kp LSHFT &trans &kp HOME &kp LEFT &kp DOWN &kp RIGHT &kp END + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &kp BSPC &kp DEL &trans &trans &to ADJ + >; + }; + + num_layer { + label= "NUM"; + bindings = < + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 + &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 + &trans &trans &trans &kp DE_COLON &kp DE_DOT &trans &trans &trans &trans &trans + &to ADJ &trans &trans &kp DE_BSLH &trans &trans + >; + }; + + adjust_layer { + label= "ADJ"; + bindings = < + &sys_reset &bt BT_CLR &out OUT_TOG &trans &trans &trans &trans &out OUT_TOG &bt BT_CLR &sys_reset + &bootloader &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_NXT &bootloader + &trans &bt BT_PRV &trans &trans &trans &trans &trans &trans &bt BT_PRV &trans + &trans &trans &trans &trans &trans &trans + >; + }; + }; +}; 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