1
0
Fork 0

Add big artsey to main code

This commit is contained in:
KemoNine 2021-08-07 18:40:51 +00:00
parent c38df1d48e
commit d389aeb4f3
11 changed files with 384 additions and 3 deletions

View file

@ -77,6 +77,9 @@
// #define KEY_Y 5 // #define KEY_Y 5
// #define KEY_I 6 // #define KEY_I 6
// #define KEY_O 7 // #define KEY_O 7
// Big artsey F1-12 layer keys for combo
// #define KEY_F_TOP -1
// #define KEY_F_BOTTOM -1
/***************************************** /*****************************************
* Define key position offsets in main keymap * Define key position offsets in main keymap
@ -87,6 +90,11 @@
// #define LEADING_NONES NONE(0, 1, 0) // #define LEADING_NONES NONE(0, 1, 0)
// #define MIDDLE_NONES NONE(0, 0, 3) // #define MIDDLE_NONES NONE(0, 0, 3)
// #define TRAILING_NONES NONE(0, 1, 0) // #define TRAILING_NONES NONE(0, 1, 0)
// #define BIG_LEADING_NONES NONE(0, 0, 0)
// #define BIG_BETWEEN_ROW_ONE_TWO_NONES NONE(0, 0, 0)
// #define BIG_BETWEEN_ROW_TWO_THREE_NONES NONE(0, 0, 0)
// #define BIG_BETWEEN_ROW_THREE_THUMBS NONE(0, 0, 0)
// #define BIG_TRAILING_NONES NONE(0, 0, 0)
/***************************************** /*****************************************
* Define custom BT layer extra keys * Define custom BT layer extra keys
@ -193,7 +201,8 @@
#define LAYER_ID_NAVIGATION 4 #define LAYER_ID_NAVIGATION 4
#define LAYER_ID_BT_SEL 5 #define LAYER_ID_BT_SEL 5
#define LAYER_ID_CUSTOM 6 #define LAYER_ID_CUSTOM 6
#define LAYER_ID_MOUSE 7 #define LAYER_ID_BIG_SYM 7
#define LAYER_ID_BIG_FUNCTION 8
/***************************************** /*****************************************
* Standard ARTSEY combo definitions * Standard ARTSEY combo definitions
@ -244,6 +253,10 @@
combo_layer_bt_select { key-positions = <KEY_A KEY_E KEY_S KEY_O>; bindings = <&tog LAYER_ID_BT_SEL>; }; combo_layer_bt_select { key-positions = <KEY_A KEY_E KEY_S KEY_O>; bindings = <&tog LAYER_ID_BT_SEL>; };
combo_bt_clr { key-positions = <KEY_R KEY_Y KEY_T KEY_I>; bindings = <&bt BT_CLR>; }; combo_bt_clr { key-positions = <KEY_R KEY_Y KEY_T KEY_I>; bindings = <&bt BT_CLR>; };
combo_layer_navigation { key-positions = <KEY_R KEY_E KEY_I>; bindings = <&tog LAYER_ID_NAVIGATION>; }; combo_layer_navigation { key-positions = <KEY_R KEY_E KEY_I>; bindings = <&tog LAYER_ID_NAVIGATION>; };
// Function layer doesn't apply to non-big artsey presently
#if defined ARTSEY_BIG
combo_layer_functions { key-positions = <KEY_F_TOP KEY_F_BOTTOM>; bindings = <&sl LAYER_ID_BIG_FUNCTION>; };
#endif
}; };
}; };
@ -279,6 +292,22 @@
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
#if defined ARTSEY_BIG
base {
label = "*ARTSEY*";
bindings = <
BIG_LEADING_NONES
&kp MINUS &layer_parentheticals_kp LAYER_ID_PARENTHETICALS ARTSEY_BASE_A &kp ARTSEY_BASE_R &kp ARTSEY_BASE_T &layer_numbers_kp LAYER_ID_NUMBERS ARTSEY_BASE_S
BIG_BETWEEN_ROW_ONE_TWO_NONES
&kp TAB &layer_symbols_kp LAYER_ID_SYMBOLS ARTSEY_BASE_E &kp ARTSEY_BASE_Y &kp ARTSEY_BASE_I &layer_custom_kp LAYER_ID_CUSTOM ARTSEY_BASE_O
BIG_BETWEEN_ROW_TWO_THREE_NONES
&kp AT &kp EQUAL &kp DEL &sk LCTRL &sk LSHFT
BIG_BETWEEN_ROW_THREE_THUMBS
&kp ENTER &kp SPACE &mo LAYER_ID_BIG_SYM
BIG_TRAILING_NONES
>;
};
#else
base { base {
label = "ARTSEY"; label = "ARTSEY";
bindings = < bindings = <
@ -289,6 +318,7 @@
TRAILING_NONES TRAILING_NONES
>; >;
}; };
#endif
numbers { numbers {
label = "Number"; label = "Number";
bindings = < bindings = <
@ -340,6 +370,36 @@
>; >;
}; };
ARTSEY_LAYER_CUSTOM ARTSEY_LAYER_CUSTOM
#if defined ARTSEY_BIG
big_artsey_symbol {
label = "*Symbol*";
bindings = <
BIG_LEADING_NONES
&kp GRAVE &kp HASH &kp LBRC &kp RBRC &kp CARET
BIG_BETWEEN_ROW_ONE_TWO_NONES
&kp BSLH &kp DLLR &kp LPAR &kp RPAR &kp AMPS
BIG_BETWEEN_ROW_TWO_THREE_NONES
&kp PIPE &kp PRCNT &kp LBKT &kp RBKT &kp ASTRK
BIG_BETWEEN_ROW_THREE_THUMBS
&trans &kp SEMI &none
BIG_TRAILING_NONES
>;
};
big_artsey_function {
label = "*Func*";
bindings = <
BIG_LEADING_NONES
&none &kp F1 &kp F2 &kp F3 &kp F4
BIG_BETWEEN_ROW_ONE_TWO_NONES
&none &kp F5 &kp F6 &kp F7 &kp F8
BIG_BETWEEN_ROW_TWO_THREE_NONES
&none &kp F9 &kp F10 &kp F11 &kp F12
BIG_BETWEEN_ROW_THREE_THUMBS
&trans &none &none
BIG_TRAILING_NONES
>;
};
#endif
}; };
}; };
#endif #endif
@ -352,6 +412,22 @@
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
#if defined ARTSEY_BIG
base {
label = "*ARTSEY*";
bindings = <
BIG_LEADING_NONES
&layer_numbers_kp LAYER_ID_NUMBERS ARTSEY_BASE_S &kp ARTSEY_BASE_T &kp ARTSEY_BASE_R &layer_parentheticals_kp LAYER_ID_PARENTHETICALS ARTSEY_BASE_A &kp MINUS
BIG_BETWEEN_ROW_ONE_TWO_NONES
&layer_custom_kp LAYER_ID_CUSTOM ARTSEY_BASE_O &kp ARTSEY_BASE_I &kp ARTSEY_BASE_Y &layer_symbols_kp LAYER_ID_SYMBOLS ARTSEY_BASE_E &kp TAB
BIG_BETWEEN_ROW_TWO_THREE_NONES
&sk LSHFT &sk LCTRL &kp DEL &kp EQUAL &kp AT
BIG_BETWEEN_ROW_THREE_THUMBS
&mo LAYER_ID_BIG_SYM &kp SPACE &kp ENTER
BIG_TRAILING_NONES
>;
};
#else
base { base {
label = "ARTSEY"; label = "ARTSEY";
bindings = < bindings = <
@ -362,6 +438,7 @@
TRAILING_NONES TRAILING_NONES
>; >;
}; };
#endif
numbers { numbers {
label = "Number"; label = "Number";
bindings = < bindings = <
@ -413,6 +490,36 @@
>; >;
}; };
ARTSEY_LAYER_CUSTOM ARTSEY_LAYER_CUSTOM
#if defined ARTSEY_BIG
big_artsey_symbol {
label = "*Symbol*";
bindings = <
BIG_LEADING_NONES
&kp CARET &kp LBRC &kp RBRC &kp HASH &kp GRAVE
BIG_BETWEEN_ROW_ONE_TWO_NONES
&kp AMPS &kp LPAR &kp RPAR &kp DLLR &kp BSLH
BIG_BETWEEN_ROW_TWO_THREE_NONES
&kp ASTRK &kp LBKT &kp RBKT &kp PRCNT &kp PIPE
BIG_BETWEEN_ROW_THREE_THUMBS
&none &kp SEMI &none
BIG_TRAILING_NONES
>;
};
big_artsey_function {
label = "*Func*";
bindings = <
BIG_LEADING_NONES
&kp F4 &kp F3 &kp F2 &kp F1 &none
BIG_BETWEEN_ROW_ONE_TWO_NONES
&kp F8 &kp F7 &kp F6 &kp F5 &none
BIG_BETWEEN_ROW_TWO_THREE_NONES
&kp F12 &kp F11 &kp F10 &kp F9 &none
BIG_BETWEEN_ROW_THREE_THUMBS
&none &none &none
BIG_TRAILING_NONES
>;
};
#endif
}; };
}; };
#endif #endif

View file

@ -1,4 +1,4 @@
if SHIELD_CORNE_ARTSEY_LEFT || SHIELD_CORNE_5_COL_ARTSEY_LEFT if SHIELD_CORNE_ARTSEY_LEFT || SHIELD_CORNE_5_COL_ARTSEY_LEFT || SHIELD_CORNE_5_COL_ARTSEY_LEFT_BIG
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "ARTSEY L" default "ARTSEY L"

View file

@ -6,3 +6,6 @@ config SHIELD_CORNE_ARTSEY_LEFT
config SHIELD_CORNE_5_COL_ARTSEY_LEFT config SHIELD_CORNE_5_COL_ARTSEY_LEFT
def_bool $(shields_list_contains,corne_5_col_artsey_left) def_bool $(shields_list_contains,corne_5_col_artsey_left)
config SHIELD_CORNE_5_COL_ARTSEY_LEFT_BIG
def_bool $(shields_list_contains,corne_5_col_artsey_left_big)

View file

@ -0,0 +1,20 @@
# Copyright (c) 2021 Mike "KemoNine" Crosson
# SPDX-License-Identifier: MIT
# Tune combos to allow proper ARTSEY support
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=16
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=8
CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=8
# Tune bluetooth profiles for quick select
CONFIG_BT_MAX_CONN=6
# Enable display (layer in use is helpful)
CONFIG_ZMK_DISPLAY=y
# Turn on deep sleep
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# Set screen blanking to 15s instead of 30s
#CONFIG_ZMK_IDLE_TIMEOUT=15000

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2021 Mike "KemoNine" Crosson
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
// Enable ARTSEY Left
#define ARTSEY_LEFT 1
#define ARTSEY_BIG 1
// ARTS Row
#define KEY_A 3
#define KEY_R 2
#define KEY_T 1
#define KEY_S 0
// EYIO Row
#define KEY_E 8
#define KEY_Y 7
#define KEY_I 6
#define KEY_O 5
// Big artsey F1-12 layer keys for combo
#define KEY_F_TOP 4
#define KEY_F_BOTTOM 9
// Define Offsets
#define LEADING_NONES NONE(0,0, 0)
#define MIDDLE_NONES NONE(0, 0, 1)
#define TRAILING_NONES NONE(0, 0, 9)
#define BIG_LEADING_NONES NONE(0, 0, 0)
#define BIG_BETWEEN_ROW_ONE_TWO_NONES NONE(0, 0, 0)
#define BIG_BETWEEN_ROW_TWO_THREE_NONES NONE(0, 0, 0)
#define BIG_BETWEEN_ROW_THREE_THUMBS NONE(0, 0, 0)
#define BIG_TRAILING_NONES NONE(0, 0, 0)
// Include main artsey.io keymap
#include "../../../artsey.dtsi"

View file

@ -0,0 +1,74 @@
/*
* Copyright (c) 2021 Mike "KemoNine" Crosson
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <6>;
rows = <4>;
// | SW2 | SW3 | SW4 | SW5 | SW6 |
// | SW8 | SW9 | SW10 | SW11 | SW12 |
// | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW19 | SW20 | SW21 |
map = <
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5)
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5)
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5)
RC(3,3) RC(3,4) RC(3,5)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
;
};
// TODO: per-key RGB node(s)?
};
&pro_micro_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
prechargep = <0x22>;
};
};

View file

@ -1,4 +1,4 @@
if SHIELD_CORNE_ARTSEY_RIGHT || SHIELD_CORNE_5_COL_ARTSEY_RIGHT if SHIELD_CORNE_ARTSEY_RIGHT || SHIELD_CORNE_5_COL_ARTSEY_RIGHT || SHIELD_CORNE_5_COL_ARTSEY_RIGHT_BIG
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "ARTSEY R" default "ARTSEY R"

View file

@ -6,3 +6,6 @@ config SHIELD_CORNE_ARTSEY_RIGHT
config SHIELD_CORNE_5_COL_ARTSEY_RIGHT config SHIELD_CORNE_5_COL_ARTSEY_RIGHT
def_bool $(shields_list_contains,corne_5_col_artsey_right) def_bool $(shields_list_contains,corne_5_col_artsey_right)
config SHIELD_CORNE_5_COL_ARTSEY_RIGHT_BIG
def_bool $(shields_list_contains,corne_5_col_artsey_right_big)

View file

@ -0,0 +1,20 @@
# Copyright (c) 2021 Mike "KemoNine" Crosson
# SPDX-License-Identifier: MIT
# Tune combos to allow proper ARTSEY support
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=16
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=8
CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=8
# Tune bluetooth profiles for quick select
CONFIG_BT_MAX_CONN=6
# Enable display (layer in use is helpful)
CONFIG_ZMK_DISPLAY=y
# Turn on deep sleep
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# Set screen blanking to 15s instead of 30s
#CONFIG_ZMK_IDLE_TIMEOUT=15000

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2021 Mike "KemoNine" Crosson
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
// Enable ARTSEY Right
#define ARTSEY_RIGHT 1
#define ARTSEY_BIG 1
// ARTS Row
#define KEY_A 1
#define KEY_R 2
#define KEY_T 3
#define KEY_S 4
// EYIO Row
#define KEY_E 6
#define KEY_Y 7
#define KEY_I 8
#define KEY_O 9
// Big artsey F1-12 layer keys for combo
#define KEY_F_TOP 0
#define KEY_F_BOTTOM 5
// Define Offsets
#define LEADING_NONES NONE(0,0,1)
#define MIDDLE_NONES NONE(0, 0, 1)
#define TRAILING_NONES NONE(0, 0, 8)
#define BIG_LEADING_NONES NONE(0, 0, 0)
#define BIG_BETWEEN_ROW_ONE_TWO_NONES NONE(0, 0, 0)
#define BIG_BETWEEN_ROW_TWO_THREE_NONES NONE(0, 0, 0)
#define BIG_BETWEEN_ROW_THREE_THUMBS NONE(0, 0, 0)
#define BIG_TRAILING_NONES NONE(0, 0, 0)
// Include main artsey.io keymap
#include "../../../artsey.dtsi"

View file

@ -0,0 +1,74 @@
/*
* Copyright (c) 2021 Mike "KemoNine" Crosson
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <6>;
rows = <4>;
// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
// | SW21 | SW20 | SW19 |
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4)
RC(3,0) RC(3,1) RC(3,2)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
;
};
// TODO: per-key RGB node(s)?
};
&pro_micro_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
prechargep = <0x22>;
};
};