Skip to content

Commit

Permalink
feat: add Dvorak layout (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
minusfive authored Oct 11, 2024
1 parent 2b20595 commit b4804b7
Show file tree
Hide file tree
Showing 5 changed files with 1,537 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ Knucklehead[^1] is a mnemonic, macOS-optimized, 42 key ergonomic columnar layout
> [!NOTE]\
> These are **optimized for the [Colemak-DH](https://colemakmods.github.io/mod-dh/)** layout. While many will work well regardless of layout, others will be "lost in translation".
>
> [Other layouts available](#using-layouts-other-than-colemak-dh):
>
> - [QWERTY](./knucklehead/L1_qwerty.dtsi)
> - [Colemak](./knucklehead/L1_colemak.dtsi)
>
> See: [Using layouts other than Colemak-DH](#using-layouts-other-than-colemak-dh)
<!-- &nbsp;s force column width and prevent unwanted breaks -->
Expand Down Expand Up @@ -178,20 +173,29 @@ These special cases are marked with the same 🆇 symbol.

## Using layouts other than Colemak-DH

> [!NOTE]\
> Other layouts available:
>
> - [Colemak](./knucklehead/L1_colemak.dtsi) (classic)
> - [Dvorak](./knucklehead/L1_dvorak.dtsi)
> - [QWERTY](./knucklehead/L1_qwerty.dtsi)
>
> Feel free to submit [PRs](/pulls) with additional layouts, or [open an issue](/issues) if you need help with a specific layout. Of course, you're also always welcome to fork this repo and create your own custom layouts.
In order to use layouts other than the default [Colemak-DH](https://colemakmods.github.io/mod-dh/) layout, you'll need to comment-out the `#include "L1_colemak-dh.dtsi"` statement in [./knucklehead/base.dtsi](./knucklehead/base.dtsi), and uncomment the corresponding layout file you wish to use. E.g.:

```diff
# ./knucklehead/base.dtsi

-#include "L1_colemak-dh.dtsi"
+// #include "L1_colemak-dh.dtsi"

// #include "L1_colemak.dtsi"
// #include "L1_dvorak.dtsi"
-// #include "L1_qwerty.dtsi"
+#include "L1_qwerty.dtsi"
```

> [!NOTE]\
> Feel free to submit [PRs](/pulls) with additional layouts, or [open an issue](/issues) if you need help with a specific layout. Of course, you're also always welcome to fork this repo and create your own custom layouts.
<https://github.com/minusfive/zmk-config/blob/2b20595017111d5ab5fe2b6731a971d3410b28c5/knucklehead/base.dtsi#L34-L38>

---

Expand Down
1,287 changes: 1,287 additions & 0 deletions img/dvorak.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
209 changes: 209 additions & 0 deletions img/dvorak.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
layout: {qmk_keyboard: corne_rotated, qmk_layout: LAYOUT_split_3x6_3}
layers:
L1:
- $$mdi:keyboard-esc$$
- {t: '''', s: '"'}
- {t: ',', s: <}
- {t: ., s: '>'}
- P
- Y
- F
- G
- C
- R
- L
- $$mdi:close-box$$
- {t: '$$mdi:backspace$$', s: '$$mdi:backspace-reverse-outline$$', type: backspace}
- A
- {t: O, h: '$$mdi:apple-keyboard-control$$'}
- {t: E, h: '$$mdi:apple-keyboard-option$$'}
- {t: U, h: '$$mdi:apple-keyboard-command$$'}
- {t: I, h: '$$mdi:triangle$$'}
- {t: D, h: '$$mdi:triangle$$'}
- {t: H, h: '$$mdi:apple-keyboard-command$$'}
- {t: T, h: '$$mdi:apple-keyboard-option$$'}
- {t: N, h: '$$mdi:apple-keyboard-control$$'}
- S
- {t: '$$mdi:keyboard-return$$', type: enter}
- {t: Fn, h: '$$mdi:close-box$$'}
- {t: ;, s: ':'}
- Q
- J
- K
- X
- B
- M
- W
- V
- Z
- {t: Fn, h: '$$mdi:close-box$$'}
- $$mdi:keyboard-tab$$
- {t: '$$mdi:keyboard-space$$', h: '$$mdi:apple-keyboard-shift$$'}
- {t: L2, h: '$$mdi:gesture-tap-hold$$', s: '$$mdi:alpha-w-box$$'}
- {t: L2, h: '$$mdi:gesture-tap-hold$$', s: '$$mdi:alpha-w-box$$'}
- {t: '$$mdi:apple-keyboard-shift$$', h: '$$mdi:gesture-tap-hold$$', s: '$$mdi:alpha-w-box$$'}
- {t: '`', s: '~'}
L2:
- {t: '$$mdi:transfer$$', type: trans}
- {t: '1', s: '!'}
- {t: '2', s: '@'}
- {t: '3', s: '#'}
- {t: '4', s: $}
- {t: '5', s: '%'}
- $$mdi:skip-previous$$
- $$mdi:volume-low$$
- $$mdi:volume-high$$
- $$mdi:skip-next$$
- $$mdi:volume-off$$
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '6', s: ^}
- {t: '7', h: '$$mdi:apple-keyboard-control$$', s: '&'}
- {t: '8', h: '$$mdi:apple-keyboard-option$$', s: '*'}
- {t: '9', h: '$$mdi:apple-keyboard-command$$', s: (}
- {t: '0', h: '$$mdi:triangle$$', s: )}
- {t: '$$mdi:arrow-left-bold$$', h: '$$mdi:triangle$$'}
- {t: '$$mdi:arrow-down-bold$$', h: '$$mdi:apple-keyboard-command$$'}
- {t: '$$mdi:arrow-up-bold$$', h: '$$mdi:apple-keyboard-option$$'}
- {t: '$$mdi:arrow-right-bold$$', h: '$$mdi:apple-keyboard-control$$'}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:close-box$$', h: L2}
- {t: '$$mdi:close-box$$', h: L2}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
Fn:
- {t: '$$mdi:toggle-switch$$', h: '$$mdi:bluetooth$$', s: '$$mdi:usb$$'}
- F1
- F2
- F3
- F4
- F5
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- $$mdi:power-standby$$
- {t: '$$mdi:backup-restore$$', h: '$$mdi:progress-download$$', type: bootloader}
- F6
- {t: F7, h: '$$mdi:apple-keyboard-control$$'}
- {t: F8, h: '$$mdi:apple-keyboard-option$$'}
- {t: F9, h: '$$mdi:apple-keyboard-command$$'}
- {t: F10, h: '$$mdi:triangle$$'}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:backup-restore$$', h: '$$mdi:progress-download$$', type: bootloader}
- {t: '$$mdi:close-box$$', h: Fn}
- F11
- F12
- F13
- F14
- F15
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:transfer$$', type: trans}
- {t: '$$mdi:close-box$$', h: Fn}
- $$mdi:brightness-7$$
- $$mdi:brightness-5$$
- {t: '$$mdi:close-box$$', h: L2}
- {t: '$$mdi:close-box$$', h: L2}
- $$mdi:apple-keyboard-caps$$
- {t: '$$mdi:transfer$$', type: trans}
combos:
- p: [1, 13]
k: '!'
l: [L1, L2]
- p: [2, 14]
k: '@'
l: [L1, L2]
- p: [3, 15]
k: '#'
l: [L1, L2]
- p: [4, 16]
k: $
l: [L1, L2]
- p: [5, 17]
k: '%'
l: [L1, L2]
- p: [13, 25]
k: ^
l: [L1, L2]
- p: [14, 26]
k: '&'
l: [L1, L2]
- p: [15, 27]
k: '*'
l: [L1, L2]
- p: [16, 28]
k: (
l: [L1, L2]
- p: [17, 29]
k: )
l: [L1, L2]
- p: [7, 19]
k: {h: '-', s: _}
l: [L1, L2, Fn]
- p: [8, 20]
k: {h: '=', s: +}
l: [L1, L2, Fn]
- p: [9, 21]
k: {t: /, s: '?'}
l: [L1, L2, Fn]
- p: [6, 18]
k: $$mdi:transfer-up$$
l: [L1, L2, Fn]
- p: [18, 30]
k: $$mdi:transfer-down$$
l: [L1, L2, Fn]
- p: [19, 31]
k: {h: '[', s: '{'}
l: [L1, L2, Fn]
- p: [20, 32]
k: {h: ']', s: '}'}
l: [L1, L2, Fn]
- p: [21, 33]
k: {h: \, s: '|'}
l: [L1, L2, Fn]
- p: [1, 2, 3, 4]
k: $$mdi:bluetooth-off$$
l: [Fn]
a: top
o: 0.03
- p: [1, 13]
k: {h: '1', s: '$$mdi:bluetooth-connect$$'}
l: [Fn]
- p: [2, 14]
k: {h: '2', s: '$$mdi:bluetooth-connect$$'}
l: [Fn]
- p: [3, 15]
k: {h: '3', s: '$$mdi:bluetooth-connect$$'}
l: [Fn]
- p: [4, 16]
k: {h: '4', s: '$$mdi:bluetooth-connect$$'}
l: [Fn]
- p: [5, 17]
k: {h: '5', s: '$$mdi:bluetooth-connect$$'}
l: [Fn]
- p: [6, 7]
k: $$mdi:play-pause$$
l: [L1, L2, Fn]
28 changes: 28 additions & 0 deletions knucklehead/L1_dvorak.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Alpha Layer - Colemak
*/

/ {
keymap {
compatible = "zmk,keymap";

dvorak_layer {
display-name = "L1";
bindings = <
// ╭───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────╮ ╭───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────╮
// │0 │1 │2 │3 │4 │5 │ │6 │7 │8 │9 │10 │11 │
&kp ESC &kp SQT &kp COMMA &kp DOT &kp P &kp Y &kp F &kp G &kp C &kp R &kp L &kp K_CANCEL
// ├───────────────├───────────────┼───────────────┼───────────────┼───────────────┼───────────────┤ ├───────────────├───────────────┼───────────────┼───────────────┼───────────────┼───────────────┤
// │12 │13 │14 │15 │16 │17 │ │18 │19 │20 │21 │22 │23 │
&bkspc_del &kp A &hrml LCTRL O &hrml LALT E &hrml LCMD U &hrml MEH I &hrmr MEH D &hrmr LCMD H &hrmr LALT T &hrmr LCTRL N &kp S &kp ENTER
// ├───────────────├───────────────┼───────────────┼───────────────┼───────────────┼───────────────┤ ├───────────────├───────────────┼───────────────┼───────────────┼───────────────┼───────────────┤
// │24 │25 │26 │27 │28 │29 │ │30 │31 │32 │33 │34 │35 │
&csl Fn &kp SEMICOLON &kp Q &kp J &kp K &kp X &kp B &kp M &kp W &kp V &kp Z &csl Fn
// ╰───────────────┴───────────────┴───────────────┼───────────────┼───────────────┼───────────────┤ ├───────────────├───────────────┼───────────────┼───────────────┴───────────────┴───────────────╯
// │36 │37 │38 │ │39 │40 │41 │
&kp TAB &mt LSHFT SPACE &smart_num L2 0 &smart_num L2 0 &smart_shift &kp GRAVE
// ╰───────────────┴───────────────┴───────────────╯ ╰───────────────┴───────────────┴───────────────╯
>;
};
};
};
1 change: 1 addition & 0 deletions knucklehead/base.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
// Alpha layer: uncomment desired, comment the others
#include "L1_colemak-dh.dtsi"
// #include "L1_colemak.dtsi"
// #include "L1_dvorak.dtsi"
// #include "L1_qwerty.dtsi"

// Other layers
Expand Down

0 comments on commit b4804b7

Please sign in to comment.