Skip to content

Commit

Permalink
feat: implement current qmk layout
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonoff committed Aug 17, 2024
1 parent 530370a commit d5027a5
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 82 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.direnv
.venv
.west
.DS_Store
modules
firmware
zephyr
Expand Down
45 changes: 45 additions & 0 deletions config/behaviors.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* KEY POSITIONS

╭─────────────────────────╮ ╭─────────────────────────╮
│ LT5 LT4 LT3 LT2 LT1 LT0 │ │ RT0 RT1 RT2 RT3 RT4 RT5 │
│ LM5 LM4 LM3 LM2 LM1 LM0 │ │ RM0 RM1 RM2 RM3 RM4 RM5 │
│ LB5 LB4 LB3 LB2 LB1 LB0 │ │ RB0 RB1 RB2 RB3 RB4 RB5 │
╰───────────╮ LH2 LH1 LH0 │ │ RH0 RH1 RH2 ╭───────────╯
╰─────────────╯ ╰─────────────╯ */

#define COMBO_TERM_FAST 18
#define COMBO_TERM_SLOW 30

#define COMBO_IDLE_FAST 150
#define COMBO_IDLE_SLOW 50

// implements alt+tab behavior
ZMK_TRI_STATE(alt_tab,
bindings = <&kt RGUI>, <&kp TAB>, <&kt RGUI>;
ignored-key-positions = <LT4 LH2 RM0 RM1 RM2 RM3>; // Ignore Q, ENTER and Arrows
)

// tap: play/pause | double-tap: next song | tripple-tap: previous song
ZMK_TAP_DANCE(play_np,
tapping-term-ms = <300>;
bindings = <&kp C_PLAY_PAUSE>, <&kp C_NEXT>, <&kp C_PREVIOUS>;
)

// tap: sticky-shift | shift + tap/ double-tap: caps-word | hold: shift
ZMK_MOD_MORPH(up_shift,
bindings = <&sk LSHFT>, <&caps_word>;
mods = <(MOD_LSFT)>;
)

// tap: key 2 | quick tap: key 2 | hold: key 1
ZMK_HOLD_TAP(lkp,
flavor = "tap-preferred";
tapping-term-ms = <200>;
quick-tap-ms = <200>;
bindings = <&mo>, <&kp>;
)

//ZMK_COMBO(sh, &ru_sh, LT2 LT1, COL QWR, COMBO_TERM_FAST, COMBO_IDLE_FAST)
//ZMK_COMBO(sht, &ru_shch, LM2 LM1, COL QWR, COMBO_TERM_FAST, COMBO_IDLE_FAST)
//ZMK_COMBO(ch, &ru_ch, LB2 LB1, COL QWR, COMBO_TERM_FAST, COMBO_IDLE_FAST)
//ZMK_COMBO(yu, &ru_yu, RT2 RT1, COL QWR, COMBO_TERM_FAST, COMBO_IDLE_FAST)
10 changes: 0 additions & 10 deletions config/custom_behavior.dtsi

This file was deleted.

56 changes: 56 additions & 0 deletions config/macros.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/* KEY POSITIONS

╭─────────────────────────╮ ╭─────────────────────────╮
│ LT5 LT4 LT3 LT2 LT1 LT0 │ │ RT0 RT1 RT2 RT3 RT4 RT5 │
│ LM5 LM4 LM3 LM2 LM1 LM0 │ │ RM0 RM1 RM2 RM3 RM4 RM5 │
│ LB5 LB4 LB3 LB2 LB1 LB0 │ │ RB0 RB1 RB2 RB3 RB4 RB5 │
╰───────────╮ LH2 LH1 LH0 │ │ RH0 RH1 RH2 ╭───────────╯
╰─────────────╯ ╰─────────────╯ */

ZMK_MACRO(cast,
bindings
= <&macro_press &kp LGUI>
, <&macro_tap &kp SPACE>
, <&macro_release &kp LGUI>
;
)

ZMK_MACRO(lang,
bindings
= <&macro_press &kp LALT>
, <&macro_tap &kp SPACE>
, <&macro_release &kp LALT>
;
)

ZMK_MACRO(prev_d,
bindings = <&macro_tap &kp LBKT &kp D>;
)

ZMK_MACRO(next_d,
bindings = <&macro_tap &kp RBKT &kp D>;
)

ZMK_MACRO(prev_c,
bindings = <&macro_tap &kp LBKT &kp C>;
)

ZMK_MACRO(next_c,
bindings = <&macro_tap &kp RBKT &kp C>;
)

ZMK_MACRO(next_view,
bindings
= <&macro_press &kp LALT &kp LSHFT>
, <&macro_tap &kp SPACE>
, <&macro_release &kp LALT &kp LSHFT>
;
)

ZMK_MACRO(full_view,
bindings
= <&macro_press &kp LALT &kp LSHFT>
, <&macro_tap &kp D>
, <&macro_release &kp LALT &kp LSHFT>
;
)
18 changes: 18 additions & 0 deletions config/splitkb_aurora_corne.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Name
CONFIG_ZMK_KEYBOARD_NAME="Aurora Corne"

# Set sleep timeout to 30min (30*60*1000ms)
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000

# Combo config, automated by build script
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=3

# Bluetooth tweaks
CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y
CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_BT_MAX_CONN=3
CONFIG_BT_MAX_PAIRED=3

# Uncomment these two line to add support for encoders to your firmware
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
Expand Down
151 changes: 80 additions & 71 deletions config/splitkb_aurora_corne.keymap

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ manifest:
url-base: https://github.com/zmkfirmware
- name: dhruvinsh
url-base: https://github.com/dhruvinsh

- name: urob
url-base: https://github.com/urob
projects:
- name: zmk
remote: zmkfirmware
Expand All @@ -14,5 +15,8 @@ manifest:
remote: dhruvinsh
revision: main
path: modules/tri-state
- name: zmk-helpers
remote: urob
revision: main
self:
path: config
1 change: 1 addition & 0 deletions zmk-helpers
Submodule zmk-helpers added at d70db6

0 comments on commit d5027a5

Please sign in to comment.