Add Eternal Keypad
This commit is contained in:
parent
391f80f069
commit
103261ff25
8 changed files with 208 additions and 0 deletions
9
app/boards/shields/eternal_keypad/Kconfig.defconfig
Normal file
9
app/boards/shields/eternal_keypad/Kconfig.defconfig
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_ETERNAL_KEYPAD
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "Eternal Keypad"
|
||||||
|
|
||||||
|
endif
|
6
app/boards/shields/eternal_keypad/Kconfig.shield
Normal file
6
app/boards/shields/eternal_keypad/Kconfig.shield
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_ETERNAL_KEYPAD
|
||||||
|
def_bool $(shields_list_contains,eternal_keypad)
|
||||||
|
|
10
app/boards/shields/eternal_keypad/README.md
Normal file
10
app/boards/shields/eternal_keypad/README.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Eternal Keypad
|
||||||
|
|
||||||
|
Eternal Keypad is an open-source input device for gaming that can be assembled for both right and left hand mouse users.
|
||||||
|
|
||||||
|
Firmware is described in the [Eternal Keypad](https://github.com/duckyb/eternal-keypad) repository [README](https://github.com/duckyb/eternal-keypad#firmware).
|
||||||
|
|
||||||
|
Two keymaps are included:
|
||||||
|
|
||||||
|
- eternal_keypad (default)
|
||||||
|
- eternal_keypad_lefty (for left handed users)
|
6
app/boards/shields/eternal_keypad/eternal_keypad.conf
Normal file
6
app/boards/shields/eternal_keypad/eternal_keypad.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# Uncomment to turn on logging, and set ZMK logging to debug output
|
||||||
|
# CONFIG_ZMK_USB_LOGGING=y
|
||||||
|
|
49
app/boards/shields/eternal_keypad/eternal_keypad.keymap
Normal file
49
app/boards/shields/eternal_keypad/eternal_keypad.keymap
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
|
||||||
|
#define BASE 0
|
||||||
|
#define ARROW 1
|
||||||
|
#define FUNC 2
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6
|
||||||
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp N7
|
||||||
|
&kp F13 &kp ENTER &kp A &kp S &kp D &kp F &kp G &kp N8
|
||||||
|
&kp F14 &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N9
|
||||||
|
&kp F15 &kp LCTRL &sl FUNC &kp LALT &kp SPACE < ARROW N0
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
arrow_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &kp UP &trans &trans &trans &trans
|
||||||
|
&bt BT_CLR &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans
|
||||||
|
&reset &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&bootloader &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
function_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6
|
||||||
|
&trans &kp P &kp O &kp I &kp U &kp Y &kp F7
|
||||||
|
&bt BT_CLR &kp BSPC &kp SEMI &kp L &kp K &kp J &kp H &kp F8
|
||||||
|
&bt BT_NXT &trans &kp LGUI &kp M &kp N &kp F12 &kp F11 &kp F9
|
||||||
|
&bootloader &trans &trans &trans &trans &kp F10
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
66
app/boards/shields/eternal_keypad/eternal_keypad.overlay
Normal file
66
app/boards/shields/eternal_keypad/eternal_keypad.overlay
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
|
row-gpios
|
||||||
|
= <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
|
||||||
|
col-gpios
|
||||||
|
= <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
default_transform: keymap_transform_0 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <8>;
|
||||||
|
rows = <5>;
|
||||||
|
map = <
|
||||||
|
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7)
|
||||||
|
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7)
|
||||||
|
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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7)
|
||||||
|
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,5) RC(4,7)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
lefty_transform: keymap_transform_1 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <8>;
|
||||||
|
rows = <5>;
|
||||||
|
map = <
|
||||||
|
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6)
|
||||||
|
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6)
|
||||||
|
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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7)
|
||||||
|
RC(4,0) RC(4,2) RC(4,4) RC(4,5) RC(4,6) RC(4,7)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
8
app/boards/shields/eternal_keypad/eternal_keypad.zmk.yml
Normal file
8
app/boards/shields/eternal_keypad/eternal_keypad.zmk.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: eternal_keypad
|
||||||
|
name: Eternal Keypad
|
||||||
|
type: shield
|
||||||
|
url: https://github.com/duckyb/eternal-keypad
|
||||||
|
requires: [pro_micro]
|
||||||
|
features:
|
||||||
|
- keys
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
|
||||||
|
#define BASE 0
|
||||||
|
#define ARROW 1
|
||||||
|
#define FUNC 2
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6
|
||||||
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp N7
|
||||||
|
&kp F13 &kp ENTER &kp D &kp S &kp A &kp F &kp G &kp N8
|
||||||
|
&kp F14 &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N9
|
||||||
|
&kp F15 &kp LCTRL &sl FUNC &kp LALT &kp SPACE < ARROW N0
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
arrow_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &kp UP &trans &trans &trans &trans
|
||||||
|
&bt BT_CLR &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans
|
||||||
|
&reset &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&bootloader &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
function_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6
|
||||||
|
&trans &kp P &kp O &kp I &kp U &kp Y &kp F7
|
||||||
|
&bt BT_CLR &kp BSPC &kp SEMI &kp L &kp K &kp J &kp H &kp F8
|
||||||
|
&bt BT_NXT &trans &kp LGUI &kp M &kp N &kp F12 &kp F11 &kp F9
|
||||||
|
&bootloader &trans &trans &trans &trans &kp F10
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
Loading…
Add table
Reference in a new issue