1
0
Fork 0

Add Cradio/Sweep Support (#3)

* Add initial cradio/sweep support
I have only made the left hand side currently.
There is a high and low version, refering to whether it lives on the 1st and 2nd rows
or the 2nd and 3rd rows respectively.

Next I will work on adding the right hand side, and maybe adding thumb support.
I am not sure what the best way to do that is, I guess when I make a pull request we will see

* Fix the trailing offset

* Add support for the thumb keys

Added a "Custom thumb" define which adds into the standard keymap.
The alternative would be to go for the same sort of thing as the ARTSEY_BIG
alternate map and add our own one

* Add cradio/sweep right

* Remove the low versions of cradio left

I wasn't sure which way would feel the best since I just got the keyboard but obviously it was the top rows

* Quick fix for the KEY_* defines
I didn't realise they went off the KSCAN order rather than the RC order
This commit is contained in:
Zylanx 2022-01-13 13:54:59 +11:00 committed by GitHub
parent a600af3e9a
commit a99d5a0682
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 458 additions and 0 deletions

View file

@ -55,6 +55,14 @@ jobs:
shield: the_paintbrush_left_tsraneio
- board: nice_nano_v2
shield: the_paintbrush_right_tsraneio
- board: nice_nano_v2
shield: cradio_artsey_left
- board: nice_nano_v2
shield: cradio_artsey_thumb_left
- board: nice_nano_v2
shield: cradio_artsey_right
- board: nice_nano_v2
shield: cradio_artsey_thumb_right
steps:
- name: Checkout
uses: actions/checkout@v2

View file

@ -343,6 +343,9 @@
MIDDLE_NONES
&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
TRAILING_NONES
#if defined CUSTOM_THUMB
CUSTOM_THUMB
#endif
>;
};
#endif
@ -463,6 +466,9 @@
MIDDLE_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
TRAILING_NONES
#if defined CUSTOM_THUMB
CUSTOM_THUMB
#endif
>;
};
#endif

View file

@ -0,0 +1,9 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_CRADIO_ARTSEY_LEFT || SHIELD_CRADIO_ARTSEY_THUMB_LEFT
config ZMK_KEYBOARD_NAME
default "Artsey L"
endif

View file

@ -0,0 +1,8 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_CRADIO_ARTSEY_LEFT
def_bool $(shields_list_contains,cradio_artsey_left)
config SHIELD_CRADIO_ARTSEY_THUMB_LEFT
def_bool $(shields_list_contains,cradio_artsey_thumb_left)

View file

@ -0,0 +1,14 @@
# Copyright (c) 2020 The ZMK Contributors
# 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
# Turn on deep sleep
#CONFIG_ZMK_SLEEP=y
#CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000

View file

@ -0,0 +1,31 @@
/*
* 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>
// Enable ARTSEY Left
#define ARTSEY_LEFT 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
// Define Offsets
#define LEADING_NONES NONE(0,0,0)
#define MIDDLE_NONES NONE(0,0,1)
#define TRAILING_NONES NONE(0,0,8)
// Include main artsey.io keymap
#include "../../../artsey.dtsi"

View file

@ -0,0 +1,56 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* 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 = <17>;
rows = <1>;
// | SW0 | SW1 | SW2 | SW3 | SW4 |
// | SW5 | SW6 | SW7 | SW8 | SW9 |
// | SW10 | SW11 | SW12 | SW13 | SW14 |
// | SW15 | SW16 |
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(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
RC(0,15) RC(0,16)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios
= <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
};

View file

@ -0,0 +1,14 @@
# Copyright (c) 2020 The ZMK Contributors
# 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
# Turn on deep sleep
#CONFIG_ZMK_SLEEP=y
#CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000

View file

@ -0,0 +1,34 @@
/*
* 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>
// Enable ARTSEY Left
#define ARTSEY_LEFT 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
// Define Custom Thumb Keys
#define CUSTOM_THUMB &kp SPACE &kp ENTER
// Define Offsets
#define LEADING_NONES NONE(0,0,0)
#define MIDDLE_NONES NONE(0,0,1)
#define TRAILING_NONES NONE(0,0,6)
// Include main artsey.io keymap
#include "../../../artsey.dtsi"

View file

@ -0,0 +1,56 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* 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 = <17>;
rows = <1>;
// | SW0 | SW1 | SW2 | SW3 | SW4 |
// | SW5 | SW6 | SW7 | SW8 | SW9 |
// | SW10 | SW11 | SW12 | SW13 | SW14 |
// | SW15 | SW16 |
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(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
RC(0,15) RC(0,16)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios
= <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
};

View file

@ -0,0 +1,9 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_CRADIO_ARTSEY_RIGHT || SHIELD_CRADIO_ARTSEY_THUMB_RIGHT
config ZMK_KEYBOARD_NAME
default "Artsey R"
endif

View file

@ -0,0 +1,8 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_CRADIO_ARTSEY_RIGHT
def_bool $(shields_list_contains,cradio_artsey_right)
config SHIELD_CRADIO_ARTSEY_THUMB_RIGHT
def_bool $(shields_list_contains,cradio_artsey_thumb_right)

View file

@ -0,0 +1,14 @@
# Copyright (c) 2020 The ZMK Contributors
# 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
# Turn on deep sleep
#CONFIG_ZMK_SLEEP=y
#CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000

View file

@ -0,0 +1,31 @@
/*
* 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>
// Enable ARTSEY Right
#define ARTSEY_RIGHT 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
// Define Offsets
#define LEADING_NONES NONE(0,0,1)
#define MIDDLE_NONES NONE(0,0,1)
#define TRAILING_NONES NONE(0,0,7)
// Include main artsey.io keymap
#include "../../../artsey.dtsi"

View file

@ -0,0 +1,56 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* 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 = <17>;
rows = <1>;
// | SW4 | SW3 | SW2 | SW1 | SW0 |
// | SW9 | SW8 | SW7 | SW6 | SW5 |
// | SW14 | SW13 | SW12 | SW11 | SW10 |
// | SW16 | SW15 |
map = <
RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0)
RC(0,9) RC(0,8) RC(0,7) RC(0,6) RC(0,5)
RC(0,14) RC(0,13) RC(0,12) RC(0,11) RC(0,10)
RC(0,16) RC(0,15)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios
= <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
};

View file

@ -0,0 +1,14 @@
# Copyright (c) 2020 The ZMK Contributors
# 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
# Turn on deep sleep
#CONFIG_ZMK_SLEEP=y
#CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000

View file

@ -0,0 +1,34 @@
/*
* 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>
// Enable ARTSEY Right
#define ARTSEY_RIGHT 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
// Define Custom Thumb Keys
#define CUSTOM_THUMB &kp ENTER &kp SPACE
// Define Offsets
#define LEADING_NONES NONE(0,0,1)
#define MIDDLE_NONES NONE(0,0,1)
#define TRAILING_NONES NONE(0,0,5)
// Include main artsey.io keymap
#include "../../../artsey.dtsi"

View file

@ -0,0 +1,56 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* 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 = <17>;
rows = <1>;
// | SW4 | SW3 | SW2 | SW1 | SW0 |
// | SW9 | SW8 | SW7 | SW6 | SW5 |
// | SW14 | SW13 | SW12 | SW11 | SW10 |
// | SW16 | SW15 |
map = <
RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0)
RC(0,9) RC(0,8) RC(0,7) RC(0,6) RC(0,5)
RC(0,14) RC(0,13) RC(0,12) RC(0,11) RC(0,10)
RC(0,16) RC(0,15)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios
= <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
};