Skip to content

Commit

Permalink
Add Keymap Drawer (#4)
Browse files Browse the repository at this point in the history
* Add keymap drawer

* draw layout enforced

* draw layout for a keymap

---------

Co-authored-by: art4ride <art4ride@users.noreply.github.com>
  • Loading branch information
art4ride and art4ride authored Apr 19, 2024
1 parent ea42d9a commit 4b60b54
Show file tree
Hide file tree
Showing 5 changed files with 1,250 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/draw-keymaps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Draw keymap diagrams using keymap-drawer ZMK user config workflow
name: Draw ZMK keymaps
on:
workflow_dispatch:
push:
paths:
- 'config/*.keymap'
- 'config/includes/*.dtsi'
- keymap-drawer/config.yaml
- .github/workflows/draw-keymaps.yml

jobs:
draw:
uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main
with:
keymap_patterns: 'config/*.keymap'
config_path: keymap-drawer/config.yaml
output_folder: keymap-drawer
install_branch: main
amend_commit: true
draw_args: "ergonaut_one:'-k corne_rotated -l LAYOUT_split_3x6_3'"
json_path: keymap-drawer/layouts
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This is a repository for a ZMK Firmware for Ergonaut One keyboard.

Visual representation of the default keymap in keyboard-layout-editor: [KLE](http://www.keyboard-layout-editor.com/#/gists/13d0f7ae7a8b5835efcd23d61f50336a)

Below representation was generated with [`keymap-drawer`](https://github.com/caksoylar/keymap-drawer) -- check out the automatically generated layouts using the [automated Github workflow](https://github.com/caksoylar/keymap-drawer/tree/main#setting-up-an-automated-drawing-workflow) for each keyboard in the [`keymap-drawer` folder](keymap-drawer/), which is always up to date with the config.

![Keymap Representation](./keymap-drawer/ergonaut_one.svg?raw=true "Keymap Representation")

This layout is heavily inspired from [Watchman 42-key layout](https://github.com/aroum/Watchman-layouts)

## FAQ
Expand Down
173 changes: 173 additions & 0 deletions keymap-drawer/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# configuration for https://github.com/caksoylar/keymap-drawer
parse_config:
raw_binding_map:
'&sys_reset': Reset
'&bootloader': Boot
'&swapper': Win Next
'&caps_word': Caps Word
'&inv_qm': ¿

'&kp LC(LG(LEFT))': Desk Left
'&kp LC(LG(RIGHT))': Desk Right
'&kp LC(TAB)': Tab Right
'&kp LC(LS(TAB))': Tab Left
'&kp LA(F4)': Win Close
'&kp LC(F4)': Tab Close
'&kp LS(TAB)': Win Prev
'&kp LS(INS)': Paste
'&kp LG(L)': Lock

'&out OUT_USB': Out USB
'&out OUT_BLE': Out BLE

'&bt BT_SEL 0': BT 1
'&bt BT_SEL 1': BT 2
'&bt BT_SEL 2': BT 3
'&bt BT_SEL 3': BT 4
'&bt BT_SEL 4': BT 5

'&mmv MOVE_UP': Mouse ↑
'&mmv MOVE_DOWN': Mouse ↓
'&mmv MOVE_LEFT': Mouse ←
'&mmv MOVE_RIGHT': Mouse →

'&msc SCRL_UP': Scroll ↑
'&msc SCRL_DOWN': Scroll ↓
'&msc SCRL_LEFT': Scroll ←
'&msc SCRL_RIGHT': Scroll →

'&mkp LCLK': Left Click
'&mkp RCLK': Right Click
'&mkp MCLK': Middle Click
'&mkp MB4': Back Click
'&mkp MB5': Forward Click

zmk_combos:
combo_tab: {align: top, o: 0.15}
combo_del: {align: top, o: 0.15}
combo_f12: {align: bottom}
combo_btclr: {align: bottom}
combo_play: {align: right}
combo_capswd: {draw_separate: true}
combo_semi: {draw_separate: true}
combo_grave: {draw_separate: true}
combo_lpar: {draw_separate: true}
combo_rpar: {draw_separate: true}
combo_lbkt: {draw_separate: true}
combo_rbkt: {draw_separate: true}
combo_tab: {draw_separate: true}
combo_del: {draw_separate: true}
combo_esc: {draw_separate: true}
combo_ret: {draw_separate: true}
combo_lock: {draw_separate: true}
combo_bslh: {draw_separate: true}
combo_slsh: {draw_separate: true}

zmk_keycode_map:
# custom mappings
C_VOL_UP: Vol Up
C_VOL_DN: Vol Down
C_AL_CALC: Calc
C_PP: Play Pause

LCTRL: Ctrl
RCTRL: Ctrl
LALT: Alt
RALT: Alt
LGUI: Gui
RGUI: Gui
LSHFT: Shift
RSHFT: Shift
ESC: Esc
SPACE:
BSPC:
RET:
TAB:
DEL:

PG_UP: Page Up
PG_DN: Page Down
INS: Insert
HOME: Home
END: End
CAPS: Caps Lock
PSCRN: Print Scrn
PAUSE_BREAK: Pause Break

UP:
DOWN:
LEFT:
RIGHT:

C_PP:
C_NEXT: ⏭️
C_PREV: ⏮️

# defaults
AMPERSAND: '&'
AMPS: '&'
APOS: "'"
APOSTROPHE: "'"
ASTERISK: '*'
ASTRK: '*'
AT: '@'
AT_SIGN: '@'
BACKSLASH: \
BSLH: \
CARET: ^
COLON: ':'
COMMA: ','
DLLR: $
DOLLAR: $
DOT: .
DOUBLE_QUOTES: '"'
DQT: '"'
EQUAL: '='
EXCL: '!'
EXCLAMATION: '!'
FSLH: /
GRAVE: '`'
GREATER_THAN: '>'
GT: '>'
HASH: '#'
LBKT: '['
LBRC: '{'
LEFT_BRACE: '{'
LEFT_BRACKET: '['
LEFT_PARENTHESIS: (
LESS_THAN: <
LPAR: (
LT: <
MINUS: '-'
NON_US_BACKSLASH: \
NON_US_BSLH: '|'
NON_US_HASH: '#'
NUHS: '#'
PERCENT: '%'
PERIOD: .
PIPE: '|'
PIPE2: '|'
PLUS: +
POUND: '#'
PRCNT: '%'
QMARK: '?'
QUESTION: '?'
RBKT: ']'
RBRC: '}'
RIGHT_BRACE: '}'
RIGHT_BRACKET: ']'
RIGHT_PARENTHESIS: )
RPAR: )
SEMI: ;
SEMICOLON: ;
SINGLE_QUOTE: ''''
SLASH: /
SQT: ''''
STAR: '*'
TILDE: '~'
TILDE2: '~'
UNDER: _
UNDERSCORE: _
draw_config:
footer_text: 'Created with <a href="https://github.com/caksoylar/keymap-drawer">keymap-drawer</a>'
dark_mode: auto
Loading

0 comments on commit 4b60b54

Please sign in to comment.