This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
.zmk/
|
||||||
6
boards/shields/numpad3d/Kconfig.defconfig
Normal file
6
boards/shields/numpad3d/Kconfig.defconfig
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
if SHIELD_NUMPAD3D
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "numpad3d"
|
||||||
|
|
||||||
|
endif # SHIELD_NUMPAD3D
|
||||||
2
boards/shields/numpad3d/Kconfig.shield
Normal file
2
boards/shields/numpad3d/Kconfig.shield
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
config SHIELD_NUMPAD3D
|
||||||
|
def_bool $(shields_list_contains,numpad3d)
|
||||||
49
boards/shields/numpad3d/numpad3d-layouts.dtsi
Normal file
49
boards/shields/numpad3d/numpad3d-layouts.dtsi
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
// See https://zmk.dev/docs/development/hardware-integration/physical-layouts
|
||||||
|
// for how to configure this.
|
||||||
|
|
||||||
|
#include <physical_layouts.dtsi>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
default_layout: default_layout {
|
||||||
|
compatible = "zmk,physical-layout";
|
||||||
|
display-name = "Numpad3D";
|
||||||
|
transform = <&default_transform>;
|
||||||
|
kscan = <&kscan0>;
|
||||||
|
|
||||||
|
keys
|
||||||
|
// w h x y rot rx ry
|
||||||
|
|
||||||
|
/* Row 0 */
|
||||||
|
= <&key_physical_attrs 100 100 0 0 0 0 0> // ESC
|
||||||
|
, <&key_physical_attrs 100 100 100 0 0 0 0> // F1
|
||||||
|
, <&key_physical_attrs 100 100 200 0 0 0 0> // F2
|
||||||
|
, <&key_physical_attrs 100 100 300 0 0 0 0> // F3
|
||||||
|
|
||||||
|
/* Row 1 */
|
||||||
|
, <&key_physical_attrs 100 100 0 100 0 0 0> // NUM
|
||||||
|
, <&key_physical_attrs 100 100 100 100 0 0 0> // /
|
||||||
|
, <&key_physical_attrs 100 100 200 100 0 0 0> // *
|
||||||
|
, <&key_physical_attrs 100 100 300 100 0 0 0> // -
|
||||||
|
|
||||||
|
/* Row 2 */
|
||||||
|
, <&key_physical_attrs 100 100 0 200 0 0 0> // 7
|
||||||
|
, <&key_physical_attrs 100 100 100 200 0 0 0> // 8
|
||||||
|
, <&key_physical_attrs 100 100 200 200 0 0 0> // 9
|
||||||
|
, <&key_physical_attrs 100 200 300 200 0 0 0> // ENTER (2u vertical)
|
||||||
|
|
||||||
|
/* Row 3 */
|
||||||
|
, <&key_physical_attrs 100 100 0 300 0 0 0> // 4
|
||||||
|
, <&key_physical_attrs 100 100 100 300 0 0 0> // 5
|
||||||
|
, <&key_physical_attrs 100 100 200 300 0 0 0> // 6
|
||||||
|
|
||||||
|
/* Row 4 */
|
||||||
|
, <&key_physical_attrs 100 100 0 400 0 0 0> // 1
|
||||||
|
, <&key_physical_attrs 100 100 100 400 0 0 0> // 2
|
||||||
|
, <&key_physical_attrs 100 100 200 400 0 0 0> // 3
|
||||||
|
, <&key_physical_attrs 100 200 300 400 0 0 0> // + (2u vertical)
|
||||||
|
|
||||||
|
/* Row 5 */
|
||||||
|
, <&key_physical_attrs 200 100 0 500 0 0 0> // 0 (2u horizontal)
|
||||||
|
, <&key_physical_attrs 100 100 200 500 0 0 0>; // .
|
||||||
|
};
|
||||||
|
};
|
||||||
13
boards/shields/numpad3d/numpad3d.conf
Normal file
13
boards/shields/numpad3d/numpad3d.conf
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
# See https://zmk.dev/docs/development/hardware-integration/new-shield for more
|
||||||
|
# instructions.
|
||||||
|
|
||||||
|
# This file will be copied into the user's config directory when they add this
|
||||||
|
# keyboard. Define any Kconfig options users may frequently want to set here,
|
||||||
|
# but leave them commented out, for example:
|
||||||
|
|
||||||
|
# Uncomment to enable the encoder
|
||||||
|
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
|
# Uncomment to enable the display
|
||||||
|
# CONFIG_ZMK_DISPLAY=y
|
||||||
22
boards/shields/numpad3d/numpad3d.keymap
Normal file
22
boards/shields/numpad3d/numpad3d.keymap
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield for more instructions.
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp F1 &kp F2 &kp F3
|
||||||
|
&kp KP_NUM &kp KP_DIV &kp KP_MULT &kp KP_MINUS
|
||||||
|
&kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_ENTER
|
||||||
|
&kp KP_N4 &kp KP_N5 &kp KP_N6 &trans
|
||||||
|
&kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_PLUS
|
||||||
|
&kp KP_N0 &kp KP_DOT &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
51
boards/shields/numpad3d/numpad3d.overlay
Normal file
51
boards/shields/numpad3d/numpad3d.overlay
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
// This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield for more
|
||||||
|
// instructions.
|
||||||
|
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
#include "numpad3d-layouts.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix-transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
|
col-gpios = <
|
||||||
|
&gpio1 4 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio1 6 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio0 9 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio0 10 GPIO_ACTIVE_HIGH
|
||||||
|
>;
|
||||||
|
|
||||||
|
row-gpios = <
|
||||||
|
&gpio0 31 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio0 29 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio0 2 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio1 15 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio1 13 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio1 11 GPIO_ACTIVE_HIGH
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
default_transform: matrix_transform {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
rows = <6>;
|
||||||
|
columns = <4>;
|
||||||
|
|
||||||
|
map = <
|
||||||
|
RC(0,0) RC(0,1) RC(0,2) RC(0,3)
|
||||||
|
RC(1,0) RC(1,1) RC(1,2) RC(1,3)
|
||||||
|
RC(2,0) RC(2,1) RC(2,2) RC(2,3)
|
||||||
|
RC(3,0) RC(3,1) RC(3,2) RC(3,3)
|
||||||
|
RC(4,0) RC(4,1) RC(4,2) RC(4,3)
|
||||||
|
RC(5,0) RC(5,1) RC(5,2) RC(5,3)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
20
boards/shields/numpad3d/numpad3d.zmk.yml
Normal file
20
boards/shields/numpad3d/numpad3d.zmk.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
# See https://zmk.dev/docs/development/hardware-integration/hardware-metadata-files
|
||||||
|
# for instructions.
|
||||||
|
|
||||||
|
file_format: "1"
|
||||||
|
id: numpad3d
|
||||||
|
name: numpad3d
|
||||||
|
type: shield
|
||||||
|
|
||||||
|
# Set this to a URL that documents the keyboard.
|
||||||
|
url: https://example.com
|
||||||
|
|
||||||
|
# Add any features your keyboard supports here.
|
||||||
|
# See https://zmk.dev/docs/development/hardware-integration/hardware-metadata-files#features
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
- studio # Remove this line if your keyboard will not support ZMK Studio
|
||||||
|
|
||||||
|
requires:
|
||||||
|
- pro_micro
|
||||||
Reference in New Issue
Block a user