From bdfdad0cb3abae02ed7326844c0bc0e2bf8ec937 Mon Sep 17 00:00:00 2001 From: Levi Portenier Date: Sun, 19 May 2024 13:16:57 -0600 Subject: [PATCH] Re-add Levi's keyboards after hard rebase --- keyboards/dactyl_by_levi/190hotfix.sh | 19 + keyboards/dactyl_by_levi/config.h | 140 + keyboards/dactyl_by_levi/dactyl_by_levi.c | 307 + keyboards/dactyl_by_levi/dactyl_by_levi.h | 256 + keyboards/dactyl_by_levi/info.json | 104 + .../dactyl_by_levi/keymaps/default/keymap.c | 115 + .../dactyl_by_levi/keymaps/default/readme.md | 5 + .../keymaps/levi_layout/keymap.c | 237 + .../keymaps/levi_layout/readme.md | 5 + keyboards/dactyl_by_levi/matrix.c | 348 + keyboards/dactyl_by_levi/readme.md | 41 + keyboards/dactyl_by_levi/rules.mk | 93 + .../dactyl_by_levi/util/compile_keymap.py | 707 ++ keyboards/dactyl_by_levi/util/readme.md | 3 + keyboards/ergodox_ez/keymaps/bdk/config.h | 5 + keyboards/ergodox_ez/keymaps/bdk/keymap.c | 176 + keyboards/ergodox_ez/keymaps/bdk/readme.md | 36 + keyboards/ergodox_ez/keymaps/bdk/rules.mk | 3 + .../ergodox_ez/keymaps/bepo_tm_style/config.h | 28 + .../ergodox_ez/keymaps/bepo_tm_style/keymap.c | 353 + .../keymaps/bepo_tm_style/readme.md | 22 + .../ergodox_ez/keymaps/bepo_tm_style/rules.mk | 14 + .../ergodox_ez/keymaps/blakedietz/keymap.c | 265 + .../keymaps/bpruitt-goddard/config.h | 28 + .../keymaps/bpruitt-goddard/keymap.c | 234 + .../keymaps/bpruitt-goddard/readme.md | 23 + .../keymaps/bpruitt-goddard/rules.mk | 14 + .../keymaps/colemak_es_osx/config.h | 20 + .../keymaps/colemak_es_osx/keymap.c | 397 + .../keymaps/colemak_es_osx/readme.md | 67 + .../ergodox_ez/keymaps/danielo515/config.h | 31 + .../ergodox_ez/keymaps/danielo515/keymap.c | 326 + .../ergodox_ez/keymaps/danielo515/rules.mk | 9 + .../keymaps/dvorak_42_key/README.md | 19 + .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 753 ++ .../ergodox_ez/keymaps/ericgebhart/keymap.c | 48 + .../ergodox_ez/keymaps/ericgebhart/layouts.h | 139 + .../ergodox_ez/keymaps/ericgebhart/readme.md | 5 + .../keymaps/hacker_dvorak/.gitignore | 2 + .../ergodox_ez/keymaps/hacker_dvorak/config.h | 92 + .../keymaps/hacker_dvorak/gulpfile.js | 22 + .../keymaps/hacker_dvorak/hacker_dvorak.c | 353 + .../keycodes/aliases_definitions.c | 13 + .../hacker_dvorak/keycodes/custom_keycodes.c | 7 + .../ergodox_ez/keymaps/hacker_dvorak/keymap.c | 28 + .../hacker_dvorak/layers/layers_definitions.c | 12 + .../hacker_dvorak/leader/leader_dictionary.c | 14 + .../hacker_dvorak/leader/leader_setup.c | 1 + .../keymaps/hacker_dvorak/package.json | 15 + .../hacker_dvorak/plover/plover_mode.c | 20 + .../keymaps/hacker_dvorak/readme.md | 62 + .../ergodox_ez/keymaps/hacker_dvorak/rules.mk | 38 + .../tap_dance/mod_tap_layer_dances/dot_comm.c | 41 + .../mod_tap_layer_dances/h_mouse_gui.c | 39 + .../mod_tap_layer_dances/j_media_meh.c | 43 + .../mod_tap_layer_dances/k_numpad_hyper.c | 45 + .../mod_tap_layer_dances/m_chords_hyper.c | 45 + .../mod_tap_layer_dances/none_lead.c | 40 + .../mod_tap_layer_dances/quot_dquot.c | 41 + .../mod_tap_layer_dances/scln_coln.c | 43 + .../mod_tap_layer_dances/u_arrows_gui.c | 39 + .../mod_tap_layer_dances/w_media_meh.c | 43 + .../tap_dance/tap_dance_actions.c | 26 + .../hacker_dvorak/tap_dance/tap_dance_setup.c | 75 + .../hacker_dvorak/tap_dance/tap_dances.c | 98 + .../hacker_dvorak/user/eeconfig_init_user.c | 3 + .../hacker_dvorak/user/layer_set_state_user.c | 121 + .../hacker_dvorak/user/matrix_scan_user.c | 12 + .../hacker_dvorak/user/process_record_user.c | 75 + .../keymaps/heartrobotninja/config.h | 18 + .../keymaps/heartrobotninja/keymap.c | 680 ++ .../keymaps/heartrobotninja/rules.mk | 32 + .../ergodox_ez/keymaps/ifohancroft/config.h | 21 + .../ergodox_ez/keymaps/ifohancroft/keymap.c | 199 + .../ergodox_ez/keymaps/ifohancroft/readme.md | 20 + .../ergodox_ez/keymaps/ifohancroft/rules.mk | 3 + keyboards/ergodox_ez/keymaps/kou/keymap.c | 312 + keyboards/ergodox_ez/keymaps/kou/readme.md | 28 + .../ergodox_ez/keymaps/levi_2023/keymap.c | 219 + .../ergodox_ez/keymaps/levi_layout/keymap.c | 219 + keyboards/ergodox_ez/keymaps/lukaus/config.h | 16 + keyboards/ergodox_ez/keymaps/lukaus/keymap.c | 843 ++ keyboards/ergodox_ez/keymaps/lukaus/readme.md | 3 + keyboards/ergodox_ez/keymaps/lukaus/rules.mk | 1 + .../ergodox_ez/keymaps/matrixman/keymap.c | 188 + .../ergodox_ez/keymaps/matrixman/readme.md | 100 + .../keymaps/nathanvercaemert/config.h | 32 + .../keymaps/nathanvercaemert/keymap.c | 434 + .../keymaps/nathanvercaemert/readme.md | 27 + .../keymaps/nathanvercaemert/rules.mk | 9 + keyboards/ergodox_ez/keymaps/nfriend/config.h | 31 + keyboards/ergodox_ez/keymaps/nfriend/keymap.c | 1096 +++ .../ergodox_ez/keymaps/nfriend/readme.md | 52 + keyboards/ergodox_ez/keymaps/nfriend/rules.mk | 8 + .../ergodox_ez/keymaps/nfriend/template.c | 92 + .../ergodox_ez/keymaps/profet_80/keymap.c | 179 + .../ergodox_ez/keymaps/profet_80/readme.md | 10 + keyboards/ergodox_ez/keymaps/pvinis/keymap.c | 334 + keyboards/ergodox_ez/keymaps/pvinis/readme.md | 65 + keyboards/ergodox_ez/keymaps/pvinis/rules.mk | 1 + keyboards/ergodox_ez/keymaps/rishka/config.h | 17 + keyboards/ergodox_ez/keymaps/rishka/keymap.c | 210 + keyboards/ergodox_ez/keymaps/rishka/rules.mk | 2 + keyboards/ergodox_ez/keymaps/rmw/config.h | 54 + keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c | 188 + keyboards/ergodox_ez/keymaps/rmw/keymap-win.c | 159 + keyboards/ergodox_ez/keymaps/rmw/keymap.c | 13 + keyboards/ergodox_ez/keymaps/rmw/readme.md | 11 + keyboards/ergodox_ez/keymaps/rmw/rules.mk | 1 + keyboards/ergodox_ez/keymaps/saha/keymap.c | 254 + keyboards/ergodox_ez/keymaps/skug/config.h | 8 + keyboards/ergodox_ez/keymaps/skug/keymap.c | 251 + keyboards/ergodox_ez/keymaps/skug/readme.md | 4 + .../ergodox_ez/keymaps/smurmann/keymap.c | 204 + keyboards/ergodox_ez/keymaps/stamm/config.h | 40 + keyboards/ergodox_ez/keymaps/stamm/keymap.c | 286 + keyboards/ergodox_ez/keymaps/stamm/readme.md | 97 + keyboards/ergodox_ez/keymaps/stamm/rules.mk | 8 + keyboards/ergodox_ez/keymaps/steno/keymap.c | 250 + keyboards/ergodox_ez/keymaps/steno/readme.md | 92 + keyboards/ergodox_ez/keymaps/steno/rules.mk | 3 + .../ergodox_ez/keymaps/toshi0383/keymap.c | 98 + keyboards/ergodox_ez/keymaps/vim/config.h | 10 + keyboards/ergodox_ez/keymaps/vim/keymap.c | 370 + keyboards/ergodox_ez/keymaps/vim/readme.md | 5 + keyboards/ergodox_ez/keymaps/vim/rules.mk | 1 + keyboards/ergodox_ez/keymaps/vim/vim.h | 755 ++ .../pro/rev1/ansi/keymaps/alexmarmon/keymap.c | 66 + .../rev1/ansi/keymaps/alexmarmon/readme.md | 7 + .../pro/rev1/ansi/keymaps/andrebrait/config.h | 22 + .../pro/rev1/ansi/keymaps/andrebrait/keymap.c | 348 + .../rev1/ansi/keymaps/andrebrait/readme.md | 26 + .../pro/rev1/ansi/keymaps/andrebrait/rules.mk | 6 + .../gmmk/pro/rev1/ansi/keymaps/batin/keymap.c | 50 + .../pro/rev1/ansi/keymaps/benschaeff/keymap.c | 127 + .../rev1/ansi/keymaps/benschaeff/readme.md | 19 + .../pro/rev1/ansi/keymaps/byungyoonc/config.h | 72 + .../pro/rev1/ansi/keymaps/byungyoonc/keymap.c | 129 + .../rev1/ansi/keymaps/byungyoonc/readme.md | 41 + .../keymaps/byungyoonc/rgb_matrix_user.inc | 1 + .../pro/rev1/ansi/keymaps/byungyoonc/rules.mk | 2 + .../pro/rev1/ansi/keymaps/cedrikl/keymap.c | 154 + .../ansi/keymaps/cedrikl/rgb_matrix_map.h | 185 + .../pro/rev1/ansi/keymaps/cedrikl/rules.mk | 2 + .../rev1/ansi/keymaps/coryginsberg/config.h | 24 + .../rev1/ansi/keymaps/coryginsberg/keymap.c | 111 + .../rev1/ansi/keymaps/coryginsberg/readme.md | 15 + .../rev1/ansi/keymaps/coryginsberg/rules.mk | 5 + .../pro/rev1/ansi/keymaps/gigahawk/config.h | 6 + .../pro/rev1/ansi/keymaps/gigahawk/keymap.c | 74 + .../pro/rev1/ansi/keymaps/hachetman/config.h | 22 + .../pro/rev1/ansi/keymaps/hachetman/keymap.c | 307 + .../pro/rev1/ansi/keymaps/hachetman/readme.md | 26 + .../pro/rev1/ansi/keymaps/hachetman/rules.mk | 5 + .../pro/rev1/ansi/keymaps/jackkenney/keymap.c | 66 + .../pro/rev1/ansi/keymaps/jonavin/config.h | 39 + .../pro/rev1/ansi/keymaps/jonavin/keymap.c | 209 + .../pro/rev1/ansi/keymaps/jonavin/readme.md | 65 + .../ansi/keymaps/jonavin/rgb_matrix_map.h | 144 + .../pro/rev1/ansi/keymaps/jonavin/rules.mk | 12 + .../rev1/ansi/keymaps/lalitmaganti/config.h | 19 + .../rev1/ansi/keymaps/lalitmaganti/keymap.c | 91 + .../rev1/ansi/keymaps/lalitmaganti/rules.mk | 1 + .../pro/rev1/ansi/keymaps/leviport/keymap.c | 106 + .../pro/rev1/ansi/keymaps/leviport/rules.mk | 1 + .../gmmk/pro/rev1/ansi/keymaps/macos/config.h | 80 + .../gmmk/pro/rev1/ansi/keymaps/macos/keymap.c | 448 + .../pro/rev1/ansi/keymaps/macos/readme.md | 85 + .../gmmk/pro/rev1/ansi/keymaps/macos/rules.mk | 4 + .../pro/rev1/ansi/keymaps/mattgauf/ansi.c | 241 + .../pro/rev1/ansi/keymaps/mattgauf/config.h | 63 + .../pro/rev1/ansi/keymaps/mattgauf/helpers.c | 25 + .../pro/rev1/ansi/keymaps/mattgauf/keymap.c | 220 + .../ansi/keymaps/mattgauf/keymap_helpers.h | 165 + .../pro/rev1/ansi/keymaps/mattgauf/readme.md | 52 + .../pro/rev1/ansi/keymaps/mattgauf/rules.mk | 6 + .../pro/rev1/ansi/keymaps/mike1808/.gitignore | 1 + .../pro/rev1/ansi/keymaps/mike1808/README.md | 19 + .../pro/rev1/ansi/keymaps/mike1808/config.h | 31 + .../pro/rev1/ansi/keymaps/mike1808/encoder.c | 111 + .../pro/rev1/ansi/keymaps/mike1808/encoder.h | 35 + .../gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c | 49 + .../pro/rev1/ansi/keymaps/mike1808/keymap.c | 127 + .../pro/rev1/ansi/keymaps/mike1808/mike1808.c | 68 + .../pro/rev1/ansi/keymaps/mike1808/mike1808.h | 111 + .../ansi/keymaps/mike1808/process_record.c | 119 + .../ansi/keymaps/mike1808/process_record.h | 26 + .../keymaps/mike1808/rgb_matrix_ledmaps.c | 71 + .../keymaps/mike1808/rgb_matrix_ledmaps.h | 100 + .../pro/rev1/ansi/keymaps/mike1808/rules.mk | 25 + .../pro/rev1/ansi/keymaps/mike1808/utils.c | 64 + .../pro/rev1/ansi/keymaps/mike1808/utils.h | 32 + .../pro/rev1/ansi/keymaps/paddlegame/config.h | 24 + .../pro/rev1/ansi/keymaps/paddlegame/keymap.c | 471 + .../rev1/ansi/keymaps/paddlegame/paddlegame.h | 46 + .../rev1/ansi/keymaps/paddlegame/readme.md | 18 + .../ansi/keymaps/paddlegame/rgb_matrix_map.h | 181 + .../pro/rev1/ansi/keymaps/paddlegame/rules.mk | 4 + .../rev1/ansi/keymaps/stickandgum/config.h | 75 + .../rev1/ansi/keymaps/stickandgum/keymap.c | 300 + .../rev1/ansi/keymaps/stickandgum/readme.md | 63 + .../rev1/ansi/keymaps/stickandgum/rules.mk | 2 + .../rev1/ansi/keymaps/wholesomeducky/keymap.c | 57 + .../pro/rev1/ansi/keymaps/willwm/keymap.c | 73 + .../pro/rev1/ansi/keymaps/willwm/keymap.json | 181 + .../pro/rev1/ansi/keymaps/willwm/readme.md | 22 + .../pro/rev1/ansi/keymaps/willwm/rules.mk | 2 + keyboards/handwired/2x2keypad/2x2keypad.c | 25 + keyboards/handwired/2x2keypad/2x2keypad.h | 14 + keyboards/handwired/2x2keypad/config.h | 48 + .../2x2keypad/keymaps/default/keymap.c | 8 + .../2x2keypad/keymaps/default/rules.mk | 2 + keyboards/handwired/2x2keypad/rules.mk | 18 + keyboards/handwired/xd128/config.h | 127 + .../xd128/keymaps/levi_layout/keymap.c | 154 + keyboards/handwired/xd128/rules.mk | 30 + keyboards/handwired/xd128/xd128.c | 41 + keyboards/handwired/xd128/xd128.h | 54 + .../xd75/keymaps/levi_layout/config.h | 19 + .../xd75/keymaps/levi_layout/keymap.c | 133 + .../xd75/keymaps/levi_layout/readme.md | 1 + .../xd75/keymaps/levi_layout/rules.mk | 15 + keyboards/melody96/config.h | 55 + keyboards/melody96/info.json | 884 ++ keyboards/melody96/keymaps/crilith/keymap.c | 38 + keyboards/melody96/keymaps/default/keymap.c | 20 + .../default_96_with60_split_num0/keymap.c | 36 + keyboards/melody96/keymaps/dvz/config.h | 34 + keyboards/melody96/keymaps/dvz/keymap.c | 161 + keyboards/melody96/keymaps/dvz/readme.md | 3 + keyboards/melody96/keymaps/dvz/rules.mk | 5 + .../melody96/keymaps/konstantin/config.h | 3 + .../melody96/keymaps/konstantin/keymap.c | 77 + .../melody96/keymaps/konstantin/rules.mk | 19 + keyboards/melody96/keymaps/lessthan3/keymap.c | 63 + .../melody96/keymaps/levi-layout/keymap.c | 76 + keyboards/melody96/keymaps/via/keymap.c | 36 + keyboards/melody96/keymaps/via/rules.mk | 2 + keyboards/melody96/keymaps/zunger/config.h | 22 + keyboards/melody96/keymaps/zunger/keymap.c | 489 + keyboards/melody96/keymaps/zunger/readme.md | 78 + keyboards/melody96/keymaps/zunger/rules.mk | 2 + keyboards/melody96/melody96.c | 1 + keyboards/melody96/melody96.h | 233 + keyboards/melody96/readme.md | 19 + keyboards/melody96/rules.mk | 18 + keyboards/system76/launch_1/i2c.c | 176 + keyboards/system76/launch_1/i2c.h | 46 + .../system76/launch_1/keymaps/jeremy/keymap.c | 91 + .../system76/launch_1/keymaps/levi/keymap.c | 133 + keyboards/system76/launch_alpha_1/README.md | 21 + keyboards/system76/launch_alpha_1/config.h | 62 + .../launch_alpha_1/keymaps/carl/keymap.c | 72 + .../launch_alpha_1/keymaps/default/keymap.c | 72 + .../launch_alpha_1/keymaps/ian/keymap.c | 70 + .../launch_alpha_1/keymaps/jeremy/keymap.c | 72 + .../launch_alpha_1/keymaps/john/keymap.c | 72 + .../launch_alpha_1/keymaps/levi/keymap.c | 103 + .../launch_alpha_1/keymaps/nathaniel/keymap.c | 72 + .../launch_alpha_1/keymaps/sean/keymap.c | 72 + .../launch_alpha_1/keymaps/shpurk/keymap.c | 72 + .../system76/launch_alpha_1/launch_alpha_1.c | 49 + .../system76/launch_alpha_1/launch_alpha_1.h | 24 + keyboards/system76/launch_alpha_1/rules.mk | 28 + keyboards/system76/launch_alpha_2/README.md | 19 + keyboards/system76/launch_alpha_2/config.h | 62 + .../launch_alpha_2/keymaps/default/keymap.c | 73 + .../launch_alpha_2/keymaps/jeremy/keymap.c | 73 + .../system76/launch_alpha_2/launch_alpha_2.c | 49 + .../system76/launch_alpha_2/launch_alpha_2.h | 24 + ...tem76-launch-configurable-keyboard-1-0.dxf | 8002 +++++++++++++++++ ...em76-launch-configurable-keyboard-1-0.json | 196 + keyboards/system76/launch_alpha_2/rules.mk | 28 + keyboards/system76/launch_test/README.md | 19 + keyboards/system76/launch_test/config.h | 63 + .../launch_test/keymaps/default/keymap.c | 12 + keyboards/system76/launch_test/launch_test.c | 133 + keyboards/system76/launch_test/launch_test.h | 16 + keyboards/system76/launch_test/rules.mk | 28 + keyboards/system76/ortho_split_2u/config.h | 41 + .../ortho_split_2u/keymaps/default/keymap.c | 58 + .../ortho_split_2u/keymaps/levi/keymap.c | 58 + .../system76/ortho_split_2u/ortho_split_2u.c | 9 + .../system76/ortho_split_2u/ortho_split_2u.h | 31 + keyboards/system76/ortho_split_2u/rules.mk | 24 + keyboards/system76/virgo/config.h | 35 + .../system76/virgo/keymaps/default/keymap.c | 71 + .../system76/virgo/keymaps/jeremy/keymap.c | 71 + keyboards/system76/virgo/rules.mk | 22 + keyboards/system76/virgo/virgo.c | 9 + keyboards/system76/virgo/virgo.h | 24 + 291 files changed, 35688 insertions(+) create mode 100644 keyboards/dactyl_by_levi/190hotfix.sh create mode 100644 keyboards/dactyl_by_levi/config.h create mode 100644 keyboards/dactyl_by_levi/dactyl_by_levi.c create mode 100644 keyboards/dactyl_by_levi/dactyl_by_levi.h create mode 100644 keyboards/dactyl_by_levi/info.json create mode 100644 keyboards/dactyl_by_levi/keymaps/default/keymap.c create mode 100644 keyboards/dactyl_by_levi/keymaps/default/readme.md create mode 100644 keyboards/dactyl_by_levi/keymaps/levi_layout/keymap.c create mode 100644 keyboards/dactyl_by_levi/keymaps/levi_layout/readme.md create mode 100644 keyboards/dactyl_by_levi/matrix.c create mode 100644 keyboards/dactyl_by_levi/readme.md create mode 100644 keyboards/dactyl_by_levi/rules.mk create mode 100644 keyboards/dactyl_by_levi/util/compile_keymap.py create mode 100644 keyboards/dactyl_by_levi/util/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/bdk/config.h create mode 100644 keyboards/ergodox_ez/keymaps/bdk/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/bdk/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/bdk/rules.mk create mode 100755 keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h create mode 100755 keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c create mode 100755 keyboards/ergodox_ez/keymaps/bepo_tm_style/readme.md create mode 100755 keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/blakedietz/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h create mode 100644 keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/bpruitt-goddard/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/colemak_es_osx/config.h create mode 100644 keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/colemak_es_osx/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/danielo515/config.h create mode 100644 keyboards/ergodox_ez/keymaps/danielo515/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/danielo515/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/dvorak_42_key/README.md create mode 100644 keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/ericgebhart/layouts.h create mode 100644 keyboards/ergodox_ez/keymaps/ericgebhart/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_dictionary.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/plover/plover_mode.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/dot_comm.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/h_mouse_gui.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/j_media_meh.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/k_numpad_hyper.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/m_chords_hyper.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/quot_dquot.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/scln_coln.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/u_arrows_gui.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/w_media_meh.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_setup.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/user/eeconfig_init_user.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/user/matrix_scan_user.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/user/process_record_user.c create mode 100644 keyboards/ergodox_ez/keymaps/heartrobotninja/config.h create mode 100644 keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/ifohancroft/config.h create mode 100644 keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/ifohancroft/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/kou/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/kou/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/levi_2023/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/levi_layout/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/lukaus/config.h create mode 100644 keyboards/ergodox_ez/keymaps/lukaus/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/lukaus/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/lukaus/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/matrixman/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/matrixman/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h create mode 100644 keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/config.h create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/template.c create mode 100644 keyboards/ergodox_ez/keymaps/profet_80/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/profet_80/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/pvinis/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/pvinis/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/pvinis/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/rishka/config.h create mode 100644 keyboards/ergodox_ez/keymaps/rishka/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/rishka/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/rmw/config.h create mode 100644 keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c create mode 100644 keyboards/ergodox_ez/keymaps/rmw/keymap-win.c create mode 100644 keyboards/ergodox_ez/keymaps/rmw/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/rmw/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/rmw/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/saha/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/skug/config.h create mode 100644 keyboards/ergodox_ez/keymaps/skug/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/skug/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/smurmann/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/stamm/config.h create mode 100644 keyboards/ergodox_ez/keymaps/stamm/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/stamm/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/stamm/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/steno/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/steno/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/steno/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/toshi0383/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/vim/config.h create mode 100644 keyboards/ergodox_ez/keymaps/vim/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/vim/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/vim/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/vim/vim.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/batin/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/rgb_matrix_user.inc create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/rgb_matrix_map.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/rgb_matrix_map.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/leviport/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/leviport/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/macos/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/macos/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/macos/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap_helpers.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/.gitignore create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/README.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/paddlegame.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/rgb_matrix_map.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/config.h create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/rules.mk create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/wholesomeducky/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.c create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.json create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/readme.md create mode 100644 keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/rules.mk create mode 100644 keyboards/handwired/2x2keypad/2x2keypad.c create mode 100644 keyboards/handwired/2x2keypad/2x2keypad.h create mode 100644 keyboards/handwired/2x2keypad/config.h create mode 100644 keyboards/handwired/2x2keypad/keymaps/default/keymap.c create mode 100644 keyboards/handwired/2x2keypad/keymaps/default/rules.mk create mode 100644 keyboards/handwired/2x2keypad/rules.mk create mode 100644 keyboards/handwired/xd128/config.h create mode 100644 keyboards/handwired/xd128/keymaps/levi_layout/keymap.c create mode 100644 keyboards/handwired/xd128/rules.mk create mode 100644 keyboards/handwired/xd128/xd128.c create mode 100644 keyboards/handwired/xd128/xd128.h create mode 100644 keyboards/handwired/xd75/keymaps/levi_layout/config.h create mode 100644 keyboards/handwired/xd75/keymaps/levi_layout/keymap.c create mode 100644 keyboards/handwired/xd75/keymaps/levi_layout/readme.md create mode 100644 keyboards/handwired/xd75/keymaps/levi_layout/rules.mk create mode 100644 keyboards/melody96/config.h create mode 100644 keyboards/melody96/info.json create mode 100644 keyboards/melody96/keymaps/crilith/keymap.c create mode 100644 keyboards/melody96/keymaps/default/keymap.c create mode 100644 keyboards/melody96/keymaps/default_96_with60_split_num0/keymap.c create mode 100644 keyboards/melody96/keymaps/dvz/config.h create mode 100644 keyboards/melody96/keymaps/dvz/keymap.c create mode 100644 keyboards/melody96/keymaps/dvz/readme.md create mode 100644 keyboards/melody96/keymaps/dvz/rules.mk create mode 100644 keyboards/melody96/keymaps/konstantin/config.h create mode 100644 keyboards/melody96/keymaps/konstantin/keymap.c create mode 100644 keyboards/melody96/keymaps/konstantin/rules.mk create mode 100644 keyboards/melody96/keymaps/lessthan3/keymap.c create mode 100644 keyboards/melody96/keymaps/levi-layout/keymap.c create mode 100644 keyboards/melody96/keymaps/via/keymap.c create mode 100644 keyboards/melody96/keymaps/via/rules.mk create mode 100644 keyboards/melody96/keymaps/zunger/config.h create mode 100644 keyboards/melody96/keymaps/zunger/keymap.c create mode 100644 keyboards/melody96/keymaps/zunger/readme.md create mode 100644 keyboards/melody96/keymaps/zunger/rules.mk create mode 100644 keyboards/melody96/melody96.c create mode 100644 keyboards/melody96/melody96.h create mode 100644 keyboards/melody96/readme.md create mode 100644 keyboards/melody96/rules.mk create mode 100644 keyboards/system76/launch_1/i2c.c create mode 100644 keyboards/system76/launch_1/i2c.h create mode 100644 keyboards/system76/launch_1/keymaps/jeremy/keymap.c create mode 100644 keyboards/system76/launch_1/keymaps/levi/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/README.md create mode 100644 keyboards/system76/launch_alpha_1/config.h create mode 100644 keyboards/system76/launch_alpha_1/keymaps/carl/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/keymaps/default/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/keymaps/ian/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/keymaps/jeremy/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/keymaps/john/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/keymaps/levi/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/keymaps/nathaniel/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/keymaps/sean/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/keymaps/shpurk/keymap.c create mode 100644 keyboards/system76/launch_alpha_1/launch_alpha_1.c create mode 100644 keyboards/system76/launch_alpha_1/launch_alpha_1.h create mode 100644 keyboards/system76/launch_alpha_1/rules.mk create mode 100644 keyboards/system76/launch_alpha_2/README.md create mode 100644 keyboards/system76/launch_alpha_2/config.h create mode 100644 keyboards/system76/launch_alpha_2/keymaps/default/keymap.c create mode 100644 keyboards/system76/launch_alpha_2/keymaps/jeremy/keymap.c create mode 100644 keyboards/system76/launch_alpha_2/launch_alpha_2.c create mode 100644 keyboards/system76/launch_alpha_2/launch_alpha_2.h create mode 100644 keyboards/system76/launch_alpha_2/layout-files/system76-launch-configurable-keyboard-1-0.dxf create mode 100644 keyboards/system76/launch_alpha_2/layout-files/system76-launch-configurable-keyboard-1-0.json create mode 100644 keyboards/system76/launch_alpha_2/rules.mk create mode 100644 keyboards/system76/launch_test/README.md create mode 100644 keyboards/system76/launch_test/config.h create mode 100644 keyboards/system76/launch_test/keymaps/default/keymap.c create mode 100644 keyboards/system76/launch_test/launch_test.c create mode 100644 keyboards/system76/launch_test/launch_test.h create mode 100644 keyboards/system76/launch_test/rules.mk create mode 100644 keyboards/system76/ortho_split_2u/config.h create mode 100644 keyboards/system76/ortho_split_2u/keymaps/default/keymap.c create mode 100644 keyboards/system76/ortho_split_2u/keymaps/levi/keymap.c create mode 100644 keyboards/system76/ortho_split_2u/ortho_split_2u.c create mode 100644 keyboards/system76/ortho_split_2u/ortho_split_2u.h create mode 100644 keyboards/system76/ortho_split_2u/rules.mk create mode 100644 keyboards/system76/virgo/config.h create mode 100644 keyboards/system76/virgo/keymaps/default/keymap.c create mode 100644 keyboards/system76/virgo/keymaps/jeremy/keymap.c create mode 100644 keyboards/system76/virgo/rules.mk create mode 100644 keyboards/system76/virgo/virgo.c create mode 100644 keyboards/system76/virgo/virgo.h diff --git a/keyboards/dactyl_by_levi/190hotfix.sh b/keyboards/dactyl_by_levi/190hotfix.sh new file mode 100644 index 000000000000..bdc3adce2257 --- /dev/null +++ b/keyboards/dactyl_by_levi/190hotfix.sh @@ -0,0 +1,19 @@ +#!/bin/bash +#a tool to fix broken keymaps as a result of pull request #190 +#changing the declaration of matrix_scan_user() and matrix_init_user() +# +#This script will save a copy of the specified keymap as keymap.c.bak +#and then create a new keymap.c with the definion corrected. +#this script must be run from the ergodox_ez directory +if [ $# -ne 1 ]; then + echo $0: usage: ./190hotfix keymap_name + exit 1 +fi + +echo Saving backup as ./keymaps/$1/keymap.c.bak ... +mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak + +echo Modifying ./keymaps/$1/keymap.c ... +cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c + +echo Complete! diff --git a/keyboards/dactyl_by_levi/config.h b/keyboards/dactyl_by_levi/config.h new file mode 100644 index 000000000000..f031681a10ee --- /dev/null +++ b/keyboards/dactyl_by_levi/config.h @@ -0,0 +1,140 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef ERGODOX_EZ_CONFIG_H +#define ERGODOX_EZ_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Levi +#define PRODUCT Dactyl +#define DESCRIPTION QMK keyboard firmware for BadDactyl + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS 6 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#ifndef LED_BRIGHTNESS_LO +#define LED_BRIGHTNESS_LO 15 +#endif +#ifndef LED_BRIGHTNESS_HI +#define LED_BRIGHTNESS_HI 255 +#endif +#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_HI) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 15 // Number of LEDs +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 255 +#define RGBLIGHT_VAL_STEP 12 + +/* fix space cadet rollover issue */ +#define DISABLE_SPACE_CADET_ROLLOVER + +#define RGBW_BB_TWI + +#define RGBW 1 + +/* + * The debounce filtering reports a key/switch change directly, + * without any extra delay. After that the debounce logic will filter + * all further changes, until the key/switch reports the same state for + * the given count of scans. + * So a perfect switch will get a short debounce period and + * a bad key will get a much longer debounce period. + * The result is an adaptive debouncing period for each switch. + * + * If you don't define it here, the matrix code will default to + * 5, which is now closer to 10ms, but still plenty according to + * manufacturer specs. + */ + +#define USB_MAX_POWER_CONSUMPTION 500 + +// RGB backlight +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 24 +#define DRIVER_2_LED_TOTAL 24 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF +/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ +/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */ +/* #define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00 */ +/* #define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00 */ +/* #define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF */ +/* #define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF */ +/* #define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF */ + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_SCAN_RATE + +#endif diff --git a/keyboards/dactyl_by_levi/dactyl_by_levi.c b/keyboards/dactyl_by_levi/dactyl_by_levi.c new file mode 100644 index 000000000000..09443cf72529 --- /dev/null +++ b/keyboards/dactyl_by_levi/dactyl_by_levi.c @@ -0,0 +1,307 @@ +#include QMK_KEYBOARD_H + +extern inline void ergodox_board_led_on(void); +extern inline void ergodox_right_led_1_on(void); +extern inline void ergodox_right_led_2_on(void); +extern inline void ergodox_right_led_3_on(void); +extern inline void ergodox_right_led_on(uint8_t led); + +extern inline void ergodox_board_led_off(void); +extern inline void ergodox_right_led_1_off(void); +extern inline void ergodox_right_led_2_off(void); +extern inline void ergodox_right_led_3_off(void); +extern inline void ergodox_right_led_off(uint8_t led); + +extern inline void ergodox_led_all_on(void); +extern inline void ergodox_led_all_off(void); + +extern inline void ergodox_right_led_1_set(uint8_t n); +extern inline void ergodox_right_led_2_set(uint8_t n); +extern inline void ergodox_right_led_3_set(uint8_t n); +extern inline void ergodox_right_led_set(uint8_t led, uint8_t n); + +extern inline void ergodox_led_all_set(uint8_t n); + +bool i2c_initialized = 0; +i2c_status_t mcp23018_status = 0x20; + +void matrix_init_kb(void) { + // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") + TCCR1A = 0b10101001; // set and configure fast PWM + TCCR1B = 0b00001001; // set and configure fast PWM + + // (tied to Vcc for hardware convenience) + DDRB &= ~(1<<4); // set B(4) as input + PORTB &= ~(1<<4); // set B(4) internal pull-up disabled + + // unused pins - C7, D4, D5, D7, E6 + // set as input with internal pull-up enabled + DDRC &= ~(1<<7); + DDRD &= ~(1<<5 | 1<<4); + DDRE &= ~(1<<6); + PORTC |= (1<<7); + PORTD |= (1<<5 | 1<<4); + PORTE |= (1<<6); + + ergodox_blink_all_leds(); + + matrix_init_user(); +} + +void ergodox_blink_all_leds(void) +{ + ergodox_led_all_off(); + ergodox_led_all_set(LED_BRIGHTNESS_DEFAULT); + ergodox_right_led_1_on(); + _delay_ms(50); + ergodox_right_led_2_on(); + _delay_ms(50); + ergodox_right_led_3_on(); + _delay_ms(50); +#ifdef LEFT_LEDS + ergodox_left_led_1_on(); + _delay_ms(50); + if (!mcp23018_status) { + mcp23018_status = ergodox_left_leds_update(); + } + ergodox_left_led_2_on(); + _delay_ms(50); + if (!mcp23018_status) { + mcp23018_status = ergodox_left_leds_update(); + } + ergodox_left_led_3_on(); + _delay_ms(50); + if (!mcp23018_status) { + mcp23018_status = ergodox_left_leds_update(); + } +#endif + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); +#ifdef LEFT_LEDS + _delay_ms(50); + ergodox_left_led_1_off(); + if (!mcp23018_status) { + mcp23018_status = ergodox_left_leds_update(); + } + _delay_ms(50); + ergodox_left_led_2_off(); + if (!mcp23018_status) { + mcp23018_status = ergodox_left_leds_update(); + } + _delay_ms(50); + ergodox_left_led_3_off(); + if (!mcp23018_status) { + mcp23018_status = ergodox_left_leds_update(); + } +#endif + + //ergodox_led_all_on(); + //_delay_ms(333); + ergodox_led_all_off(); +} + +uint8_t init_mcp23018(void) { + mcp23018_status = 0x20; + + // I2C subsystem + + // uint8_t sreg_prev; + // sreg_prev=SREG; + // cli(); + + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + _delay_ms(1000); + } + // i2c_init(); // on pins D(1,0) + // _delay_ms(1000); + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + +out: + i2c_stop(); + +#ifdef LEFT_LEDS + if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update(); +#endif // LEFT_LEDS + + // SREG=sreg_prev; + + return mcp23018_status; +} + +#ifdef LEFT_LEDS +uint8_t ergodox_left_leds_update(void) { + if (mcp23018_status) { // if there was an error + return mcp23018_status; + } +#define LEFT_LED_1_SHIFT 7 // in MCP23018 port B +#define LEFT_LED_2_SHIFT 6 // in MCP23018 port B +#define LEFT_LED_3_SHIFT 7 // in MCP23018 port A + + // set logical value (doesn't matter on inputs) + // - unused : hi-Z : 1 + // - input : hi-Z : 1 + // - driving : hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_write(OLATA, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111 + & ~(ergodox_left_led_3< +#include +#include "i2c_master.h" +#include + +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +// I2C aliases and register addresses (see "mcp23018.md") +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +extern i2c_status_t mcp23018_status; +#define ERGODOX_EZ_I2C_TIMEOUT 100 + +void init_ergodox(void); +void ergodox_blink_all_leds(void); +uint8_t init_mcp23018(void); +uint8_t ergodox_left_leds_update(void); + +#ifndef LED_BRIGHTNESS_LO +#define LED_BRIGHTNESS_LO 15 +#endif +#ifndef LED_BRIGHTNESS_HI +#define LED_BRIGHTNESS_HI 255 +#endif + + +inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } +inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } +inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } +inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } +inline void ergodox_right_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); } + +inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } +inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } +inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } +inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } +inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); } + +#ifdef LEFT_LEDS +bool ergodox_left_led_1; +bool ergodox_left_led_2; +bool ergodox_left_led_3; + +inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; } +inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; } +inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; } + +inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; } +inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } +inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } +#endif // LEFT_LEDS + +inline void ergodox_led_all_on(void) +{ + ergodox_board_led_on(); + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); +#ifdef LEFT_LEDS + ergodox_left_led_1_on(); + ergodox_left_led_2_on(); + ergodox_left_led_3_on(); +#endif // LEFT_LEDS +} + +inline void ergodox_led_all_off(void) +{ + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +#ifdef LEFT_LEDS + ergodox_left_led_1_off(); + ergodox_left_led_2_off(); + ergodox_left_led_3_off(); +#endif // LEFT_LEDS +} + +inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } +inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } +inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } +inline void ergodox_right_led_set(uint8_t led, uint8_t n) { + (led == 1) ? (OCR1A = n) : + (led == 2) ? (OCR1B = n) : + (OCR1C = n); +} + +inline void ergodox_led_all_set(uint8_t n) +{ + ergodox_right_led_1_set(n); + ergodox_right_led_2_set(n); + ergodox_right_led_3_set(n); +} + +/* + * LEFT HAND: LINES 115-122 + * RIGHT HAND: LINES 124-131 + */ +#define LAYOUT_ergodox( \ + \ + k50,k51,k52,k53,k54,k55,k56, \ + k40,k41,k42,k43,k44,k45,k46, \ + k30,k31,k32,k33,k34,k35, \ + k20,k21,k22,k23,k24,k25,k26, \ + k10,k11,k12,k13,k14, \ + k05,k06, \ + k04, \ + k03,k02,k01, \ + \ + k57,k58,k59,k5A,k5B,k5C,k5D, \ + k47,k48,k49,k4A,k4B,k4C,k4D, \ + k38,k39,k3A,k3B,k3C,k3D, \ + k27,k28,k29,k2A,k2B,k2C,k2D, \ + k19,k1A,k1B,k1C,k1D, \ + k07,k08, \ + k09, \ + k0C,k0B,k0A ) \ + \ + /* matrix positions */ \ + { \ + { KC_NO, k10, k20, k30, k40, k50 }, \ + { k01, k11, k21, k31, k41, k51 }, \ + { k02, k12, k22, k32, k42, k52 }, \ + { k03, k13, k23, k33, k43, k53 }, \ + { k04, k14, k24, k34, k44, k54 }, \ + { k05, KC_NO, k25, k35, k45, k55 }, \ + { k06, KC_NO, k26, KC_NO, k46, k56 }, \ + \ + { k07, KC_NO, k27, KC_NO, k47, k57 }, \ + { k08, KC_NO, k28, k38, k48, k58 }, \ + { k09, k19, k29, k39, k49, k59 }, \ + { k0A, k1A, k2A, k3A, k4A, k5A }, \ + { k0B, k1B, k2B, k3B, k4B, k5B }, \ + { k0C, k1C, k2C, k3C, k4C, k5C }, \ + { KC_NO, k1D, k2D, k3D, k4D, k5D } \ + } + +/* + * LEFT HAND: LINES 158-165 + * RIGHT HAND: LINES 167-174 + */ +#define LAYOUT_ergodox_80( \ + \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k45,k46,k54, \ + k53,k52,k51, \ + \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59,k47,k48, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { k00, k10, k20, k30, k40, KC_NO }, \ + { k01, k11, k21, k31, k41, k51 }, \ + { k02, k12, k22, k32, k42, k52 }, \ + { k03, k13, k23, k33, k43, k53 }, \ + { k04, k14, k24, k34, k44, k54 }, \ + { k05, k15, k25, k35, k45, k55 }, \ + { k06, k16, KC_NO, k36, k46, k56 }, \ + \ + { k07, k17, KC_NO, k37, k47, k57 }, \ + { k08, k18, k28, k38, k48, k58 }, \ + { k09, k19, k29, k39, k49, k59 }, \ + { k0A, k1A, k2A, k3A, k4A, k5A }, \ + { k0B, k1B, k2B, k3B, k4B, k5B }, \ + { k0C, k1C, k2C, k3C, k4C, k5C }, \ + { k0D, k1D, k2D, k3D, k4D, KC_NO } \ + } + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_ergodox_pretty( \ + L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ + L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ + L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \ + L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ + L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ + L55,L56, R50,R51, \ + L54, R52, \ + L53,L52,L51, R55,R54,R53 ) \ + \ + /* matrix positions */ \ + { \ + { L00, L10, L20, L30, L40, KC_NO }, \ + { L01, L11, L21, L31, L41, L51 }, \ + { L02, L12, L22, L32, L42, L52 }, \ + { L03, L13, L23, L33, L43, L53 }, \ + { L04, L14, L24, L34, L44, L54 }, \ + { L05, L15, L25, L35, KC_NO, L55 }, \ + { L06, L16, KC_NO, L36, KC_NO, L56 }, \ + \ + { R00, R10, KC_NO, R30,KC_NO, R50 }, \ + { R01, R11, R21, R31,KC_NO, R51 }, \ + { R02, R12, R22, R32, R42, R52 }, \ + { R03, R13, R23, R33, R43, R53 }, \ + { R04, R14, R24, R34, R44, R54 }, \ + { R05, R15, R25, R35, R45, R55 }, \ + { R06, R16, R26, R36, R46, KC_NO } \ + } + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_ergodox_pretty_80( \ + L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ + L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ + L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \ + L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ + L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ + L55,L56, R50,R51, \ + L45,L46,L54, R52,R40,R41, \ + L53,L52,L51, R55,R54,R53 ) \ + \ + /* matrix positions */ \ + { \ + { L00, L10, L20, L30, L40, KC_NO }, \ + { L01, L11, L21, L31, L41, L51 }, \ + { L02, L12, L22, L32, L42, L52 }, \ + { L03, L13, L23, L33, L43, L53 }, \ + { L04, L14, L24, L34, L44, L54 }, \ + { L05, L15, L25, L35, L45, L55 }, \ + { L06, L16, KC_NO, L36, L46, L56 }, \ + \ + { R00, R10, KC_NO, R30, R40, R50 }, \ + { R01, R11, R21, R31, R41, R51 }, \ + { R02, R12, R22, R32, R42, R52 }, \ + { R03, R13, R23, R33, R43, R53 }, \ + { R04, R14, R24, R34, R44, R54 }, \ + { R05, R15, R25, R35, R45, R55 }, \ + { R06, R16, R26, R36, R46, KC_NO } \ + } + +#endif diff --git a/keyboards/dactyl_by_levi/info.json b/keyboards/dactyl_by_levi/info.json new file mode 100644 index 000000000000..6f7a941574b0 --- /dev/null +++ b/keyboards/dactyl_by_levi/info.json @@ -0,0 +1,104 @@ +{ + "keyboard_name": "ErgoDox EZ", + "url": "ergodox-ez.com", + "maintainer": "erez", + "width": 17, + "height": 8, + + "layouts": { + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_80": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + }, + "LAYOUT_ergodox_pretty_80": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + } + } +} diff --git a/keyboards/dactyl_by_levi/keymaps/default/keymap.c b/keyboards/dactyl_by_levi/keymaps/default/keymap.c new file mode 100644 index 000000000000..ba694710598d --- /dev/null +++ b/keyboards/dactyl_by_levi/keymaps/default/keymap.c @@ -0,0 +1,115 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define QW 0 // default QWERTY +#define FN 1 // Arrows, function keys, media keys, etc. + +enum custom_keycodes { + EPRM = SAFE_RANGE, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 1: QWERTY layer + * + * ,------------------------------------------------. ,------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | KC_NO| |KC_NO | 6 | 7 | 8 | 9 | 0 | = | + * |------+------+------+------+------+-------------| |------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | KC_NO| |KC_NO | Y | U | I | O | P | - | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | LCtl | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| KC_NO| |KC_NO |------+------+------+------+------+------| + * | LSft | Z | X | C | V | B | | | | N | M | , | . | / | RSft | + * |------+------+------+------+------+-------------' `-------------+------+------+------+------+------| + * | Esc | [ | ~FN | ] | Del | | Bspc | RAlt | \ | RSup | RCtl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LSup | LAlt | | Tab | Del | + * ,------|------|------| |------+------+------. + * | | | Esc | | Enter| | | + * | Space| LCtl |------| |------| LSft | ~FN | + * | | | ~FN | | RCtl | | | + * `--------------------' `--------------------' + */ +[QW] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, + KC_ESC, KC_LBRC, MO(FN), KC_RBRC, KC_DEL, + KC_LGUI, KC_LALT, + KC_ESC, + KC_SPC, KC_LCTL, MO(FN), + // right hand + KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_BSPC, KC_RALT, KC_BSLS, KC_RGUI, KC_RCTL, + KC_TAB, KC_DEL, + KC_ENT, + KC_RCTL, KC_LSFT, MO(FN) +), +/* Keymap 2: Layer with arrows, media keys, function keys, etc + * + * ,------------------------------------------------. ,------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | KC_NO| |KC_NO | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------| |------+------+------+------+------+------+------| + * | Tab | Home | Up | End | PgUp | VolUp| KC_NO| |KC_NO | PgUp | Home | Up | End | NO | PrScr| + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | LCtl | Left | Down | Right| PgDn | VolDn|------| |------| PgDn | LEFT | DOWN | RIGHT| NO | NO | + * |------+------+------+------+------+------| KC_NO| |KC_NO |------+------+------+------+------+------| + * | LSft | NO | NO | NO | NO | Mute | | | | NO | NO |MPause|MPrev |MNext | RSft | + * |------+------+------+------+------+-------------' `-------------+------+------+------+------+------| + * | Esc | [ | Z | ] | Del | | Bspc |Dvorak|Qwerty| RSup | RCtl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LSup | LAlt | | Tab | Del | + * ,------|------|------| |------+------+------. + * | | | Esc | | Enter| | | + * | Space| LCtl |------| |------| LSft | ~FN | + * | | | ~FN | | RCtl | | | + * `--------------------' `--------------------' + */ +[FN] = LAYOUT_ergodox( + // left hand + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, + KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_NO, + KC_LCTL, KC_LEFT, KC_DOWN, KC_LEFT, KC_PGDN, KC_VOLD, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_NO, + KC_ESC, KC_RBRC, KC_Z, KC_RBRC, KC_DEL, + KC_LGUI, KC_LALT, + KC_ESC, + KC_SPC, KC_LCTL, MO(FN), + // right hand + KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_NO, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_NO, KC_PSCR, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT, + KC_BSPC, KC_RALT, KC_BSLS, KC_RGUI, KC_RCTL, + KC_TAB, KC_DEL, + KC_ENT, + KC_RCTL, KC_LSFT, MO(FN) +), + +}; + + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +#ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); +#endif +}; + +// Runs whenever there is a layer state change. +uint32_t layer_state_set_user(uint32_t state) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + return state; +}; diff --git a/keyboards/dactyl_by_levi/keymaps/default/readme.md b/keyboards/dactyl_by_levi/keymaps/default/readme.md new file mode 100644 index 000000000000..0d06627f61bc --- /dev/null +++ b/keyboards/dactyl_by_levi/keymaps/default/readme.md @@ -0,0 +1,5 @@ +My hand-wired Dactyl. I changed the matrix a bit to accommodate some of the +wiring mistakes I made, so it won't necessarily be correct for all ergodoxen +or a dactyls. + +This is based off of the ErgoDox EZ default configuration. diff --git a/keyboards/dactyl_by_levi/keymaps/levi_layout/keymap.c b/keyboards/dactyl_by_levi/keymaps/levi_layout/keymap.c new file mode 100644 index 000000000000..d066b94b29a5 --- /dev/null +++ b/keyboards/dactyl_by_levi/keymaps/levi_layout/keymap.c @@ -0,0 +1,237 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define DV 0 // default Dvorak layer +#define QW 1 // QWERTY layer +#define FN 2 // Arrows, function keys, media keys, etc. + +enum custom_keycodes { + EPRM = SAFE_RANGE, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic Dvorak layer + * + * ,------------------------------------------------. ,------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | KC_NO| |KC_NO | 6 | 7 | 8 | 9 | 0 | = | + * |------+------+------+------+------+-------------| |------+------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | KC_NO| |KC_NO | F | G | C | R | L | / | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | LCtl | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |------+------+------+------+------+------| KC_NO| |KC_NO |------+------+------+------+------+------| + * | LSft | ; | Q | J | K | X | | | | B | M | W | V | Z | RSft | + * |------+------+------+------+------+-------------' `-------------+------+------+------+------+------| + * | Esc | [ | Z | ] | Del | | Bspc | RAlt | \ | RSup | RCtl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LSup | LAlt | | Tab | Del | + * ,------|------|------| |------+------+------. + * | | | Esc | | Enter| | | + * | Space| LCtl |------| |------| LSft | ~FN | + * | | | ~FN | | RCtl | | | + * `--------------------' `--------------------' + */ +[DV] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_NO, + KC_ESC, KC_RBRC, KC_Z, KC_RBRC, KC_DEL, + KC_LGUI, KC_LALT, + KC_ESC, + KC_SPC, KC_LCTL, MO(FN), + // right hand + KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_NO, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_BSPC, KC_RALT, KC_BSLS, KC_RGUI, KC_RCTL, + KC_TAB, KC_DEL, + KC_ENT, + KC_RCTL, KC_LSFT, MO(FN) +), +/* Keymap 1: QWERTY layer + * + * ,------------------------------------------------. ,------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | KC_NO| |KC_NO | 6 | 7 | 8 | 9 | 0 | = | + * |------+------+------+------+------+-------------| |------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | KC_NO| |KC_NO | Y | U | I | O | P | - | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | LCtl | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| KC_NO| |KC_NO |------+------+------+------+------+------| + * | LSft | Z | X | C | V | B | | | | N | M | , | . | / | RSft | + * |------+------+------+------+------+-------------' `-------------+------+------+------+------+------| + * | Esc | [ | Z | ] | Del | | Bspc | RAlt | \ | RSup | RCtl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LSup | LAlt | | Tab | Del | + * ,------|------|------| |------+------+------. + * | | | Esc | | Enter| | | + * | Space| LCtl |------| |------| LSft | ~FN | + * | | | ~FN | | RCtl | | | + * `--------------------' `--------------------' + */ +[QW] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, + KC_ESC, KC_RBRC, KC_Z, KC_RBRC, KC_DEL, + KC_LGUI, KC_LALT, + KC_ESC, + KC_SPC, KC_LCTL, MO(FN), + // right hand + KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_BSPC, KC_RALT, KC_BSLS, KC_RGUI, KC_RCTL, + KC_TAB, KC_DEL, + KC_ENT, + KC_RCTL, KC_LSFT, MO(FN) +), +/* Keymap 2: Layer with arrows, media keys, function keys, etc + * + * ,------------------------------------------------. ,------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | KC_NO| |KC_NO | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------| |------+------+------+------+------+------+------| + * | Tab | Home | Up | End | PgUp | VolUp| KC_NO| |KC_NO | PgUp | Home | Up | End | NO | PrScr| + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | LCtl | Left | Down | Right| PgDn | VolDn|------| |------| PgDn | LEFT | DOWN | RIGHT| NO | NO | + * |------+------+------+------+------+------| KC_NO| |KC_NO |------+------+------+------+------+------| + * | LSft | NO | NO | NO | NO | Mute | | | | NO | NO |MPause|MPrev |MNext | RSft | + * |------+------+------+------+------+-------------' `-------------+------+------+------+------+------| + * | Esc | [ | Z | ] | Del | | Bspc |Dvorak|Qwerty| RSup | RCtl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LSup | LAlt | | Tab | Del | + * ,------|------|------| |------+------+------. + * | | | Esc | | Enter| | | + * | Space| LCtl |------| |------| LSft | ~FN | + * | | | ~FN | | RCtl | | | + * `--------------------' `--------------------' + */ +[FN] = LAYOUT_ergodox( + // left hand + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, + KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_NO, + KC_LCTL, KC_LEFT, KC_DOWN, KC_LEFT, KC_PGDN, KC_VOLD, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_NO, + KC_ESC, KC_RBRC, KC_Z, KC_RBRC, KC_DEL, + KC_LGUI, KC_LALT, + KC_ESC, + KC_SPC, KC_LCTL, MO(FN), + // right hand + KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_NO, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_NO, KC_PSCR, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT, + KC_BSPC, KC_RALT, KC_BSLS, KC_RGUI, KC_RCTL, + KC_TAB, KC_DEL, + KC_ENT, + KC_RCTL, KC_LSFT, MO(FN) +), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case EPRM: + eeconfig_init(); + return false; + case VRSN: + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + #ifdef RGBLIGHT_ENABLE + case RGB_SLD: + rgblight_mode(1); + return false; + #endif + } + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +#ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); +#endif +}; + +// Runs whenever there is a layer state change. +uint32_t layer_state_set_user(uint32_t state) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + uint8_t layer = biton32(state); + switch (layer) { + case 0: + #ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); + #else + #ifdef RGBLIGHT_ENABLE + rgblight_init(); + #endif + #endif + break; + case 1: + ergodox_right_led_1_on(); + #ifdef RGBLIGHT_COLOR_LAYER_1 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); + #endif + break; + case 2: + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_2 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); + #endif + break; + case 3: + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_3 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); + #endif + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_4 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); + #endif + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_5 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); + #endif + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_6 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); + #endif + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_7 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); + #endif + break; + default: + break; + } + + return state; +}; diff --git a/keyboards/dactyl_by_levi/keymaps/levi_layout/readme.md b/keyboards/dactyl_by_levi/keymaps/levi_layout/readme.md new file mode 100644 index 000000000000..0d06627f61bc --- /dev/null +++ b/keyboards/dactyl_by_levi/keymaps/levi_layout/readme.md @@ -0,0 +1,5 @@ +My hand-wired Dactyl. I changed the matrix a bit to accommodate some of the +wiring mistakes I made, so it won't necessarily be correct for all ergodoxen +or a dactyls. + +This is based off of the ErgoDox EZ default configuration. diff --git a/keyboards/dactyl_by_levi/matrix.c b/keyboards/dactyl_by_levi/matrix.c new file mode 100644 index 000000000000..6f604ae2b95a --- /dev/null +++ b/keyboards/dactyl_by_levi/matrix.c @@ -0,0 +1,348 @@ +/* + +Note for ErgoDox EZ customizers: Here be dragons! +This is not a file you want to be messing with. +All of the interesting stuff for you is under keymaps/ :) +Love, Erez + +Copyright 2013 Oleg Kostyuk + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include QMK_KEYBOARD_H +#ifdef DEBUG_MATRIX_SCAN_RATE +# include "timer.h" +#endif + +/* + * This constant define not debouncing time in msecs, assuming eager_pr. + * + * On Ergodox matrix scan rate is relatively low, because of slow I2C. + * Now it's only 317 scans/second, or about 3.15 msec/scan. + * According to Cherry specs, debouncing time is 5 msec. + * + * However, some switches seem to have higher debouncing requirements, or + * something else might be wrong. (Also, the scan speed has improved since + * that comment was written.) + */ + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23018_reset_loop; +// static uint16_t mcp23018_reset_loop; + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + +__attribute__((weak)) void matrix_init_user(void) {} + +__attribute__((weak)) void matrix_scan_user(void) {} + +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } + +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } + +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } + +void matrix_init(void) { + // initialize row and col + + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + debounce_init(MATRIX_ROWS); + matrix_init_quantum(); +} + +void matrix_power_up(void) { + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif +} + +// Reads and stores a row, returning +// whether a change occurred. +static inline bool store_raw_matrix_row(uint8_t index) { + matrix_row_t temp = read_cols(index); + if (raw_matrix[index] != temp) { + raw_matrix[index] = temp; + return true; + } + return false; +} + +uint8_t matrix_scan(void) { + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + ergodox_blink_all_leds(); + } + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_count++; + + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + +#ifdef LEFT_LEDS + mcp23018_status = ergodox_left_leds_update(); +#endif // LEFT_LEDS + bool changed = false; + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + // select rows from left and right hands + uint8_t left_index = i; + uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; + select_row(left_index); + select_row(right_index); + + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + changed |= store_raw_matrix_row(left_index); + changed |= store_raw_matrix_row(right_index); + + unselect_rows(); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_modified(void) // deprecated and evidently not called. +{ + return true; +} + +inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } + +inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } + +void matrix_print(void) { + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); + print(": "); + pbin_reverse16(matrix_get_row(row)); + print("\n"); + } +} + +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += bitpop16(matrix[i]); + } + return count; +} + +/* Column pin configuration + * + * Teensy + * col: 0 1 2 3 4 5 + * pin: F0 F1 F4 F5 F6 F7 + * + * MCP23018 + * col: 0 1 2 3 4 5 + * pin: B5 B4 B3 B2 B1 B0 + */ +static void init_cols(void) { + // init on mcp23018 + // not needed, already done as part of init_mcp23018() + + // init on teensy + // Input with pull-up(DDR:0, PORT:1) + DDRF &= ~(1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0); + PORTF |= (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0); +} + +static matrix_row_t read_cols(uint8_t row) { + if (row < 7) { + if (mcp23018_status) { // if there was an error + return 0; + } else { + uint8_t data = 0; + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status < 0) goto out; + data = ~((uint8_t)mcp23018_status); + mcp23018_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + return data; + } + } else { + /* read from teensy + * bitmask is 0b11110011, but we want those all + * in the lower six bits. + * we'll return 1s for the top two, but that's harmless. + */ + + return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + } +} + +/* Row pin configuration + * + * Teensy + * row: 7 8 9 10 11 12 13 + * pin: B0 B1 B2 B3 D2 D3 C6 + * + * MCP23018 + * row: 0 1 2 3 4 5 6 + * pin: A0 A1 A2 A3 A4 A5 A6 + */ +static void unselect_rows(void) { + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + + // unselect on teensy + // Hi-Z(DDR:0, PORT:0) to unselect + DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); + PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); + DDRD &= ~(1 << 2 | 1 << 3); + PORTD &= ~(1 << 2 | 1 << 3); + DDRC &= ~(1 << 6); + PORTC &= ~(1 << 6); +} + +static void select_row(uint8_t row) { + if (row < 7) { + // select on mcp23018 + if (mcp23018_status) { // if there was an error + // do nothing + } else { + // set active row low : 0 + // set other rows hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + out: + i2c_stop(); + } + } else { + // select on teensy + // Output low(DDR:1, PORT:0) to select + switch (row) { + case 7: + DDRB |= (1 << 0); + PORTB &= ~(1 << 0); + break; + case 8: + DDRB |= (1 << 1); + PORTB &= ~(1 << 1); + break; + case 9: + DDRB |= (1 << 2); + PORTB &= ~(1 << 2); + break; + case 10: + DDRB |= (1 << 3); + PORTB &= ~(1 << 3); + break; + case 11: + DDRD |= (1 << 2); + PORTD &= ~(1 << 2); + break; + case 12: + DDRD |= (1 << 3); + PORTD &= ~(1 << 3); + break; + case 13: + DDRC |= (1 << 6); + PORTC &= ~(1 << 6); + break; + } + } +} diff --git a/keyboards/dactyl_by_levi/readme.md b/keyboards/dactyl_by_levi/readme.md new file mode 100644 index 000000000000..bce8ff3c6ffe --- /dev/null +++ b/keyboards/dactyl_by_levi/readme.md @@ -0,0 +1,41 @@ +# ErgoDox EZ + +The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). + +Linux users need to modify udev rules as described on the [Teensy +Linux page]. Some distributions provide a binary, maybe called +`teensy-loader-cli`. + +[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html + +To flash the firmware: + + - Build the firmware with `make :`, for example `make ergodox_ez:default` + + - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. + `ergodox_ez_default.hex` + + - Start the teensy loader. + + - Load the .hex file into it. + + - Press the Reset button by inserting a paperclip gently into the reset hole + in the top right corner. + + - Click the button in the Teensy app to download the firmware. + +See also [video demonstration](https://www.youtube.com/watch?v=9PyiGUO9_KQ) using Teensy in auto mode. + +To flash with ´teensy-loader-cli´: + + - Build the firmware with `make keymapname`, for example `make default` + + - Run ´teensy_loader_cli -mmcu=atmega32u4 -w ergodox_ez_.hex´ + + - Press the Reset button by inserting a paperclip gently into the reset hole + in the top right corder. + +## Settings + +You may want to enable QMK_KEYS_PER_SCAN because the Ergodox has a relatively +slow scan rate. diff --git a/keyboards/dactyl_by_levi/rules.mk b/keyboards/dactyl_by_levi/rules.mk new file mode 100644 index 000000000000..e96cd20825c3 --- /dev/null +++ b/keyboards/dactyl_by_levi/rules.mk @@ -0,0 +1,93 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make = Make software. +# +# make clean = Clean out built project files. +# +# That's pretty much all you need. To compile, always go make clean, +# followed by make. +# +# For advanced users only: +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +#---------------------------------------------------------------------------- + +# # project specific files +SRC += matrix.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = halfkay + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# If you have Left LEDs (see +# https://geekhack.org/index.php?topic=22780.msg873819#msg873819 for +# details), include the following define: +# OPT_DEFS += -DLEFT_LEDS + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +UNICODE_ENABLE = yes # Unicode +SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard +SLEEP_LED_ENABLE = no +API_SYSEX_ENABLE = no +RGBLIGHT_ENABLE = yes +RGB_MATRIX_ENABLE = no # enable later +DEBOUNCE_TYPE = eager_pr + +ifeq ($(strip $(RGB_MATRIX_ENABLE)), no) + SRC += i2c_master.c +endif + + +LAYOUTS = ergodox diff --git a/keyboards/dactyl_by_levi/util/compile_keymap.py b/keyboards/dactyl_by_levi/util/compile_keymap.py new file mode 100644 index 000000000000..738aa8afc1fb --- /dev/null +++ b/keyboards/dactyl_by_levi/util/compile_keymap.py @@ -0,0 +1,707 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +"""Compiler for keymap.c files + +This scrip will generate a keymap.c file from a simple +markdown file with a specific layout. + +Usage: + python compile_keymap.py INPUT_PATH [OUTPUT_PATH] +""" +from __future__ import division +from __future__ import print_function +from __future__ import absolute_import +from __future__ import unicode_literals + +import os +import io +import re +import sys +import json +import unicodedata +import collections +import itertools as it + +PY2 = sys.version_info.major == 2 + +if PY2: + chr = unichr + + +KEYBOARD_LAYOUTS = { + # These map positions in the parsed layout to + # positions in the KEYMAP MATRIX + 'dactyl_by_levi': [ + [ 0, 1, 2, 3, 4, 5, 6], [38, 39, 40, 41, 42, 43, 44], + [ 7, 8, 9, 10, 11, 12, 13], [45, 46, 47, 48, 49, 50, 51], + [14, 15, 16, 17, 18, 19 ], [ 52, 53, 54, 55, 56, 57], + [20, 21, 22, 23, 24, 25, 26], [58, 59, 60, 61, 62, 63, 64], + [27, 28, 29, 30, 31 ], [ 65, 66, 67, 68, 69], + [ 32, 33], [70, 71 ], + [ 34], [72 ], + [ 35, 36, 37], [73, 74, 75 ], + ] +} + +ROW_INDENTS = { + 'dactyl_by_levi': [0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 5, 0, 6, 0, 4, 0] +} + +BLANK_LAYOUTS = [ +# Compact Layout +""" +.------------------------------------.------------------------------------. +| | | | | | | | | | | | | | | +!-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! +| | | | | | | | | | | | | | | +!-----+----+----+----x----x----! ! !----x----x----+----+----+-----! +| | | | | | |-----!-----! | | | | | | +!-----+----+----+----x----x----! ! !----x----x----+----+----+-----! +| | | | | | | | | | | | | | | +'-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' +""", + +# Wide Layout +""" +.---------------------------------------------. .---------------------------------------------. +| | | | | | | | ! | | | | | | | +!-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! +| | | | | | | | ! | | | | | | | +!-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! +| | | | | | |-------! !-------! | | | | | | +!-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! +| | | | | | | | ! | | | | | | | +'-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' + | | | | | | ! | | | | | + '------------------------------' '------------------------------' + .---------------. .---------------. + | | | ! | | + .-------+-------+-------! !-------+-------+-------. + ! ! | | ! | ! ! + ! ! !-------! !-------! ! ! + | | | | ! | | | + '-----------------------' '-----------------------' +""", +] + + +DEFAULT_CONFIG = { + "keymaps_includes": [ + "keymap_common.h", + ], + 'filler': "-+.'!:x", + 'separator': "|", + 'default_key_prefix': ["KC_"], +} + + +SECTIONS = [ + 'layout_config', + 'layers', +] + + +# Markdown Parsing + +ONELINE_COMMENT_RE = re.compile(r""" + ^ # comment must be at the start of the line + \s* # arbitrary whitespace + // # start of the comment + (.*) # the comment + $ # until the end of line +""", re.MULTILINE | re.VERBOSE +) + +INLINE_COMMENT_RE = re.compile(r""" + ([\,\"\[\]\{\}\d]) # anythig that might end a expression + \s+ # comment must be preceded by whitespace + // # start of the comment + \s # and succeded by whitespace + (?:[^\"\]\}\{\[]*) # the comment (except things which might be json) + $ # until the end of line +""", re.MULTILINE | re.VERBOSE) + +TRAILING_COMMA_RE = re.compile(r""" + , # the comma + (?:\s*) # arbitrary whitespace + $ # only works if the trailing comma is followed by newline + (\s*) # arbitrary whitespace + ([\]\}]) # end of an array or object +""", re.MULTILINE | re.VERBOSE) + + +def loads(raw_data): + if isinstance(raw_data, bytes): + raw_data = raw_data.decode('utf-8') + + raw_data = ONELINE_COMMENT_RE.sub(r"", raw_data) + raw_data = INLINE_COMMENT_RE.sub(r"\1", raw_data) + raw_data = TRAILING_COMMA_RE.sub(r"\1\2", raw_data) + return json.loads(raw_data) + + +def parse_config(path): + def reset_section(): + section.update({ + 'name': section.get('name', ""), + 'sub_name': "", + 'start_line': -1, + 'end_line': -1, + 'code_lines': [], + }) + + def start_section(line_index, line): + end_section() + if line.startswith("# "): + name = line[2:] + elif line.startswith("## "): + name = line[3:] + else: + name = "" + + name = name.strip().replace(" ", "_").lower() + if name in SECTIONS: + section['name'] = name + else: + section['sub_name'] = name + section['start_line'] = line_index + + def end_section(): + if section['start_line'] >= 0: + if section['name'] == 'layout_config': + config.update(loads("\n".join( + section['code_lines'] + ))) + elif section['sub_name'].startswith('layer'): + layer_name = section['sub_name'] + config['layer_lines'][layer_name] = section['code_lines'] + + reset_section() + + def amend_section(line_index, line): + section['end_line'] = line_index + section['code_lines'].append(line) + + config = DEFAULT_CONFIG.copy() + config.update({ + 'layer_lines': collections.OrderedDict(), + 'macro_ids': {'UM'}, + 'unicode_macros': {}, + }) + + section = {} + reset_section() + + with io.open(path, encoding="utf-8") as fh: + for i, line in enumerate(fh): + if line.startswith("#"): + start_section(i, line) + elif line.startswith(" "): + amend_section(i, line[4:]) + else: + # TODO: maybe parse description + pass + + end_section() + assert 'layout' in config + return config + +# header file parsing + +IF0_RE = re.compile(r""" + ^ + #if 0 + $.*? + #endif +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +COMMENT_RE = re.compile(r""" + /\* + .*? + \*/" +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +def read_header_file(path): + with io.open(path, encoding="utf-8") as fh: + data = fh.read() + data, _ = COMMENT_RE.subn("", data) + data, _ = IF0_RE.subn("", data) + return data + + +def regex_partial(re_str_fmt, flags): + def partial(*args, **kwargs): + re_str = re_str_fmt.format(*args, **kwargs) + return re.compile(re_str, flags) + return partial + + +KEYDEF_REP = regex_partial(r""" + #define + \s + ( + (?:{}) # the prefixes + (?:\w+) # the key name + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +ENUM_RE = re.compile(r""" + ( + enum + \s\w+\s + \{ + .*? # the enum content + \} + ; + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +ENUM_KEY_REP = regex_partial(r""" + ( + {} # the prefixes + \w+ # the key name + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +def parse_keydefs(config, data): + prefix_options = "|".join(config['key_prefixes']) + keydef_re = KEYDEF_REP(prefix_options) + enum_key_re = ENUM_KEY_REP(prefix_options) + for match in keydef_re.finditer(data): + yield match.groups()[0] + + for enum_match in ENUM_RE.finditer(data): + enum = enum_match.groups()[0] + for key_match in enum_key_re.finditer(enum): + yield key_match.groups()[0] + + +def parse_valid_keys(config, out_path): + basepath = os.path.abspath(os.path.join(os.path.dirname(out_path))) + dirpaths = [] + subpaths = [] + while len(subpaths) < 6: + path = os.path.join(basepath, *subpaths) + dirpaths.append(path) + dirpaths.append(os.path.join(path, "tmk_core", "common")) + dirpaths.append(os.path.join(path, "quantum")) + subpaths.append('..') + + includes = set(config['keymaps_includes']) + includes.add("keycode.h") + + valid_keycodes = set() + for dirpath, include in it.product(dirpaths, includes): + include_path = os.path.join(dirpath, include) + if os.path.exists(include_path): + header_data = read_header_file(include_path) + valid_keycodes.update( + parse_keydefs(config, header_data) + ) + return valid_keycodes + + +# Keymap Parsing + +def iter_raw_codes(layer_lines, filler, separator): + filler_re = re.compile("[" + filler + " ]") + for line in layer_lines: + line, _ = filler_re.subn("", line.strip()) + if not line: + continue + codes = line.split(separator) + for code in codes[1:-1]: + yield code + + +def iter_indexed_codes(raw_codes, key_indexes): + key_rows = {} + key_indexes_flat = [] + + for row_index, key_indexes in enumerate(key_indexes): + for key_index in key_indexes: + key_rows[key_index] = row_index + key_indexes_flat.extend(key_indexes) + assert len(raw_codes) == len(key_indexes_flat) + for raw_code, key_index in zip(raw_codes, key_indexes_flat): + # we keep track of the row mostly for layout purposes + yield raw_code, key_index, key_rows[key_index] + + +LAYER_CHANGE_RE = re.compile(r""" + (DF|TG|MO)\(\d+\) +""", re.VERBOSE) + + +MACRO_RE = re.compile(r""" + M\(\w+\) +""", re.VERBOSE) + + +UNICODE_RE = re.compile(r""" + U[0-9A-F]{4} +""", re.VERBOSE) + + +NON_CODE = re.compile(r""" + ^[^A-Z0-9_]$ +""", re.VERBOSE) + + +def parse_uni_code(raw_code): + macro_id = "UC_" + ( + unicodedata.name(raw_code) + .replace(" ", "_") + .replace("-", "_") + ) + code = "M({})".format(macro_id) + uc_hex = "{:04X}".format(ord(raw_code)) + return code, macro_id, uc_hex + + +def parse_key_code(raw_code, key_prefixes, valid_keycodes): + if raw_code in valid_keycodes: + return raw_code + + for prefix in key_prefixes: + code = prefix + raw_code + if code in valid_keycodes: + return code + + +def parse_code(raw_code, key_prefixes, valid_keycodes): + if not raw_code: + return 'KC_TRNS', None, None + + if LAYER_CHANGE_RE.match(raw_code): + return raw_code, None, None + + if MACRO_RE.match(raw_code): + macro_id = raw_code[2:-1] + return raw_code, macro_id, None + + if UNICODE_RE.match(raw_code): + hex_code = raw_code[1:] + return parse_uni_code(chr(int(hex_code, 16))) + + if NON_CODE.match(raw_code): + return parse_uni_code(raw_code) + + code = parse_key_code(raw_code, key_prefixes, valid_keycodes) + return code, None, None + + +def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): + keymap = {} + raw_codes = list(iter_raw_codes( + layer_lines, config['filler'], config['separator'] + )) + indexed_codes = iter_indexed_codes(raw_codes, key_indexes) + key_prefixes = config['key_prefixes'] + for raw_code, key_index, row_index in indexed_codes: + code, macro_id, uc_hex = parse_code( + raw_code, key_prefixes, valid_keycodes + ) + # TODO: line numbers for invalid codes + err_msg = "Could not parse key '{}' on row {}".format( + raw_code, row_index + ) + assert code is not None, err_msg + # print(repr(raw_code), repr(code), macro_id, uc_hex) + if macro_id: + config['macro_ids'].add(macro_id) + if uc_hex: + config['unicode_macros'][macro_id] = uc_hex + keymap[key_index] = (code, row_index) + return keymap + + +def parse_keymaps(config, valid_keycodes): + keymaps = collections.OrderedDict() + key_indexes = config.get( + 'key_indexes', KEYBOARD_LAYOUTS[config['layout']] + ) + # TODO: maybe validate key_indexes + + for layer_name, layer_lines, in config['layer_lines'].items(): + keymaps[layer_name] = parse_keymap( + config, key_indexes, layer_lines, valid_keycodes + ) + return keymaps + +# keymap.c output + +USERCODE = """ +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case L1: + ergodox_right_led_1_on(); + break; + case L2: + ergodox_right_led_2_on(); + break; + case L3: + ergodox_right_led_3_on(); + break; + case L4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case L5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + // case L6: + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + // case L7: + // ergodox_right_led_1_on(); + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + default: + ergodox_board_led_off(); + break; + } +}; +""" + +MACROCODE = """ +#define UC_MODE_WIN 0 +#define UC_MODE_LINUX 1 +#define UC_MODE_OSX 2 + +// TODO: allow default mode to be configured +static uint16_t unicode_mode = UC_MODE_WIN; + +uint16_t hextokeycode(uint8_t hex) {{ + if (hex == 0x0) {{ + return KC_P0; + }} + if (hex < 0xA) {{ + return KC_P1 + (hex - 0x1); + }} + return KC_A + (hex - 0xA); +}} + +void unicode_action_function(uint16_t hi, uint16_t lo) {{ + switch (unicode_mode) {{ + case UC_MODE_WIN: + register_code(KC_LALT); + + register_code(KC_PPLS); + unregister_code(KC_PPLS); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LALT); + break; + case UC_MODE_LINUX: + register_code(KC_LCTL); + register_code(KC_LSFT); + + register_code(KC_U); + unregister_code(KC_U); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + break; + case UC_MODE_OSX: + break; + }} +}} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {{ + if (!record->event.pressed) {{ + return MACRO_NONE; + }} + // MACRODOWN only works in this function + switch(id) {{ + case UM: + unicode_mode = (unicode_mode + 1) % 2; + break; +{macro_cases} +{unicode_macro_cases} + default: + break; + }} + return MACRO_NONE; +}}; +""" + + +UNICODE_MACRO_TEMPLATE = """ +case {macro_id}: + unicode_action_function(0x{hi:02x}, 0x{lo:02x}); + break; +""".strip() + + +def unicode_macro_cases(config): + for macro_id, uc_hex in config['unicode_macros'].items(): + hi = int(uc_hex, 16) >> 8 + lo = int(uc_hex, 16) & 0xFF + unimacro_keys = ", ".join( + "T({})".format( + "KP_" + digit if digit.isdigit() else digit + ) for digit in uc_hex + ) + yield UNICODE_MACRO_TEMPLATE.format( + macro_id=macro_id, hi=hi, lo=lo + ) + + +def iter_keymap_lines(keymap, row_indents=None): + col_widths = {} + col = 0 + # first pass, figure out the column widths + prev_row_index = None + for code, row_index in keymap.values(): + if row_index != prev_row_index: + col = 0 + if row_indents: + col = row_indents[row_index] + col_widths[col] = max(len(code), col_widths.get(col, 0)) + prev_row_index = row_index + col += 1 + + # second pass, yield the cell values + col = 0 + prev_row_index = None + for key_index in sorted(keymap): + code, row_index = keymap[key_index] + if row_index != prev_row_index: + col = 0 + yield "\n" + if row_indents: + for indent_col in range(row_indents[row_index]): + pad = " " * (col_widths[indent_col] - 4) + yield (" /*-*/" + pad) + col = row_indents[row_index] + else: + yield pad + yield " {}".format(code) + if key_index < len(keymap) - 1: + yield "," + # This will be yielded on the next iteration when + # we know that we're not at the end of a line. + pad = " " * (col_widths[col] - len(code)) + prev_row_index = row_index + col += 1 + + +def iter_keymap_parts(config, keymaps): + # includes + for include_path in config['keymaps_includes']: + yield '#include "{}"\n'.format(include_path) + + yield "\n" + + # definitions + for i, macro_id in enumerate(sorted(config['macro_ids'])): + yield "#define {} {}\n".format(macro_id, i) + + yield "\n" + + for i, layer_name in enumerate(config['layer_lines']): + yield '#define L{0:<3} {0:<5} // {1}\n'.format(i, layer_name) + + yield "\n" + + # keymaps + yield "const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n" + + for i, layer_name in enumerate(config['layer_lines']): + # comment + layer_lines = config['layer_lines'][layer_name] + prefixed_lines = " * " + " * ".join(layer_lines) + yield "/*\n{} */\n".format(prefixed_lines) + + # keymap codes + keymap = keymaps[layer_name] + row_indents = ROW_INDENTS.get(config['layout']) + keymap_lines = "".join(iter_keymap_lines(keymap, row_indents)) + yield "[L{0}] = KEYMAP({1}\n),\n".format(i, keymap_lines) + + yield "};\n\n" + + # macros + yield MACROCODE.format( + macro_cases="", + unicode_macro_cases="\n".join(unicode_macro_cases(config)), + ) + + # TODO: dynamically create blinking lights + yield USERCODE + + +def main(argv=sys.argv[1:]): + if not argv or '-h' in argv or '--help' in argv: + print(__doc__) + return 0 + + in_path = os.path.abspath(argv[0]) + if not os.path.exists(in_path): + print("No such file '{}'".format(in_path)) + return 1 + + if len(argv) > 1: + out_path = os.path.abspath(argv[1]) + else: + dirname = os.path.dirname(in_path) + out_path = os.path.join(dirname, "keymap.c") + + config = parse_config(in_path) + valid_keys = parse_valid_keys(config, out_path) + keymaps = parse_keymaps(config, valid_keys) + + with io.open(out_path, mode="w", encoding="utf-8") as fh: + for part in iter_keymap_parts(config, keymaps): + fh.write(part) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/keyboards/dactyl_by_levi/util/readme.md b/keyboards/dactyl_by_levi/util/readme.md new file mode 100644 index 000000000000..26c5e5d99cc7 --- /dev/null +++ b/keyboards/dactyl_by_levi/util/readme.md @@ -0,0 +1,3 @@ +# ErgoDox EZ Utilities + +The Python script in this directory, by [mbarkhau](https://github.com/mbarkhau) allows you to write out a basic ErgoDox EZ keymap using Markdown notation, and then transpile it to C, which you can then compile. It's experimental, but if you're not comfortable using C, it's a nice option. diff --git a/keyboards/ergodox_ez/keymaps/bdk/config.h b/keyboards/ergodox_ez/keymaps/bdk/config.h new file mode 100644 index 000000000000..e824b7310913 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bdk/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_TIMEOUT 167 +#define FORCE_NKRO diff --git a/keyboards/ergodox_ez/keymaps/bdk/keymap.c b/keyboards/ergodox_ez/keymaps/bdk/keymap.c new file mode 100644 index 000000000000..20af6c18ed40 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bdk/keymap.c @@ -0,0 +1,176 @@ +#include QMK_KEYBOARD_H + +#define SHIFT_DOWN() (get_mods() & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT))) +#define KC_FKEYS MO(FKEYS) + +// Layers +enum { + BASE=0, + SYMNUM, // Symbols and numbers (activated by holding enter) + FKEYS, // Function keys (activated by a thumb button) +}; + +// counter that increments on all key press events. This is needed for our LT +// handling +uint16_t press_counter = 0; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Keymap 0: Base layer + +[BASE] = LAYOUT_ergodox( + // left hand --------------------------------------------------------------------------------------------------- + KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, + KC_GRV, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LGUI, + KC_SLSH, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_HOME, + KC_LCTL, KC_LALT, KC_PGUP, KC_PGDN, KC_NO, + // left thumb -------------------------------------------------------------------------------------------------- + KC_NO, KC_NO, + KC_NO, + KC_SPC, KC_TAB, KC_FKEYS, + // right hand -------------------------------------------------------------------------------------------------- + KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, + KC_RGUI, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_END, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCTL, + // right thumb ------------------------------------------------------------------------------------------------- + KC_NO, KC_NO, + KC_NO, + KC_DEL, KC_BSPC, KC_ENT +), +// SYMNUM -- numpad and function keys +[SYMNUM] = LAYOUT_ergodox( + // left hand --------------------------------------------------------------------------------------------------- + KC_TRNS, LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AMPR, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LCBR, KC_LBRC, KC_LPRN, KC_0, KC_MINS, + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_SLSH, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // left thumb -------------------------------------------------------------------------------------------------- + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand -------------------------------------------------------------------------------------------------- + KC_TRNS, LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), KC_TRNS, + KC_TRNS, KC_PERC, KC_EQL, KC_LT, KC_GT, KC_EXLM, KC_TRNS, + KC_PLUS, KC_1, KC_RPRN, KC_RBRC, KC_RCBR, KC_TRNS, + KC_TRNS, KC_ASTR, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // right thumb ------------------------------------------------------------------------------------------------- + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +// FKEYS -- function keys +[FKEYS] = LAYOUT_ergodox( + // left hand --------------------------------------------------------------------------------------------------- + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // left thumb -------------------------------------------------------------------------------------------------- + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand -------------------------------------------------------------------------------------------------- + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // right thumb ------------------------------------------------------------------------------------------------- + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +// Code to handle layer tap. +// +// The default code doesn't work for me, so I rolled my own code. The main +// difference is that it always tries to send modifier+key combination, rather +// than two keys. One place where this is noticable is if you tap the key, +// then try hold it. + +struct tap_start_info { + uint16_t timer; + uint16_t initial_press_counter; +}; + +static struct tap_start_info tap_start_infos[5]; + +// Quick check to see if a key is down. Note that this requires NKRO enabled +static bool key_down(uint8_t code) { + return (keyboard_report->nkro.bits[code>>3] & 1<<(code&7)) != 0; +} + +static bool handle_lt(uint16_t keycode, keyrecord_t *record, uint8_t layer, uint8_t index) { + struct tap_start_info* tap_start = tap_start_infos + index; + + if(record->event.pressed) { + layer_on(layer); + tap_start->timer = timer_read(); + tap_start->initial_press_counter = press_counter; + } else { + layer_off(layer); + // Only click the key if: + // - No other keys are pressed between the press and release events + // - The release happens before the ONESHOT_TIMEOUT + if(press_counter == tap_start->initial_press_counter && timer_elapsed(tap_start->timer) < ONESHOT_TIMEOUT) { + register_code16(keycode); + unregister_code16(keycode); + } + } + return false; +} + +static bool handle_mt(uint16_t keycode, keyrecord_t *record, uint8_t mods, uint8_t index) { + struct tap_start_info* tap_start = tap_start_infos + index; + + if(record->event.pressed) { + register_mods(mods); + tap_start->timer = timer_read(); + tap_start->initial_press_counter = press_counter; + } else { + unregister_mods(mods); + // Only click the key if: + // - No other keys are pressed between the press and release events + // - The release happens before the ONESHOT_TIMEOUT + if(press_counter == tap_start->initial_press_counter && timer_elapsed(tap_start->timer) < ONESHOT_TIMEOUT) { + register_code16(keycode); + unregister_code16(keycode); + } + } + return false; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed) { + press_counter++; + // The symbol layer allows sequences repeat the same "physical" key. + // For example "0)", which is like pressing the "0" key twice in a + // row. It's very easy to make a sequence of these where the ")" + // press comes before the "0" release. If that happens, force a + // release of the "0" key, otherwise nothing will happen. + uint8_t shortcode = keycode & 0xFF; + if(key_down(shortcode)) { + unregister_code(shortcode); + } + } + + switch(keycode) { + case KC_ENTER: + return handle_lt(keycode, record, SYMNUM, 0); + + case KC_TAB: + return handle_mt(keycode, record, MOD_BIT(KC_LCTL), 1); + + case KC_LSFT: + case KC_RSFT: + return handle_mt(KC_ESC, record, MOD_BIT(keycode), 2); + } + return true; +} diff --git a/keyboards/ergodox_ez/keymaps/bdk/readme.md b/keyboards/ergodox_ez/keymaps/bdk/readme.md new file mode 100644 index 000000000000..36a211d321fd --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bdk/readme.md @@ -0,0 +1,36 @@ +# The BDK Ergodox Keyboard Layout + +## Dvorak-based + +This was the first alternative layout I switched to and I don't want to change +again. + +## Mod-tap / Layer-tap is great for thumb keys + +This means a key that activates a layer/modifier when you hold it down, but +results in a keyclick when you tap it. Thumb keys are great for this since +they are good for both high-usage keys as well as modifiers. + +The one thing to avoid is when you mean to tap a key, but hit the next key +before you release, which results in the modifier/layer instead of a tap. To +avoid this, I chose Enter/Tab as the tap keys, since they aren't chorded +together with other keys often. + +The other issue is I found several problems with using the standard MT,LT code, +so I rolled my own to handle it. + +## Don't have too many layers + +My first layouts had multiple layers that I could switch to, but that +overloaded my brain. This layout basically only uses 1 extra layer. +Technically there's also a function key layer, but I only use those keys for +a handlful of things: boot order, rename, reload page, that's basically it. + +## Brackets should be easy to use + +There's a lot of ways to lay out a symbol layer. I organized mine around +making the {[()]} chars easy to use since they're so frequent in programming. +I put them all on the symbol layer home row. + +I also arranged the numbers so 0/1 were also on the symbol layer home row. +This makes for fairly easy chording of "[0]" and "[1]". diff --git a/keyboards/ergodox_ez/keymaps/bdk/rules.mk b/keyboards/ergodox_ez/keymaps/bdk/rules.mk new file mode 100644 index 000000000000..6c5163623907 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bdk/rules.mk @@ -0,0 +1,3 @@ +# CONSOLE_ENABLE = yes +# DEBUG_ENABLE = yes +COMMAND_ENABLE = no diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h b/keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h new file mode 100755 index 000000000000..11c81f2eba49 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h @@ -0,0 +1,28 @@ +#include "../../config.h" + +// Sets good default for the speed of the mouse. +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_MAX_SPEED + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#undef MOUSEKEY_WHEEL_DELAY + +#define MOUSEKEY_WHEEL_MAX_SPEED 5 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 +#define MOUSEKEY_WHEEL_DELAY 100 + +#undef TAPPING_TOGGLE +#undef TAPPING_TERM +#undef IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 150 +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c new file mode 100755 index 000000000000..a5b107baae84 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c @@ -0,0 +1,353 @@ +// An Ergodox EZ keymap meant to be used with a bépo layout (FR ergonomic +// layout, dvorak style). The overall design is slightly inspired by the +// TypeMatrix keyboard. Switching between a TypeMatrix and an Ergodox with this +// layout should be relatively easy. +// +// See the README.md file for an image of this keymap. + +#include QMK_KEYBOARD_H +#include "keymap_bepo.h" + +// The layers that we are defining for this keyboards. +#define BASE 0 +#define FN 1 +#define MOUSE 2 +#define NUMS 3 +#define SWAP 4 +#define SYSLEDS 5 + +// The Tap Dance identifiers, used in the TD keycode and tap_dance_actions array. +#define TAP_MACRO 0 + +// A 'transparent' key code (that falls back to the layers below it). +#define ___ KC_TRANSPARENT + +// A 'blocking' key code. Does nothing but prevent falling back to another layer. +#define XXX KC_NO + +// Some combined keys (one normal keycode when tapped and one modifier or layer +// toggle when held). +#define ESC_FN LT(FN, KC_ESC) // ESC key and FN layer toggle. +#define M_RSFT MT(MOD_RSFT, BP_M) // 'M' key and right shift modifier. +#define W_RCTL MT(MOD_RCTL, BP_W) // 'W' key and right control modifier. +#define SPC_RALT MT(MOD_RALT, KC_SPC) // SPACE key and right alt modifier. +#define PERC_FN LT(FN, BP_PERC) // '%' key and FN layer toggle. + +// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators). +#define MK_CUT LSFT(KC_DEL) // shift + delete +#define MK_COPY LCTL(KC_INS) // ctrl + insert +#define MK_PASTE LSFT(KC_INS) // shift + insert + +// Custom keycodes +enum { + // SAFE_RANGE must be used to tag the first element of the enum. + // DYNAMIC_MACRO_RANGE must always be the last element of the enum if other + // values are added (as its value is used to create a couple of other keycodes + // after it). + DYNAMIC_MACRO_RANGE = SAFE_RANGE, +}; + +// This file must be included after DYNAMIC_MACRO_RANGE is defined... +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Layer 0: basic keys. + [BASE] = LAYOUT_ergodox( + /* left hand */ + BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, + KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, + KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, + KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, + ESC_FN, BP_ECIR, KC_LGUI, KC_LALT, SPC_RALT, + TT(SWAP), KC_MNXT, + KC_MPLY, + TT(FN), TT(NUMS), KC_MPRV, + /* right hand */ + KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, + KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, + BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, + KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, W_RCTL, + SPC_RALT, KC_LALT, TT(SYSLEDS), BP_CCED, PERC_FN, + KC_LEFT, KC_RIGHT, + KC_UP, + KC_DOWN, TD(TAP_MACRO), TT(MOUSE)), + + // Layer 1: function and media keys. + [FN] = LAYOUT_ergodox( + /* left hand */ + KC_SLEP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, KC_LSFT, + ___, ___, MK_CUT, MK_COPY, MK_PASTE, KC_LCTRL, ___, + ___, ___, ___, ___, ___, + ___, KC_VOLU, + KC_VOLD, + ___, ___, KC_MUTE, + /* right hand */ + ___, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + ___, ___, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_F12, + ___, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, + KC_HOME, KC_END, + KC_PGUP, + KC_PGDN, ___, ___), + // Note that any change to the FN layer above must be added to + // the MOUSE layer below (except for the arrow keys). + + // Layer 2: Mouse control. + [MOUSE] = LAYOUT_ergodox( + /* left hand */ + KC_SLEP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___, + ___, ___, KC_BTN4, KC_MS_U, KC_BTN5, ___, ___, + ___, ___, KC_MS_L, KC_MS_D, KC_MS_R, KC_LSFT, + ___, ___, MK_CUT, MK_COPY, MK_PASTE, KC_LCTRL, ___, + ___, ___, ___, ___, ___, + ___, KC_VOLU, + KC_VOLD, + ___, ___, KC_MUTE, + /* right hand */ + ___, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + ___, ___, XXX, KC_WH_U, XXX, XXX, KC_F12, + ___, KC_WH_L, KC_WH_D, KC_WH_R, XXX, ___, + ___, ___, KC_ACL0, KC_ACL1, KC_ACL2, ___, ___, + KC_BTN1, KC_BTN2, KC_BTN3, ___, ___, + ___, ___, + ___, + ___, ___, ___), + + // Layer 3: Numeric keypad and system keys. + [NUMS] = LAYOUT_ergodox( + /* left hand */ + KC_PSCR, KC_INS, KC_PAUS, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, + ___, ___, MK_CUT, MK_COPY, MK_PASTE, ___, ___, + ___, ___, ___, ___, ___, + ___, ___, + ___, + ___, ___, ___, + /* right hand */ + ___, ___, ___, ___, ___, ___, KC_NLCK, + ___, KC_PEQL, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_SLCK, + KC_PCMM, KC_P4, KC_P5, KC_P6, KC_PPLS, ___, + KC_PENT, KC_P0, KC_P1, KC_P2, KC_P3, KC_PAST, ___, + ___, ___, ___, KC_PSLS, ___, + ___, ___, + ___, + ___, ___, ___), + + // Layer 4: hand swap, all keys are mirrored to the other side of the keyboard + // except for the layer toggle itself (so there is no right arrow when this + // layer is activated). + [SWAP] = LAYOUT_ergodox( + /* left hand */ + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, + TT(SWAP), ___, + ___, + ___, ___, ___, + /* right hand */ + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, + ___, TT(SWAP), + ___, + ___, ___, ___), + + // Layer 5: The LEDs are showing the "standard" caps/num/scroll lock indicator + // instead of their default which shows the currently active layers (FN, NUMS, + // and MOUSE in that order). + [SYSLEDS] = LAYOUT_ergodox( + /* left hand */ + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, + ___, ___, + ___, + ___, ___, ___, + /* right hand */ + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, + ___, ___, TT(SYSLEDS), ___, ___, + ___, ___, + ___, + ___, ___, ___), +}; + +// Whether the macro 1 is currently being recorded. +static bool is_macro1_recording = false; + +// The current set of active layers (as a bitmask). +// There is a global 'layer_state' variable but it is set after the call +// to layer_state_set_user(). +static uint32_t current_layer_state = 0; +layer_state_t layer_state_set_user(layer_state_t state); + +// Method called at the end of the tap dance on the TAP_MACRO key. That key is +// used to start recording a macro (double tap or more), to stop recording (any +// number of tap), or to play the recorded macro (1 tap). +void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) { + uint16_t keycode; + keyrecord_t record; + dprintf("macro_tap_dance_fn %d\n", state->count); + if (is_macro1_recording) { + keycode = DYN_REC_STOP; + is_macro1_recording = false; + layer_state_set_user(current_layer_state); + } else if (state->count == 1) { + keycode = DYN_MACRO_PLAY1; + } else { + keycode = DYN_REC_START1; + is_macro1_recording = true; + layer_state_set_user(current_layer_state); + } + + record.event.pressed = true; + process_record_dynamic_macro(keycode, &record); + record.event.pressed = false; + process_record_dynamic_macro(keycode, &record); +} + +// The definition of the tap dance actions: +qk_tap_dance_action_t tap_dance_actions[] = { + // This Tap dance plays the macro 1 on TAP and records it on double tap. + [TAP_MACRO] = ACTION_TAP_DANCE_FN(macro_tapdance_fn), +}; + +// Runs for each key down or up event. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (keycode != TD(TAP_MACRO)) { + // That key is processed by the macro_tapdance_fn. Not ignoring it here is + // mostly a no-op except that it is recorded in the macros (and uses space). + // We can't just return false when the key is a tap dance, because + // process_record_user, is called before the tap dance processing (and + // returning false would eat the tap dance). + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + } + + return true; // Let QMK send the enter press/release events +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; + +// The state of the LEDs requested by the system, as a bitmask. +static uint8_t sys_led_state = 0; + +// Use these masks to read the system LEDs state. +static const uint8_t sys_led_mask_num_lock = 1 << USB_LED_NUM_LOCK; +static const uint8_t sys_led_mask_caps_lock = 1 << USB_LED_CAPS_LOCK; +static const uint8_t sys_led_mask_scroll_lock = 1 << USB_LED_SCROLL_LOCK; + +// Value to use to switch LEDs on. The default value of 255 is far too bright. +static const uint8_t max_led_value = 20; + +// Whether the given layer (one of the constant defined at the top) is active. +#define LAYER_ON(layer) (current_layer_state & (1<event.pressed) { +// layer_on(_LOWER); +// update_tri_layer(_LOWER, _RAISE, _ADJUST); +// } else { +// layer_off(_LOWER); +// update_tri_layer(_LOWER, _RAISE, _ADJUST); +// } +// return false; +// break; +// case RAISE: +// if (record->event.pressed) { +// layer_on(_RAISE); +// update_tri_layer(_LOWER, _RAISE, _ADJUST); +// } else { +// layer_off(_RAISE); +// update_tri_layer(_LOWER, _RAISE, _ADJUST); +// } +// return false; +// break; +// } +// return true; +//} + diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h new file mode 100644 index 000000000000..11c81f2eba49 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h @@ -0,0 +1,28 @@ +#include "../../config.h" + +// Sets good default for the speed of the mouse. +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_MAX_SPEED + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#undef MOUSEKEY_WHEEL_DELAY + +#define MOUSEKEY_WHEEL_MAX_SPEED 5 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 +#define MOUSEKEY_WHEEL_DELAY 100 + +#undef TAPPING_TOGGLE +#undef TAPPING_TERM +#undef IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 150 +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c new file mode 100644 index 000000000000..229ece0d74b1 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c @@ -0,0 +1,234 @@ +// An Ergodox EZ keymap mostly following the programmer's dvorak layout. +// There is a standard QWERTY layer as well +// +// See the README.md file for an image of this keymap. + +#include QMK_KEYBOARD_H + +// The layers that we are defining for this keyboards. +#define BASE 0 +#define NUM 1 +#define QWERTY 2 +#define MAC 3 + +// The Tap Dance identifiers, used in the TD keycode and tap_dance_actions array. +#define TAP_MACRO 0 + +// SAFE_RANGE must be used to tag the first element of the enum. +// DYNAMIC_MACRO_RANGE must always be the last element of the enum if other +// values are added (as its value is used to create a couple of other keycodes +// after it). +enum custom_keycodes { + MC_ARROW = SAFE_RANGE, + DYNAMIC_MACRO_RANGE +}; + +// A 'transparent' key code (that falls back to the layers below it). +#define ___ KC_TRANSPARENT + +// A 'blocking' key code. Does nothing but prevent falling back to another layer. +#define XXX KC_NO + +// Some combined keys (one normal keycode when tapped and one modifier or layer +// toggle when held). +#define SPC_RALT MT(MOD_RALT, KC_SPC) // SPACE key and right alt modifier. + +// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators). +#define MK_CUT LSFT(KC_DEL) // shift + delete +#define MK_COPY LCTL(KC_INS) // ctrl + insert +#define MK_PASTE LSFT(KC_INS) // shift + insert +//Move mac desktop spaces +#define MAC_L LGUI(LSFT(KC_UP)) // cmd + shift + up +#define MAC_R LGUI(LSFT(KC_DOWN)) // cmd + shift + down + +// This file must be included after DYNAMIC_MACRO_RANGE is defined... +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Layer 0: basic keys. + [BASE] = LAYOUT_ergodox_pretty( + KC_DLR, KC_AMPR, KC_LBRC, KC_LCBR, KC_RCBR, KC_LPRN, KC_CIRC, KC_F4, KC_EQUAL,KC_ASTR, KC_BSLASH, KC_PLUS, KC_RBRACKET, KC_EXLM, + GUI_T(KC_BSLASH), KC_SCOLON,KC_COMMA, KC_DOT, KC_P, KC_Y, KC_PERC, KC_DELETE, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + MO(NUM), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + KC_LSPO, KC_QUOTE, KC_Q, KC_J, KC_K, KC_X, KC_LALT, TD(TAP_MACRO),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, + KC_AT, KC_HASH, KC_GRAVE, KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN, KC_HOME, KC_END, TO(QWERTY), + ALT_T(KC_APPLICATION), ALL_T(KC_NO), KC_PGUP, KC_LGUI, + KC_BSLASH, TO(MAC), + KC_ENTER, KC_TAB, CTL_T(KC_ESCAPE), CTL_T(KC_ESCAPE), KC_BSPACE, KC_SPACE), + + // Layer 1: function and numpad keys. + [NUM] = LAYOUT_ergodox_pretty( + ___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___, ___, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + ___, KC_EXLM, KC_COMMA, KC_DOT, KC_MS_BTN1, KC_MS_BTN2, ___, ___, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + XXX, ___, KC_LCBR, KC_RCBR, MC_ARROW, KC_GRAVE, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_UNDS, + ___, ___, KC_CIRC, KC_LBRACKET, KC_RBRACKET, KC_TILD, ___, ___, KC_0, KC_1, KC_2, KC_3, KC_KP_SLASH, KC_BSLASH, + ___, ___, ___, ___, ___, ___, KC_0, KC_KP_DOT, KC_EQUAL, ___, + ___, ___, KC_KP_ASTERISK, KC_KP_SLASH, + KC_LCTL, ___, + KC_KP_PLUS, KC_KP_MINUS, KC_DLR, KC_DELETE, KC_BSPACE, KC_SPACE), + + // Layer 2: QWERTY control. + [QWERTY] = LAYOUT_ergodox_pretty( + /* left hand */ + KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RIGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_DELETE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, TO(BASE), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + MO(NUM), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, GUI_T(KC_QUOT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALT_T(KC_NO), MEH_T(KC_NO), KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPC, + KC_GRAVE, KC_QUOTE, LALT(KC_TAB), KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN, KC_LBRACKET, KC_RBRACKET, TO(BASE), + ___, KC_LGUI, ___, KC_ESCAPE, + KC_HOME, KC_PGUP, + KC_ENTER, KC_TAB, KC_END, KC_PGDOWN, KC_BSPACE, KC_SPACE), + + // Layer 3: Mac layer + [MAC] = LAYOUT_ergodox_pretty( + /* left hand */ + ___, KC_1, KC_2, KC_3, KC_4, KC_5, ___, ___, KC_6, KC_7, KC_8, KC_9, KC_0, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, MAC_L, MAC_R, ___, ___, ___, ___, ___, + ___, ___, ___, ___, + ___, TO(BASE), + KC_LGUI, KC_LALT, KC_LGUI, KC_LGUI, KC_LALT, KC_LGUI), +}; + +// Whether the macro 1 is currently being recorded. +static bool is_macro1_recording = false; + +// The current set of active layers (as a bitmask). +// There is a global 'layer_state' variable but it is set after the call +// to layer_state_set_user(). +static uint32_t current_layer_state = 0; +layer_state_t layer_state_set_user(layer_state_t state); + +// Method called at the end of the tap dance on the TAP_MACRO key. That key is +// used to start recording a macro (double tap or more), to stop recording (any +// number of tap), or to play the recorded macro (1 tap). +void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) { + uint16_t keycode; + keyrecord_t record; + dprintf("macro_tap_dance_fn %d\n", state->count); + if (is_macro1_recording) { + keycode = DYN_REC_STOP; + is_macro1_recording = false; + layer_state_set_user(current_layer_state); + } else if (state->count == 1) { + keycode = DYN_MACRO_PLAY1; + } else { + keycode = DYN_REC_START1; + is_macro1_recording = true; + layer_state_set_user(current_layer_state); + } + + record.event.pressed = true; + process_record_dynamic_macro(keycode, &record); + record.event.pressed = false; + process_record_dynamic_macro(keycode, &record); +} + +// The definition of the tap dance actions: +qk_tap_dance_action_t tap_dance_actions[] = { + // This Tap dance plays the macro 1 on TAP and records it on double tap. + [TAP_MACRO] = ACTION_TAP_DANCE_FN(macro_tapdance_fn) +}; + +// Runs for each key down or up event. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (keycode != TD(TAP_MACRO)) { + // That key is processed by the macro_tapdance_fn. Not ignoring it here is + // mostly a no-op except that it is recorded in the macros (and uses space). + // We can't just return false when the key is a tap dance, because + // process_record_user, is called before the tap dance processing (and + // returning false would eat the tap dance). + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + if(record->event.pressed) { + switch(keycode) { + case MC_ARROW: + SEND_STRING("=>"); + return false; + break; + } + } + } + + return true; // Let QMK send the enter press/release events +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; + +// Value to use to switch LEDs on. The default value of 255 is far too bright. +static const uint8_t max_led_value = 20; + +// Whether the given layer (one of the constant defined at the top) is active. +#define LAYER_ON(layer) (current_layer_state & (1< + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "version.h" + +#include "keymap_spanish.h" + +enum layers { + BASE = 0, //Colemak + QWERTY, //Qwerty + FN, //Colemak but FN1 to FN12 instead of numbers + NUM, //Numpad + MOUSE, //Mouse and media controls + IDEA //Shortcuts for IDEA / Other tools +}; + +//Special paste +#define S_PASTE LSFT(LGUI(KC_V)) +//tmux prefix +#define T_PREFIX LCTL(KC_B) +// Column mode +#define I_COLUMN ALGR(LCTL(LGUI(ES_MINS))) +// Terminal +#define I_TERM ALGR(KC_F12) +// Line comment +#define I_LN_COM LCTL(LGUI(KC_7)) +// Block comment +#define I_BK_COM LCTL(LGUI(KC_8)) +// Reformat code +#define I_REFORM LALT(LGUI(KC_L)) +// Rename +#define I_RENAME LSFT(KC_F6) +// Find usages +#define I_FUSAGE LALT(KC_F7) +// Code for Packt +#define P_CODE LCTL(ALGR(KC_X)) +// Search +#define I_SEARCH LCTL(LSFT(KC_F)) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Colemak MacOS Spanish layer + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 ! | 2 " | 3 · | 4 $ | 5 % | º \ | | ¡ ¿ | 6 & | 7 / | 8 ( | 9 ) | 0 = | Backsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | F | P | G | Home | | End | J | L | U | Y | Ñ | ' ? | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CAPS | A | R | S | T | D |------| |------| H | N | E | I | O | ENT | + * |--------+------+------+------+------+------| <> | | -_ |------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | K | M | , ; | . : | UP | Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Del | PgUp |Ctl/PD|Alt/[ |Cmd/] | |Cmd/{ |Alt/} | LEFT | DOWN | RIGHT| + * `----------------------------------' `----------------------------------' + * ,--------------. ,--------------. + * | Num | Mouse | | Qwer | Ctrl | + * ,------|------|-------| |------+-------+------. + * | | | FN | |SPaste| | | + * |LShift|Backsp|-------| |------| ENT |Space | + * | | | IDEA | | T-pre| | | + * `---------------------' `---------------------' + */ +[BASE] = LAYOUT_ergodox( +// left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, ES_LABK, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_HOME, + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, + KC_DEL, KC_PGUP, CTL_T(KC_PGDN), ALT_T(ES_GRV), GUI_T(ES_PLUS), + + DF(NUM), DF(MOUSE), + DF(FN), + KC_LSFT, KC_BSPC, MO(IDEA), + +// right hand + ES_IEXL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_END, KC_J, KC_L, KC_U, KC_Y, ES_NTIL, ES_QUOT, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + ES_MINS, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + GUI_T(ES_ACUT), ALT_T(KC_BSLS), KC_LEFT, KC_DOWN, KC_RIGHT, + + DF(QWERTY), KC_RCTL, + S_PASTE, + T_PREFIX, KC_ENT, KC_SPC +), +/* Keymap 1: Spanish QWERTY layer (games) //Will probably change it for a Linux/Windows Colemak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | S | D | F | G |------| |------| H | J | K | L | Ñ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Z | X | C | V | B | | | | N | M | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | Base | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[QWERTY] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______, + +// right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, + _______, KC_N, KC_M, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + DF(BASE), _______, + _______, + _______, _______, _______ +), +/* Keymap 2: Function Layer +* +* ,--------------------------------------------------. ,--------------------------------------------------. +* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | +* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +* | | | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +* | | | | | | |------| |------| | | | | | | +* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | | | +* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' +* | | | | | | | | | | | | +* `----------------------------------' `----------------------------------' +* ,-------------. ,-------------. +* | | | | | | +* ,------|------|------| |------+------+------. +* | | | Base | | | | | +* | | |------| |------| | | +* | | | | | | | | +* `--------------------' `--------------------' +*/ +[FN] = LAYOUT_ergodox( + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + DF(BASE), + _______, _______, _______, + +// right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______ +), +/* Mouse and media controls + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | | | | | | Play | | Vol+ | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | Ms U | | | | | | | | Wh U | | | | + * |--------+------+------+------+------+------| Rwd | | Vol- |------+------+------+------+------+--------| + * | | | Ms L | Ms D | Ms R | |------| |------| | Wh L | Wh D | Wh R | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | Acc0 | Acc1 | Acc2 | | Fwd | | Mute | | Btn1 | Btn2 | Btn3 | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Num | Base | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[MOUSE] = LAYOUT_ergodox( +// left hand + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, + XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, KC_MRWD, + XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, + XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, KC_MFFD, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + DF(NUM), DF(BASE), + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + +// right hand + KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_VOLD, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_R, XXXXXXX, XXXXXXX, + KC_MUTE, XXXXXXX, KC_BTN1, KC_BTN2, KC_BTN3, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX +), +/* Num pad + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | ( | ) | = | / | * | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | Up | | | | | | | 7 | 8 | 9 | - | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | Left | Down |Right | |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 |Enter | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | , |Enter | . | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Base | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUM] = LAYOUT_ergodox( +// left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + DF(BASE), _______, + _______, + _______, _______, _______, + +// right hand + _______, LSFT(KC_8), LSFT(KC_9), KC_PEQL, KC_PSLS, KC_PAST, _______, + _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_DOT, + + _______, _______, + _______, + _______, _______, _______ +), +/* IDEA + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | Renm | | Usag | | LnCm | BkCm | | Term | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | |Search| | | | | | | Refm | | | | | + * |--------+------+------+------+------+------| | | Col |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | Code | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[IDEA] = LAYOUT_ergodox( + +//Left hand + _______, _______, _______, _______, _______, _______, I_RENAME, + _______, _______, _______, I_SEARCH, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, P_CODE, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, DF(BASE), + _______, + _______, _______, _______, + +// right hand + I_FUSAGE, _______, I_LN_COM, I_BK_COM, _______, I_TERM, _______, + I_COLUMN, _______, I_REFORM, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______ +) +}; + + +void led_1_off(void) { + ergodox_right_led_1_off(); +} + +void led_2_off(void) { + ergodox_right_led_2_off(); +} + +void led_3_off(void) { + ergodox_right_led_3_off(); +} + +//Runs just one time when the keyboard initializes +void matrix_init_use(void) { + led_1_off(); + led_2_off(); + led_3_off(); +} + +// Value to use to switch LEDs on. The default value of 255 is far too bright. +static const uint8_t max_led_value = 20; + + +void led_1_on(void) { + ergodox_right_led_1_on(); + ergodox_right_led_1_set(max_led_value); +} + +void led_2_on(void) { + ergodox_right_led_2_on(); + ergodox_right_led_2_set(max_led_value); +} + +void led_3_on(void) { + ergodox_right_led_3_on(); + ergodox_right_led_3_set(max_led_value); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + + if(layer_state_cmp(state ,IDEA)) { + led_1_on(); + led_3_on(); + } else { + led_1_off(); + led_3_off(); + } + + return state; +}; + +void matrix_scan_user(void) { + + ergodox_board_led_off(); + led_1_off(); + led_2_off(); + led_3_off(); + + if(layer_state_cmp(default_layer_state, QWERTY)) { + led_3_on(); + } + + if(layer_state_cmp(default_layer_state, FN)) { + led_2_on(); + } + + if(layer_state_cmp(default_layer_state, NUM)) { + led_2_on(); + led_3_on(); + } + + if(layer_state_cmp(default_layer_state, MOUSE)) { + led_1_on(); + } +}; diff --git a/keyboards/ergodox_ez/keymaps/colemak_es_osx/readme.md b/keyboards/ergodox_ez/keymaps/colemak_es_osx/readme.md new file mode 100644 index 000000000000..b17ae015aaa5 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/colemak_es_osx/readme.md @@ -0,0 +1,67 @@ +# ErgoDox EZ Spanish Colemak configuration + +## Description + +A Colemak keymap adapted for Spanish. + +### Base Layer - Spanish Colemak + +The Base Layer is a Colemak keymap with an additional "ñ" next to the "y" key. The arrow cluster has a proper T inverted shape. + +It includes almost all Spanish Symbols from a normal 100% keyboard thanks to the use of tap keys + + +| Pressed | Tap | Shift | Alt | +|---|---|---|---| +|Left Ctrl|PgDn||| +|Left Alt|`|ˆ|[| +|Left Cmd|+|*|]| +|Right Cmd|´|¨|{| +|Right Alt|ç|Ç|}| + +For example, if you want to type ```[]```, you keep pressing the "Left Alt" (To modify) and tap "Right Alt" and "Right Cmd" to send "[" and "]" + +### Qwerty Layer + +A Qwerty layer for gaming and maybe some VIM commands. It just modifies the few keys that are different between Colemak and Qwerty and keep all the others keys + +### Fn Layer + +A layer to change the number row including "º" and "¡" for "Fn1" to "Fn12". The rest is just the same as the Base layer + +### Mouse and media controls + +Mouse movement on the left hand, wheel and buttons on the right hand. "Play/Pause", "Rewind", "Forward" in the Left inner column. "Volume Up", "Volume Down" and "Mute" in the Right inner column + +### Numpad + +A complete numpad in the right hand, plus and Arrow cluster on the left hand + +### IDEA (JetBrains IDEs) + +A momentary layer for IDEA shortcuts that require more than two fingers or any Fn key + +## How to build it + +If you already have all the dependencies (Check QMK's documentation), you can run the command: + +```bash +make ergodox_ez:colemak_es_osx +``` + +On MacOS, if you're using MacPorts you can install the following dependencies: + +```bash +port install avr-binutils +port install avr-gcc +port install avr-libc +``` + +This isn't an exhaustive list and maybe there other dependencies that are technically necessary + +## Changelog + +* Jul 2019: + * Initial version for the new QMK version + +![](https://imgur.com/AyWNGlL.png) \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/danielo515/config.h b/keyboards/ergodox_ez/keymaps/danielo515/config.h new file mode 100644 index 000000000000..ff201caa908d --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/danielo515/config.h @@ -0,0 +1,31 @@ +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#pragma once + +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 200 + +#define ONESHOT_TAP_TOGGLE 3 + +#define RGBLIGHT_SLEEP + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 50 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 + +#undef DEBOUNCE +#define DEBOUNCE 45 +// Memory saving +#ifdef CONSOLE_ENABLE +# define NO_DEBUG +# define NO_PRINT +#endif + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#undef RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergodox_ez/keymaps/danielo515/keymap.c b/keyboards/ergodox_ez/keymaps/danielo515/keymap.c new file mode 100644 index 000000000000..ee8c3213525f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/danielo515/keymap.c @@ -0,0 +1,326 @@ +#include QMK_KEYBOARD_H +#include "version.h" +#include "danielo515.h" + +/* STUPID JS code to split by ergodox rows. Call the format function with the unformatted array +sliceBy = groups => items => groups.reduce(({start, acc},size) => ({ + acc: (acc.push(items.slice(start,start+size)),acc ), + start: start + size +}), {acc:[],start:0}).acc +findMaxLen = items => items.reduce((max,curr) => max < curr.length ? curr.length : max,0) +setLen = len => strings => strings.map(str => str.padEnd(len, " ")); +const format = string => { + const items = string.split(/,\s*(?![^()]*\))/) + const group = sliceBy([7,7,6,7,5,2,1,3]) + const resize = setLen(findMaxLen(items)); + const joinstr = ',\n' + const leftItems = group(items.slice(0,items.length/2)) + const rightItems = group(items.slice(items.length/2)) + const [left,right] = [leftItems.map(resize).join(joinstr),rightItems.map(resize).join(joinstr)] + return `\n${left},\n\n${right}\n` +} +*/ + +#define OSM_SF_CMD OSM(MOD_LGUI | MOD_LSFT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ergodox( + KC_EQL ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,OSM(MOD_HYPR) , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,TD(PASTE_DANCE) , + KC_DELETE ,KC_A ,LT(3,KC_S) ,LT(2,KC_D) ,LT(4,KC_F) ,KC_G , + KC_GRAVE ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,TD(COPY_CUT) , + KC_BSLASH ,OSM(MOD_LCTL) ,OSM(MOD_LALT) ,KC_LEFT ,KC_RIGHT , + OSM_SF_CMD ,KC_PLUS , + KC_INSERT , + OSM(MOD_LSFT) ,LT(2,KC_BSPACE) ,OSM(MOD_LGUI) , + + + TO(1) ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,LT(3,KC_0) ,KC_DQUO , + KC_UNDS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,RSFT_T(KC_MINUS) , + HYPR_H ,ALT_J ,CTL_K ,LT(6,KC_L) ,TD_CLN ,CMD_QUOT , + ALT_TAB ,KC_N ,MEH_T(KC_M) ,KC_COMMA ,KC_DOT ,KC_SLASH ,LT(4,KC_KP_ASTERISK), + LT(4,KC_ENTER) ,KC_DOWN ,KC_LBRACKET ,KC_RBRACKET ,OSL(2) , + KC_AUDIO_MUTE ,KC_ESCAPE , + KC_END , + KC_COLN ,KC_LEAD ,LT(4,KC_SPACE) + ), + + [1] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,AC_E ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + LT(5, KC_DELETE),AC_A ,KC_TRANSPARENT ,KC_TRANSPARENT ,FIND ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + OSM(MOD_LSFT) ,KC_TRANSPARENT ,KC_TRANSPARENT , + TO(8) ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_ENTER ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT), + + [2] = LAYOUT_ergodox( + KC_TRANSPARENT,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_TRANSPARENT, + KC_TRANSPARENT,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,KC_CALCULATOR , + KC_TRANSPARENT,KC_HASH ,KC_DLR ,KC_TRANSPARENT,KC_RPRN ,KC_GRAVE , + KC_TRANSPARENT,KC_PERC ,KC_CIRC ,KC_LBRACKET ,KC_RBRACKET ,KC_TILD ,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + RGB_HUI , + KC_TRANSPARENT,KC_TRANSPARENT,RGB_HUD , + KC_DELETE ,KC_A ,KC_B ,KC_C ,KC_D ,KC_E ,KC_BSPACE , + KC_ENTER ,KC_F ,KC_7 ,KC_8 ,KC_9 ,KC_PERC ,KC_TRANSPARENT, + KC_HASH ,KC_4 ,KC_5 ,KC_6 ,KC_PLUS ,KC_KP_ASTERISK, + KC_KP_ENTER ,KC_COLON ,KC_1 ,KC_2 ,KC_3 ,KC_SLASH ,KC_BSLASH , + KC_0 ,KC_COMMA ,KC_DOT ,KC_EQUAL ,KC_TRANSPARENT, + RGB_TOG ,RGB_SLD , + RGB_VAI , + RGB_VAD ,KC_BSPACE ,KC_SPACE + ), + + [3] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LABK ,KC_RABK ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_AT ,KC_TRANSPARENT ,KC_EQL ,F_ARROW ,KC_GRAVE , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LBRACKET ,KC_RBRACKET ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,IARROW ,ARROW , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + // Right hand + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + LALT(LSFT(KC_UP)) ,KC_HASH ,KC_LCBR ,KC_RCBR ,KC_KP_ASTERISK ,KC_PERC ,KC_DLR , + KC_AMPR ,KC_LPRN ,KC_RPRN ,CLN_EQ ,KC_KP_PLUS ,KC_PIPE , + LALT(LSFT(KC_DOWN)),KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH ,KC_BSLASH , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + RESET ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_SPACE +), + + [4] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_TRANSPARENT , + KC_TRANSPARENT ,LCTL(KC_Q) ,LCTL(KC_DOWN) ,LGUI(KC_DOWN) ,WIN_LEFT_HALF ,WIN_RIGHT_HALF ,LALT(LSFT(KC_UP)) , + LCTL(LSFT(KC_P)) ,LCTL(KC_A) ,SAVE ,LCTL(KC_D) ,KC_TRANSPARENT ,RGUI(KC_R) , + LCTL(LSFT(KC_F)) ,UNDO ,CUT ,KC_PSCREEN ,KC_TRANSPARENT ,LGUI(KC_RIGHT) ,LALT(LSFT(KC_DOWN)), + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + + LALT(KC_F4) ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + LALT(KC_UP) ,LSFT(KC_HOME) ,LSFT(KC_LEFT) ,KC_UP ,LSFT(KC_RIGHT) ,LSFT(KC_END) ,KC_F13 , + KC_HOME ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_END ,KC_F12 , + LALT(KC_DOWN) ,LSFT(KC_INSERT) ,LCTL(LSFT(KC_J)) ,LSFT(KC_UP) ,KC_PGUP ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,LSFT(KC_DOWN) ,KC_PGDOWN ,WIN_TO_LEFT ,WIN_TO_RIGHT , + KC_TRANSPARENT ,KC_SYSTEM_SLEEP , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_BSPACE ,KC_TRANSPARENT + ), + + [5] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,LCTL(KC_TAB) ,LCTL(LSFT(KC_TAB)) ,LGUI(KC_D) ,LCTL(KC_F) ,KC_TRANSPARENT , + LGUI(KC_L) ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,LSFT(KC_F9) ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,LCTL(LGUI(KC_LEFT)) ,LCTL(LGUI(KC_RIGHT)),KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,LCTL(KC_T) ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT +), + + [6] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_MS_ACCEL2 ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_MS_WH_DOWN ,KC_MS_UP ,KC_MS_WH_UP ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_MS_LEFT ,KC_MS_DOWN ,KC_MS_RIGHT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_MS_BTN3 ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_MS_BTN1 ,KC_MS_BTN2 ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_PGUP ,LCTL(LGUI(KC_RIGHT)),KC_MS_WH_UP ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + LGUI(RCTL(KC_LEFT)) ,KC_MS_WH_DOWN ,LCTL(KC_C) ,KC_TRANSPARENT ,KC_MEDIA_STOP ,KC_MEDIA_PLAY_PAUSE , + KC_PGDOWN ,LCTL(LSFT(KC_N)) ,LCTL(LSFT(KC_J)) ,KC_MEDIA_PREV_TRACK ,KC_MEDIA_NEXT_TRACK ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_AUDIO_VOL_UP ,KC_AUDIO_VOL_DOWN ,KC_AUDIO_MUTE ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT + ), + + [7] = LAYOUT_ergodox( + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_UP ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT + ), + + [8] = LAYOUT_ergodox( + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_Q ,KC_W ,KC_E ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_ENTER ,KC_A ,KC_S ,KC_D ,KC_F ,KC_TRANSPARENT, + KC_TRANSPARENT,KC_Z ,KC_X ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT, + KC_SPACE ,KC_LSHIFT ,KC_TRANSPARENT, + + TO(0) ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_PGDOWN ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_ENTER ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT + ), +}; +// Used for blinking leds on layers higher than 7 +uint16_t blink_timer = 0; +uint16_t blink_elapsed = 0; +bool blink_led_1 = false; +bool blink_led_2 = false; +bool blink_led_3 = false; + +void matrix_scan_kb(void){ + // first 7 layers do not need to blink + if(blink_led_1 || blink_led_2 || blink_led_3){ + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + blink_elapsed = timer_elapsed(blink_timer); + if(blink_elapsed > 2000) { blink_timer = timer_read();} + if(blink_elapsed < 1000) { + if(blink_led_1) ergodox_right_led_1_on(); + if(blink_led_2) ergodox_right_led_2_on(); + if(blink_led_3) ergodox_right_led_3_on(); + } + } + matrix_scan_user(); +}; + +layer_state_t layer_state_set_user(layer_state_t state) +{ + + uint8_t layer = get_highest_layer(state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + blink_led_1=false; + blink_led_2=false; + blink_led_3=false; + + switch (layer) + { + case 0: + rgblight_setrgb(0, 200, 200); + break; + case 1: + ergodox_right_led_1_on(); + rgblight_setrgb(0, 200, 0); // green + break; + case 2: + ergodox_right_led_2_on(); + rgblight_setrgb(0, 0, 255); + break; + case 3: + ergodox_right_led_3_on(); + rgblight_setrgb(255, 0, 0); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + rgblight_setrgb(200, 65, 0); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + rgblight_setrgb(0, 80, 33); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + rgblight_setrgb(0, 10, 200); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + rgblight_setrgb(90, 150, 90); + break; + case 8: + blink_led_1=true; + rgblight_setrgb(100, 0, 100); + break; + case 9: + rgblight_setrgb(200, 150, 90); + break; +// default: +// rgblight_setrgb(0, 200, 200); +// break; + } + return state; +}; + +// use leds to indicate when a one shot mod is on +void oneshot_mods_changed_user(uint8_t mods) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + // One shot checks + if (mods & MOD_MASK_SHIFT) { + ergodox_right_led_1_on(); + } + if (mods & MOD_MASK_CTRL) { + ergodox_right_led_2_on(); + } + if (mods & MOD_MASK_ALT) { + ergodox_right_led_3_on(); + } + // if (mods & MOD_MASK_GUI) { + // println("Oneshot mods GUI"); + // } + } + +void oneshot_locked_mods_changed_user(uint8_t mods) { + oneshot_mods_changed_user(mods); +} + +//=============== alt_tab callbacks +void alt_tab_activated(void){ + layer_on(7); // activate motion layer +} +void alt_tab_deactivated(void){ + layer_off(7); // activate motion layer +} diff --git a/keyboards/ergodox_ez/keymaps/danielo515/rules.mk b/keyboards/ergodox_ez/keymaps/danielo515/rules.mk new file mode 100644 index 000000000000..99ab4f0e181b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/danielo515/rules.mk @@ -0,0 +1,9 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LTO_ENABLE = yes +AUTO_SHIFT_ENABLE = no +TAP_DANCE_ENABLE = yes # Enable the tap dance feature. +LEADER_ENABLE = yes +CONSOLE_ENABLE = no +RGBLIGHT_ENABLE = yes +COMBO_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/README.md b/keyboards/ergodox_ez/keymaps/dvorak_42_key/README.md new file mode 100644 index 000000000000..5730a610516a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/README.md @@ -0,0 +1,19 @@ +Overview +======== + +This is a dvorak based layout for the Ergodox EZ. Its basic key layout is similar to the Atreus "dvorak_42_key" layout. In fact this layout was created for seamless switching between the Ergodox EZ and Atreus. On the base layer, the keys that don't exist on the Atreus are mapped to MEH shortcuts and can be interpreted by Autohotkey. This layout only makes use of the 42 keys that the Atreus also has for the main functionality. + +How to build +------------ +make ergodox_ez:dvorak_42_key:teensy + +Layers +------ +* BASE: basic dvorak layout +* KEYNAV: arrow-key navigation. Momentary toggle held by thumb allows the right hand to navigate through text as well as copy/paste/cut, page up/page down +* KEYSEL: similar to KEYNAV, except for shift-selection +* COMBINED: this is a layer that combines numbers, brackets and special characters. !@#$%^&*( can be typed by shift+COMBINED+1/2/3/etc.. +* BROWSER_CONTROL: primarily browser left/right tab, open new tab/delete tab, but also mouse keys. +* SHELL_NAV: Linux Bash shortcuts (move forward/backward in command line, Ctrl+C, recall last argument, etc +* SHELL_SCREEN: Linux screen (run multiple terminals in one window) shortcuts such as open new tabs, switch between tabs +* SCREEN_NAV: special layer for copy/pasting within Linux screen, allows using various copy/paste buffers \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c new file mode 100644 index 000000000000..fab29773569a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -0,0 +1,753 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + + +// to build this keymap +// make ergodox_ez:dvorak_42_key:teensy +// or: +// qmk compile -kb ergodox_ez -km dvorak_42_key +// flashing from rpi: +// sudo teensy_loader_cli -v -w .build/ergodox_ez_dvorak_42_key.hex --mcu atmega32u4 + +// keeping fork up to date: +// https://help.github.com/articles/configuring-a-remote-for-a-fork/ +// https://help.github.com/articles/syncing-a-fork/ +// pushing dev branch +// git push origin dev:dev + +// debounce settings +// remove these after getting a new keyboard +// #define DEBOUNCE 50 +// #define QMK_KEYS_PER_SCAN 4 + + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD, + // shell nav macros + SHELL_LS, + SHELL_LSLTR, + SHELL_LSLA, + SHELL_CDPRE, + SHELL_LESS, + SHELL_PLESS, + SHELL_PGREP, + SHELL_TAILF, + + SHELL_PWD, + SHELL_H3, + SHELL_AMMCOLO, + SHELL_SCREENRD, + SHELL_SCREEN_NEW, + SHELL_SCREEN_LIST, + SHELL_MKE, + SHELL_HTCSTATUS, + SHELL_HTCBOUNCE, + SHELL_DUMPTLOG, + + SHELL_EXPAND_OE_LOGPATTERN, + SHELL_EXPAND_OE_TRANPATTERN, + + SCREEN_TAB_LEFT, + SCREEN_TAB_RIGHT, + + SCREEN_NEW_TAB, + SCREEN_DETACH, + SCREEN_RENAME, + SCREEN_NUMBER, + + SCREEN_0, + SCREEN_1, + SCREEN_2, + SCREEN_3, + SCREEN_4, + SCREEN_5, + SCREEN_6, + SCREEN_7, + SCREEN_8, + SCREEN_9, + + SCREEN_COPY_MODE, + SCREEN_PASTE, + + SCREEN_UP_JUMP, + SCREEN_DOWN_JUMP, + + SCREEN_READREG_1, + SCREEN_READREG_2, + SCREEN_READREG_3, + SCREEN_PASTEREG_1, + SCREEN_PASTEREG_2, + SCREEN_PASTEREG_3, + + // Windows 10 macros, + WINDOWS10_WORKSPACE_LEFT, + WINDOWS10_WORKSPACE_RIGHT, + WINDOWS10_TASK_VIEW +}; + + +#define BASE 0 // base dvorak layer +#define KEYNAV 1 // arrow navigation (right hand) +#define KEYSEL 2 // arrow navigation + shift (allow text selection) +#define SHELL_NAV 3 // bash shortcuts +#define SHELL_SCREEN 4 // linux screen shortcuts +#define SCREEN_NAV 5 // navigate between linux screen tabs +#define BROWSER_CONTROL 6 // control browser and mouse +#define COMBINED 7 // combined numbers and symbols layer +#define ANDROID_STUDIO 8 // android studio specific layer +#define VSCODE 9 // visual studio code specific layer +#define VSCODE_NAV 10 // visual studio code, navigation within IDE + + + +// Android Studio shortcuts +#define AS_TABLEFT LALT(KC_LEFT) +#define AS_TABRIGHT LALT(KC_RIGHT) +#define AS_SYMBOL LCTL(LALT(KC_N)) +#define AS_CLASS LCTL(KC_N) +#define AS_FINDUSAGE LALT(KC_F7) +#define AS_BACK LCTL(LALT(KC_LEFT)) +#define AS_BRACKET LCTL(LSFT(KC_M)) +#define AS_GO_DECLARATION LCTL(KC_B) +#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B)) +#define AS_CLOSETAB LCTL(KC_F4) +#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) +#define AS_COPYLINEDOWN LCTL(KC_D) +#define AS_DEL_LINE LCTL(KC_Y) +#define AS_LINE LCTL(KC_G) +#define AS_CMT_BLOCK LCTL(LSFT(KC_SLSH)) +#define AS_CMT_LINE LCTL(KC_SLSH) +#define AS_BM_PREV LALT(KC_P) +#define AS_BM_NEXT LALT(KC_N) +#define AS_BM_TOGGLE KC_F11 +#define AS_BM_LIST LSFT(KC_F11) + +// visual studio code shortcuts +#define VS_FILE LCTL(KC_P) +#define VS_OPEN_FILE LCTL(KC_O) +#define VS_LINE LCTL(KC_G) +#define VS_SYMBOLEDITOR LCTL(LSFT(KC_O)) +#define VS_DEFINITION MEH(KC_F5) +#define VS_IMPLEMENTATION MEH(KC_F6) +#define VS_REFERENCES MEH(KC_F7) +#define VS_BACK LALT(KC_LEFT) +#define VS_BRACKET LCTL(LSFT(KC_BSLS)) +#define VS_TABLEFT MEH(KC_F1) +#define VS_TABRIGHT MEH(KC_F2) +#define VS_CLOSETAB MEH(KC_F3) +#define VS_CLOSEPANEL LCTL(LSFT(KC_W)) +#define VS_GROUP_1 LCTL(KC_1) +#define VS_GROUP_2 LCTL(KC_2) +#define VS_TERMINAL LCTL(KC_GRAVE) +#define VS_BUILD LCTL(LSFT(KC_B)) +#define VS_COMMANDS MEH(KC_F4) +#define VS_CMT_BLOCK LSFT(LALT(KC_A)) +#define VS_CMT_LINE MEH(KC_F18) +#define VS_DEL_LINE LCTL(LSFT(KC_K)) +#define VS_COPYLINEDOWN LSFT(LALT(KC_DOWN)) +// visual studio bookmark commands +#define VS_BM_LIST LCTL(LALT(KC_L)) +#define VS_BM_LISTALL LCTL(LALT(KC_A)) +#define VS_BM_PREV LCTL(LALT(KC_P)) +#define VS_BM_NEXT LCTL(LALT(KC_N)) +#define VS_BM_TOGGLE LCTL(LALT(KC_K)) +#define VS_BM_CLEARALL LCTL(LALT(KC_C)) +// visual studio code navigation shortcuts +#define VS_FOCUS_EDITOR MEH(KC_F8) +#define VS_FOCUS_TERMINAL MEH(KC_F9) +#define VS_TOGGLE_TERMINAL MEH(KC_F10) +#define VS_CLEAR_TERMINAL MEH(KC_F11) +#define VS_TERMINAL_PREV MEH(KC_F12) +#define VS_TERMINAL_NEXT MEH(KC_F13) +#define VS_TERMINAL_NEW MEH(KC_F14) +#define VS_TERMINAL_DETACH MEH(KC_F15) +#define VS_TERMINAL_RENAME MEH(KC_F16) +#define VS_JUMPY MEH(KC_F17) +#define VS_FIND MEH(KC_F19) + + +#define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \ + case MACRO_NAME:\ + if (record->event.pressed) {\ + return MACRO( D(LCTL), T(A), U(LCTL), T(NUM), END);\ + }\ + break;\ + +#define MACRO_SCREEN_REG(MACRO_NAME,NUM) \ + case MACRO_NAME:\ + if (record->event.pressed) {\ + return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),\ + T(R),\ + T(E),\ + T(A),\ + T(D),\ + T(R),\ + T(E),\ + T(G),\ + T(SPC),\ + T(NUM),\ + T(ENTER),\ + END);\ + }\ + break;\ + +#define MACRO_SCREEN_PASTE(MACRO_NAME,NUM)\ + case MACRO_NAME:\ + if (record->event.pressed) {\ + return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),\ + T(P),\ + T(A),\ + T(S),\ + T(T),\ + T(E),\ + T(SPC),\ + T(NUM),\ + T(ENTER),\ + END);\ + }\ + break;\ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT_ergodox( + // left hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + OSL(SCREEN_NAV), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MO(VSCODE_NAV), + OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, + OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(VSCODE), + MEH(KC_0), OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), + + // left thumb cluster + WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, + WINDOWS10_TASK_VIEW, + MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT), + + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MEH(KC_7), + MEH(KC_1), KC_F, KC_G, KC_C, KC_R, KC_L, KC_TAB, + KC_D, KC_H, KC_T, KC_N, KC_S, RCTL(KC_BSPC), + MEH(KC_2), KC_B, KC_M, KC_W, KC_V, KC_Z, MEH(KC_8), + KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT),MEH(KC_9), + + // right thumb cluster + MEH(KC_3), MEH(KC_4), MEH(KC_5), MEH(KC_6),KC_ENTER,KC_SPACE + + ), + + [KEYNAV] = LAYOUT_ergodox( + // left hand + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_ESC, KC_TRNS, RCTL(KC_Z), RCTL(KC_S), KC_TRNS, KC_TRNS, + KC_TRNS,KC_LSFT, KC_TRNS, RSFT(KC_TAB), KC_TAB, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // left thumb cluster + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + + + // right hand + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_G), + KC_TRNS,KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, MEH(KC_H), + LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), MEH(KC_I), + KC_TRNS,KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, MEH(KC_J), + KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_K), + + // right thumb cluster + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + + // key selection layer + [KEYSEL] = LAYOUT_ergodox( + // left hand + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, + KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), + KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, + // bottom row + RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_Q), + RSFT(KC_PGUP), KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), MEH(KC_R), + RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), MEH(KC_S), + RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), MEH(KC_T), + // bottom row + KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_U), + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + // shell navigation layer + [SHELL_NAV] = LAYOUT_ergodox( + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, SHELL_PGREP, SHELL_PLESS, SHELL_LESS, SHELL_HTCBOUNCE, SHELL_H3, + KC_TRNS,SHELL_MKE, SHELL_CDPRE, SHELL_LSLTR, SHELL_LS, SHELL_LSLA, + KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, SHELL_HTCSTATUS, SHELL_AMMCOLO, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SHELL_EXPAND_OE_TRANPATTERN, + RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, KC_TRNS, SHELL_EXPAND_OE_LOGPATTERN, + LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), RCTL(KC_W), + RCTL(KC_C), RCTL(KC_U), LALT(KC_DOT), RCTL(KC_R), KC_BTN2, RCTL(KC_K), SHELL_DUMPTLOG, + // bottom row (match functionality of base layer) + KC_BSPC, RCTL(KC_W), KC_DELETE, LALT(KC_D), RCTL(KC_U), + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + + // linux screen layer + [SHELL_SCREEN] = LAYOUT_ergodox( + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, SCREEN_NEW_TAB, SCREEN_7, SCREEN_8, SCREEN_9, SCREEN_RENAME, KC_TRNS, + SCREEN_TAB_LEFT, SCREEN_4, SCREEN_5, SCREEN_6, SCREEN_TAB_RIGHT, KC_TRNS, + KC_TRNS, KC_TRNS, SCREEN_1, SCREEN_2, SCREEN_3, SCREEN_NUMBER, KC_TRNS, + // bottom row + SCREEN_0, KC_TRNS, KC_TRNS, KC_TRNS, SCREEN_DETACH, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + // navigation within screen (for copy/paste) + [SCREEN_NAV] = LAYOUT_ergodox( + // left hand + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, SCREEN_READREG_3, SCREEN_READREG_2, SCREEN_READREG_1, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, SCREEN_PASTEREG_3, SCREEN_PASTEREG_2, SCREEN_PASTEREG_1, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_0, KC_UP, KC_DLR, SCREEN_UP_JUMP, KC_TRNS, + KC_B, KC_LEFT, KC_DOWN, KC_RIGHT, KC_W, SCREEN_COPY_MODE, + KC_TRNS, KC_TRNS, S(KC_W), S(KC_Y), SCREEN_PASTE, SCREEN_DOWN_JUMP, MEH(KC_V), + // bottom row (match functionality of base layer) + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + + // android studio shortcuts + [ANDROID_STUDIO] = LAYOUT_ergodox( + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + AS_CMT_LINE, AS_COPYLINEDOWN, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, AS_LINE, AS_BRACKET, + AS_CLOSETAB, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, + AS_CMT_BLOCK, KC_TRNS, AS_BM_PREV, AS_BM_NEXT, KC_TRNS, AS_CLOSETOOLWINDOW, AS_BM_TOGGLE, + // bottom row + KC_TRNS, AS_BM_LIST, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, AS_DEL_LINE, KC_TRNS + ), + + // vscode shortcuts shortcuts + [VSCODE] = LAYOUT_ergodox( + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + VS_CMT_LINE, VS_COPYLINEDOWN, VS_REFERENCES, VS_DEFINITION, VS_IMPLEMENTATION, VS_LINE, VS_BRACKET, + VS_CLOSETAB, VS_TABLEFT, VS_TABRIGHT, VS_SYMBOLEDITOR, VS_FILE, VS_BACK, + VS_CMT_BLOCK, VS_FIND, VS_BM_PREV, VS_BM_NEXT, VS_GROUP_1, VS_GROUP_2, VS_BM_TOGGLE, + // bottom row + VS_COMMANDS, VS_BM_LIST, VS_BM_LISTALL, VS_CLOSEPANEL, VS_BM_CLEARALL, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, VS_DEL_LINE, KC_TRNS + ), + + // vscode navigation shortcuts + [VSCODE_NAV] = LAYOUT_ergodox( + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + VS_TOGGLE_TERMINAL, VS_FOCUS_TERMINAL, VS_FOCUS_EDITOR, VS_JUMPY, KC_TRNS, KC_TRNS, + KC_TRNS, VS_CLEAR_TERMINAL, VS_TERMINAL_PREV, VS_TERMINAL_NEXT, VS_TERMINAL_NEW, VS_TERMINAL_DETACH, VS_TERMINAL_RENAME, + // bottom row + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [COMBINED] = LAYOUT_ergodox( + + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, + KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, + KC_TRNS,KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS, KC_TILD, KC_GRAVE, KC_CIRC, + // thumb cluster + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_L), + KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, MEH(KC_M), + KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, MEH(KC_N), + KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, MEH(KC_O), + // bottom row + KC_0, KC_DOT, KC_PIPE, KC_BSLS, MEH(KC_P), + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS), + + + [BROWSER_CONTROL] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, KC_TRNS, + KC_DOWN, RCTL(KC_PGUP), RCTL(KC_PGDN),KC_MS_WH_DOWN, LALT(KC_LEFT), KC_TRNS, + KC_TRNS, KC_TRNS, RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, KC_TRNS, + // bottom row + RCTL(LSFT(KC_TAB)), RCTL(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, RCTL(KC_W), RCTL(KC_T) + ), + + +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + // rgblight_mode(1); + } + return false; + break; + } + + // shell macros + if(record->event.pressed) { + switch (keycode) { + case SHELL_LS: + SEND_STRING("ls\n"); + return true; + break; + case SHELL_LSLTR: + SEND_STRING("ls -ltr\n"); + return true; + break; + case SHELL_LSLA: + SEND_STRING("ls -la\n"); + return true; + break; + case SHELL_CDPRE: + SEND_STRING("cd ..\n"); + return true; + break; + case SHELL_LESS: + SEND_STRING("less "); + return true; + break; + case SHELL_PLESS: + SEND_STRING(" | less"); + return true; + break; + case SHELL_PGREP: + SEND_STRING(" | grep "); + return true; + break; + case SHELL_TAILF: + SEND_STRING("tail -f "); + return true; + break; + case SHELL_PWD: + SEND_STRING("echo `pwd`/"); + return true; + break; + case SHELL_H3: + SEND_STRING("h3\n"); + return true; + break; + case SHELL_AMMCOLO: + SEND_STRING("ammcolo\n"); + return true; + break; + case SHELL_SCREENRD: + SEND_STRING("screen -r -d "); + return true; + break; + case SHELL_SCREEN_NEW: + SEND_STRING("screen -S "); + return true; + break; + case SHELL_SCREEN_LIST: + SEND_STRING("screen -list\n"); + return true; + break; + case SHELL_MKE: + SEND_STRING("mki -j8\n"); + return true; + break; + case SHELL_HTCSTATUS: + SEND_STRING("htcStatus -j "); + return true; + break; + case SHELL_HTCBOUNCE: + SEND_STRING("htcBounce -j "); + return true; + break; + case SHELL_EXPAND_OE_LOGPATTERN: + SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.log"SS_LCTRL("x")SS_LSFT("8")); + break; + case SHELL_EXPAND_OE_TRANPATTERN: + SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.tran"SS_LCTRL("x")SS_LSFT("8")); + break; + case SHELL_DUMPTLOG: + SEND_STRING(" | dumptlog - "); + return true; + break; + case WINDOWS10_WORKSPACE_LEFT: + SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_LEFT)))); + return true; + break; + case WINDOWS10_WORKSPACE_RIGHT: + SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_RIGHT)))); + break; + case WINDOWS10_TASK_VIEW: + SEND_STRING(SS_LGUI(SS_TAP(X_TAB))); + break; + // linux screen shortcuts + case SCREEN_TAB_LEFT: + SEND_STRING(SS_LCTL("a") "p"); + break; + case SCREEN_TAB_RIGHT: + SEND_STRING(SS_LCTL("a") "n"); + break; + case SCREEN_NEW_TAB: + SEND_STRING(SS_LCTL("a") "c"); + break; + case SCREEN_DETACH: + SEND_STRING(SS_LCTL("a") "d"); + break; + case SCREEN_RENAME: + SEND_STRING(SS_LCTL("a") SS_LSFT("a")); + break; + case SCREEN_NUMBER: + SEND_STRING(SS_LCTL("a") ":number "); + break; + case SCREEN_0: + SEND_STRING(SS_LCTL("a") "0"); + break; + case SCREEN_1: + SEND_STRING(SS_LCTL("a") "1"); + break; + case SCREEN_2: + SEND_STRING(SS_LCTL("a") "2"); + break; + case SCREEN_3: + SEND_STRING(SS_LCTL("a") "3"); + break; + case SCREEN_4: + SEND_STRING(SS_LCTL("a") "4"); + break; + case SCREEN_5: + SEND_STRING(SS_LCTL("a") "5"); + break; + case SCREEN_6: + SEND_STRING(SS_LCTL("a") "6"); + break; + case SCREEN_7: + SEND_STRING(SS_LCTL("a") "7"); + break; + case SCREEN_8: + SEND_STRING(SS_LCTL("a") "8"); + break; + case SCREEN_9: + SEND_STRING(SS_LCTL("a") "9"); + break; + case SCREEN_COPY_MODE: + SEND_STRING(SS_LCTL("a") "["); + break; + case SCREEN_PASTE: + SEND_STRING(SS_LCTL("a") "]"); + break; + + case SCREEN_UP_JUMP: + tap_code(KC_5); + tap_code(KC_UP); + break; + case SCREEN_DOWN_JUMP: + tap_code(KC_5); + tap_code(KC_DOWN); + break; + + case SCREEN_READREG_1: + tap_code16(C(KC_A)); + tap_code16(S(KC_SCOLON)); + SEND_STRING("readreg 1\n"); + break; + case SCREEN_READREG_2: + tap_code16(C(KC_A)); + tap_code16(S(KC_SCOLON)); + SEND_STRING("readreg 2\n"); + break; + case SCREEN_READREG_3: + tap_code16(C(KC_A)); + tap_code16(S(KC_SCOLON)); + SEND_STRING("readreg 3\n"); + break; + + case SCREEN_PASTEREG_1: + tap_code16(C(KC_A)); + tap_code16(S(KC_SCOLON)); + SEND_STRING("paste 1\n"); + break; + case SCREEN_PASTEREG_2: + tap_code16(C(KC_A)); + tap_code16(S(KC_SCOLON)); + SEND_STRING("paste 2\n"); + break; + case SCREEN_PASTEREG_3: + tap_code16(C(KC_A)); + tap_code16(S(KC_SCOLON)); + SEND_STRING("paste 3\n"); + break; + } + } + + return true; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1< + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#include "keymap_bepo.h" +#include "ericgebhart.h" +#include "layouts.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Qwerty Base layers + [_DVORAK] = Dox_base(___NUMS___, ___DVORAK___), + [_QWERTY] = Dox_base(___NUMS___, ___QWERTY___), + [_COLEMAK] = Dox_base(___NUMS___, ___COLEMAK_DH___), + [_BEAKL] = Dox_base(___NUMS___, ___BEAKL15___), + // Bepo Base layers + [_DVORAK_BP] = Dox_bepo_base(___NUMS_BP___, ___DVORAK_FR___), + [_BEAKL_BP] = Dox_bepo_base(___BKLNUMS_BP___, ___BEAKL15_FR___), + [_BEPO] = Dox_bepo_base6(___BEPO6___), + + + // transient layers. + // Switch to using a transient layer macro + [_SYMB] = Dox_transient(___12_FUNC___, ___SYMB_BEAKLA_3x12___), + [_SYMB_BP] = Dox_transient(___12_FUNC___, ___SYMB_BEAKLA_BP_3x12___), + + [_TOPROWS] = Dox_transient(___12___, ___TOPROWS_3x12___), + [_TOPROWS_BP] = Dox_transient(___12___, ___TOPROWS_BP_3x12___), + + [_KEYPAD] = Dox_transient(___KEYPAD_BKL_FUNC_4x12___), + [_KEYPAD_BP] = Dox_transient(___KEYPAD_BKL_FUNC_BP_4x12___), + + [_NAV] = Dox_transient(___12___, ___NAV_3x12___), + [_LAYERS] = Dox_transient(___12___, ___LAYERS_3x12___), + [_RGB] = Dox_transient(___12___, ___RGB_3x12___), +}; diff --git a/keyboards/ergodox_ez/keymaps/ericgebhart/layouts.h b/keyboards/ergodox_ez/keymaps/ericgebhart/layouts.h new file mode 100644 index 000000000000..dd8f193dfc6b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/ericgebhart/layouts.h @@ -0,0 +1,139 @@ +/* + Copyright 2018 Eric Gebhart + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/********************************************************************/ +/* Ergodox EZ */ +/********************************************************************/ +// This one is is set up to pass in the number row. +// Beakl and bepo both change the number row. +// Left, middle, right, bottom, and thumbs all stay the same. +#define Base_dox( \ + K01, K02, K03, K04, K05, \ + K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, \ + K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, \ + K26, K27, K28, K29, K2A, \ + K31, K32, K33, K34, K35, \ + K36, K37, K38, K39, K3A \ + ) \ + LVARG_edox( \ + ROW0_LEFT(K01, K02, K03, K04, K05), \ + ___2_MIDDLE_1___, \ + ROW0_RIGHT(K06, K07, K08, K09, K0A), \ + \ + ROW1_LEFT(K11, K12, K13, K14, K15), \ + ___2_MIDDLE_2___, \ + ROW1_RIGHT(K16, K17, K18, K19, K1A), \ + \ + ROW2_LEFT(K21, K22, K23, K24, K25), \ + ROW2_RIGHT(K26, K27, K28, K29, K2A), \ + \ + ROW3_LEFT(K31, K32, K33, K34, K35), \ + ___2_MIDDLE_3___, \ + ROW3_RIGHT(K36, K37, K38, K39, K3A), \ + ___5_BOTTOM_LEFT___, ___5_BOTTOM_RIGHT___, \ + ___12_DOX_ALL_THUMBS___ \ + ) + +#define Base_dox_bepo( \ + K01, K02, K03, K04, K05, \ + K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, \ + K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, \ + K26, K27, K28, K29, K2A, \ + K31, K32, K33, K34, K35, \ + K36, K37, K38, K39, K3A \ + ) \ + LVARG_edox( \ + ROW0_LEFT(K01, K02, K03, K04, K05), \ + ___2_MIDDLE_1___, \ + ROW0_RIGHT(K06, K07, K08, K09, K0A), \ + \ + ROW1_LEFT(K11, K12, K13, K14, K15), \ + ___2_MIDDLE_2___, \ + ROW1_RIGHT(K16, K17, K18, K19, K1A), \ + \ + ROW2_LEFT(K21, K22, K23, K24, K25), \ + ROW2_RIGHT(K26, K27, K28, K29, K2A), \ + \ + ROW3_LEFT(K31, K32, K33, K34, K35), \ + ___2_MIDDLE_3___, \ + ROW3_RIGHT(K36, K37, K38, K39, K3A), \ + ___5_BOTTOM_LEFT___, ___5_BOTTOM_RIGHT___, \ + ___12_DOX_ALL_THUMBS_BP___ \ + ) + + +#define Base_dox_bepo6( \ + K01, K02, K03, K04, K05, K06, \ + K07, K08, K09, K0A, K0B, K0C, \ + K11, K12, K13, K14, K15, K16, \ + K17, K18, K19, K1A, K1B, K1C, \ + K21, K22, K23, K24, K25, K26, \ + K27, K28, K29, K2A, K2B, K2C \ + ) \ + LVARG_edox( \ + ___6SYMBOL_BEPO_L___, \ + ___2_MIDDLE_T_BP___, \ + ___6SYMBOL_BEPO_R___, \ + ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \ + ___2_MIDDLE_2_BP___, \ + ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \ + \ + ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \ + ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \ + \ + ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \ + ___2_MIDDLE_3_BP___, \ + ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \ + \ + ___5_BOTTOM_LEFT_BP___, ___5_BOTTOM_RIGHT_BP___, \ + ___12_DOX_ALL_THUMBS_BP___ \ + ) + +#define Transient_dox6( \ + K01, K02, K03, K04, K05, K06, \ + K07, K08, K09, K0A, K0B, K0C, \ + K11, K12, K13, K14, K15, K16, \ + K17, K18, K19, K1A, K1B, K1C, \ + K21, K22, K23, K24, K25, K26, \ + K27, K28, K29, K2A, K2B, K2C, \ + K31, K32, K33, K34, K35, K36, \ + K37, K38, K39, K3A, K3B, K3C \ + ) \ + LVARG_edox( \ + K01, K02, K03, K04, K05, K06, \ + ___2___, \ + K07, K08, K09, K0A, K0B, K0C, \ + K11, K12, K13, K14, K15, K16, \ + ___2___, \ + K17, K18, K19, K1A, K1B, K1C, \ + K21, K22, K23, K24, K25, K26, \ + K27, K28, K29, K2A, K2B, K2C, \ + K31, K32, K33, K34, K35, K36, \ + ___2___, \ + K37, K38, K39, K3A, K3B, K3C, \ + ___5___, ___5___, \ + ___12___ \ + ) + +#define Dox_base(...) Base_dox(__VA_ARGS__) +#define Dox_bepo_base(...) Base_dox_bepo(__VA_ARGS__) +#define Dox_bepo_base6(...) Base_dox_bepo6(__VA_ARGS__) +#define Dox_transient(...) Transient_dox6(__VA_ARGS__) diff --git a/keyboards/ergodox_ez/keymaps/ericgebhart/readme.md b/keyboards/ergodox_ez/keymaps/ericgebhart/readme.md new file mode 100644 index 000000000000..4f71bf39ee4c --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/ericgebhart/readme.md @@ -0,0 +1,5 @@ +Overview +======== + +These are my ergodox_ez keymaps. There isn't much here. Go take a look at my Userspace readme. +That's where all the code is. diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore b/keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore new file mode 100644 index 000000000000..504afef81fba --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +package-lock.json diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h new file mode 100644 index 000000000000..da2082078738 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -0,0 +1,92 @@ +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#pragma once + + +#undef TAPPING_TERM +#define TAPPING_TERM 175 + +#undef DEBOUNCE +#define DEBOUNCE 15 + +#undef IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT + +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#undef FORCE_NKRO +#define FORCE_NKRO + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 5 + +#define LEADER_TIMEOUT 1000 +#define PERMISSIVE_HOLD +#define QMK_KEYS_PER_SCAN 4 +#define DANCING_TERM 175 + +#define ONESHOT_TAP_TOGGLE 5 + +#undef ONESHOT_TIMEOUT +#define ONESHOT_TIMEOUT 5000 + +#define COMBO_COUNT 4 +#define COMBO_TERM 200 + + +#undef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 24 + +#undef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 24 + +#undef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 24 + +#undef RGBLIGHT_BRI_STEP +#define RGBLIGHT_BRI_STEP 24 + +#undef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 255 + + +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 10 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 15 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 20 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 200 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 20 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 200 + + +// #undef NO_DEBUG +// #define NO_DEBUG + +// #undef NO_PRINT +// #define NO_PRINT + +// #define RETRO_TAPPING +// #define TAPPING_FORCE_HOLD + +// #define AUTO_SHIFT_TIMEOUT 150 +// #define NO_AUTO_SHIFT_SPECIAL +// #define NO_AUTO_SHIFT_NUMERIC +// #define NO_AUTO_SHIFT_ALPHA + +// #define EXTRA_LONG_COMBOS +// #define EXTRA_EXTRA_LONG_COMBOS +// #define COMBO_ALLOW_ACTION_KEYS + +// #define RGBLIGHT_SLEEP diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js new file mode 100644 index 000000000000..81a4e93fda41 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js @@ -0,0 +1,22 @@ +const gulp = require('gulp'); +const run = require('gulp-run-command').default; + + +const ROOT_DIR = '../../../../'; +const BUILD_DIR = `${ROOT_DIR}.build`; +const HACKER_DVORAK_DIR = './**/*'; + +const CLEAN_CMD = `rm -rf ${BUILD_DIR}`; +const BUILD_CMD = `make -C ${ROOT_DIR} ergodox_ez:hacker_dvorak`; + +gulp.task('clean', run(CLEAN_CMD)); + +gulp.task('build', gulp.series('clean', run(BUILD_CMD, { + ignoreErrors: true +}))); + +gulp.task('watch', gulp.series('build', () => { + gulp.watch(HACKER_DVORAK_DIR, gulp.series('build')); +})); + +gulp.task('default', gulp.series('watch')); diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c new file mode 100644 index 000000000000..71cf1053aa02 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c @@ -0,0 +1,353 @@ +// Keyboard keymap: +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DVORAK] = LAYOUT_ergodox( + + // HACKER DVORAK left hand + + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // ESCAPE | | | | | | START RECORDING // + // | | | | | | // + KC_ESC, TD(GRV_TILD), TD(AT_DLR), TD(LCBR_LABK), TD(LPRN_LBRC), TD(EXLM_QUES), DYN_REC_START1, // + // | ~ | $ | < | [ | ? | // + // | TAP DANCE: ` | TAP DANCE: @ TAP DANCE: { | TAP DANCE: ( | TAP DANCE: ! | DYNAMIC MARCO 1 // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // TAB | MOD TAP: ALT+SHIFT | MOD TAP: CTRL+ALT | MOD TAP: CTRL+SHIFT | P | Y | // + // | | | | | | // + KC_TAB, TD(NONE_LEAD), TD(QUOT_DQUO), TD(DOT_COMM), LCG_T(KC_P), LAG_T(KC_Y), DYN_MACRO_PLAY1, // + // | LEAD | " | , | | | // + // | TAP DANCE: NONE | TAP DANCE: ' | TAP DANCE: . | MOD TAP: CTRL+GUI | MOD TAP: ALT+GUI | // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| PLAY DYNAMIC MACRO 1 // + // | MOD TAP: ALT | MOD TAP: CTRL | LAYER TAP: SHIFT | M TAP DANCE: ARROWS/GUI | MOD TAP: SHIFT+GUI | // + // | | | | Ü | | // + TD(EQL_PLUS), LALT_T(KC_A), LCTL_T(KC_O), LSFT_T(KC_E), TD(U_ARR_GUI), SGUI_T(KC_I), //-----------------------// + // + | Á | Ó | É | Ú | Í | // + // TAP DANCE: = | TAP DANCE: A | TAP DANCE: O | TAP DANCE: E | TAP DANCE: U | TAP DANCE: I | // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| META // + // STOP RECORDING | MOD TAP: GUI+SHIFT+ALT | Q | J | K | X | // + // | | | | | | // + DYN_REC_STOP, TD(SCLN_COLN), LCAG_T(KC_Q), TD(J_MED_MEH), TD(K_NUM_HYP), LCSG_T(KC_X), KC_LGUI, // + // | : | | | | | // + // DYNAMIC MACRO | TAP DANCE: ; | MOD TAP: SHIFT+GUI | M TAP DANCE: MEDIA/MEH | M TAP DANCE: ATM/HYPER | MOD TAP: CTL+SHIFT+GUI | // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // LAYERS SWITCHER | APPLICATION MENU | | | // + // | | | | SCROLL // + TG(LAYERS), KC_APP, KC_NLCK, KC_SLCK, KC_CAPS, // + // | | | | NUM // + // LAYER TOGGLE | | | | TAP DANCE: CAPS // + //------------------------+-------------------------+-------------------------+-------------------------+------------------------// + + // HACKER DVORAK left thumb + + //------------------------+------------------------// + // MOUSE WHEEL LEFT | MOUSE WHEEL RIGHT // + // | // + KC_WH_L, KC_WH_R, // + // | // + // | // + //-------------------------+-------------------------+------------------------// + // | | HOME // + // | | // + /* SPACE | BACKSPACE */ KC_HOME, // + // | | // + // | | // + KC_SPC, KC_BSPC, //-----------------------// + // | | END // + // | | // + /* | */ KC_END, // + // | | // + // | | // + //-------------------------+-------------------------+------------------------// + + // HACKER DVORAK right hand + + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | | | // + // | | | | | | // + DYN_REC_START2, TD(APMR_PIPE), TD(RPRN_RBRC), TD(RCBR_RABK), TD(HASH_PERC), TD(ASTR_CIRC), XXXXXXX, // + // | | | | | | // + // | | | | | | // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | | | // + // | | | | | | // + DYN_MACRO_PLAY2, LAG_T(KC_F), LCG_T(KC_G), C_S_T(KC_C), LCA_T(KC_R), LAS_T(KC_L), TD(SLSH_BSLS), // + // | | | | | | // + // | | | | | | // + // |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | | | // + // | | | | | | // + /*-----------------------*/ SGUI_T(KC_D), TD(H_MOU_GUI), LSFT_T(KC_T), LCTL_T(KC_N), LALT_T(KC_S), TD(MINS_UNDS), // + // | | | | | | // + // | | | | | | // + // |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | | | // + // | | | | | | // + KC_LGUI, LCSG_T(KC_B), TD(M_CHO_HYP), TD(W_MED_MEH), LCAG_T(KC_V), LASG_T(KC_Z), COMPOSE, // + // | | | | | | // + // | | | | | | ⎄ // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | // + // | | | | // + KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_SYSREQ, // + // | | | | // + // | | | | // + //------------------------+-------------------------+-------------------------+-------------------------+------------------------// + + // HACKER DVORAK right thumb + + //------------------------+------------------------// + // | // + // | // + KC_WH_U, KC_WH_D, // + // | // + // | // + //------------------------+-------------------------+------------------------// + // | | // + // | | // + KC_PGUP, // | // + // | | // + // | | // + //------------------------| | // + // | | // + // | | // + KC_PGDN, KC_DEL, KC_ENT // + // | | // + // | | // + //------------------------+-------------------------+------------------------// + + ), + + [PLOVER] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_BTN3, GUI_T(KC_NO), + KC_ESC, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN5, PV_NUM, + KC_TAB, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, + KC_CLCK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, + XXXXXXX, TG(LAYERS), PV_NUM, PV_NUM, PV_NUM, + + // left thumb + KC_SPACE, KC_BSPACE, + KC_HOME, + PV_A, PV_O, KC_END, + + // right hand + KC_MS_ACCEL2, KC_MS_ACCEL1, KC_MS_ACCEL0, KC_UP, KC_APPLICATION, XXXXXXX, KC_MS_WH_UP, + PV_NUM, KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_MS_WH_DOWN, + PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, + PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, + PV_NUM, PV_NUM, PV_NUM, PV_NUM, XXXXXXX, + + // right thumb + KC_DELETE, KC_ENTER, + KC_PGUP, + KC_PGDOWN, PV_E, PV_U + ), + + [GAMING] = LAYOUT_ergodox( + // left hand + KC_ESCAPE, GUI_T(KC_MINS), KC_I, KC_O, KC_P, ALGR_T(KC_EQL), KC_T, + KC_TAB, KC_LALT, KC_Q, KC_W, KC_E, ALL_T(KC_R), KC_G, + LT(MOUSE, KC_GRV), KC_LCTRL, KC_A, KC_S, KC_D, MEH_T(KC_F), + KC_BSLS, KC_LSHIFT, KC_Z, KC_X, KC_C, SCMD_T(KC_V), KC_M, + XXXXXXX, TG(LAYERS), KC_COMM, KC_DOT, KC_LBRC, + + // left thumb + MO(MEDIA_FN), KC_NLCK, + KC_SCLN, + KC_SPACE, KC_ENTER, KC_BSPACE, + + // right hand + KC_QUOT, KC_Y, KC_K, KC_U, KC_KP_7, KC_KP_8, KC_KP_9, + KC_MS_WH_UP, KC_H, KC_J, KC_L, KC_KP_4, KC_KP_2, KC_KP_6, + KC_B, KC_MS_UP, KC_N, KC_KP_1, KC_KP_5, KC_KP_3, + KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_UP, KC_KP_0, KC_SLASH, + KC_RBRC, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, + + // right thumb + KC_MS_BTN5, MO(CHORD), + KC_MS_BTN4, + KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1 + ), + + [ARROWS] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, SCMD_T(KC_NO), MEH_T(KC_NO), ALL_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_LCTRL, KC_LSHIFT, XXXXXXX, _______, XXXXXXX, + XXXXXXX, KC_RALT, KC_LALT, GUI_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // left thumb + XXXXXXX, XXXXXXX, + KC_HOME, + KC_SPACE, KC_BSPACE, KC_END, + + // right hand + LGUI(KC_X), XXXXXXX, LCTL(KC_X), KC_MS_WH_UP, XXXXXXX, XXXXXXX, XXXXXXX, + LGUI(KC_C), XXXXXXX, LCTL(KC_C), KC_UP, SCTL(KC_C), LCTL(KC_Z), LGUI(KC_Z), + KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_APPLICATION, + LGUI(KC_V), XXXXXXX, LCTL(KC_V), KC_MS_WH_DOWN, SCTL(KC_V), LCTL(KC_Y), SGUI(KC_Z), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, + + // right thumb + XXXXXXX, XXXXXXX, + KC_PGUP, + KC_PGDOWN, KC_DELETE, KC_ENTER + ), + + [MOUSE] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_UP, LCTL(KC_X), XXXXXXX, LGUI(KC_X), + LGUI(KC_Z), LCTL(KC_Z), SCTL(KC_C), KC_MS_UP, LCTL(KC_C), KC_MS_BTN4, LGUI(KC_C), + KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_RIGHT, + LGUI(KC_Z), LCTL(KC_Y), SCTL(KC_V), KC_MS_WH_DOWN, LCTL(KC_V), KC_MS_BTN5, LGUI(KC_V), + KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // left thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + KC_MS_BTN1, KC_MS_BTN2, XXXXXXX, + + // right hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, ALL_T(KC_NO), MEH_T(KC_NO), SCMD_T(KC_NO), XXXXXXX, + XXXXXXX, _______, KC_MS_ACCEL1, KC_LSHIFT, KC_LCTRL, KC_MS_ACCEL2, + XXXXXXX, XXXXXXX, XXXXXXX, GUI_T(KC_NO), KC_LALT, KC_RALT, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // right thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, KC_MS_ACCEL0 + ), + + [NUMPAD] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, GUI_T(KC_NO), XXXXXXX, ALL_T(KC_NO), XXXXXXX, XXXXXXX, + _______, KC_LCTRL, KC_LSHIFT, _______, MEH_T(KC_NO), XXXXXXX, + XXXXXXX, KC_RALT, KC_LALT, XXXXXXX, SCMD_T(KC_NO), XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // left thumb + XXXXXXX, XXXXXXX, + KC_HOME, + KC_SPACE, KC_BSPACE, KC_END, + + // right hand + KC_X, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_O, KC_I, KC_1, KC_2, KC_3, KC_SLSH, KC_PERC, + KC_M, KC_4, KC_5, KC_6, KC_PLUS, KC_MINS, + KC_L, KC_J, KC_7, KC_8, KC_9, KC_ASTR, KC_CIRC, + KC_DOT, KC_0, KC_COMM, KC_UNDS, KC_BSLS, + + // right thumb + XXXXXXX, XXXXXXX, + KC_PGUP, + KC_PGDOWN, KC_DELETE, KC_ENTER + ), + + [LAYERS] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, + + // left thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + + // right hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, TO(DVORAK), TO(PLOVER), TO(GAMING), XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // right thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ), + + [MEDIA_FN] = LAYOUT_ergodox( + // left hand + KC_VOLD, KC_MUTE, RGB_TOG, XXXXXXX, KC_MAIL, KC_FIND, KC_WWW_REFRESH, + KC_MPRV, KC_F9, KC_F7, KC_F5, KC_F3, KC_F1, KC_WWW_HOME, + KC_PAUS, KC_F19, KC_F17, KC_F15, KC_F13, KC_F11, + RGB_HUD, XXXXXXX, XXXXXXX, _______, KC_F23, KC_F21, KC_WWW_BACK, + RGB_VAD, KC_CLCK, KC_PSCREEN, XXXXXXX, MO(FIRMWARE), + + // left thumb + _______, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, KC_MEDIA_EJECT, + + // right hand + KC_WWW_FAVORITES, KC_MYCM, KC_CALC, XXXXXXX, RGB_MOD, RGB_M_P, KC_VOLU, + KC_WWW_SEARCH, KC_F2, KC_F4, KC_F6, KC_F8, KC_F10, KC_MNXT, + KC_F12, KC_F14, KC_F16, KC_F18, KC_F20, KC_MPLY, + KC_WWW_FORWARD, KC_F22, KC_F24, _______, XXXXXXX, XXXXXXX, RGB_HUI, + KC_PWR, XXXXXXX, KC_SLEP, KC_WAKE, RGB_VAI, + + // right thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ), + + [CHORD] = LAYOUT_ergodox( + // left hand + XXXXXXX, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), XXXXXXX, + XXXXXXX, HYPR(KC_F6), HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), XXXXXXX, + XXXXXXX, HYPR(KC_F11), HYPR(KC_F12), HYPR(KC_F13), HYPR(KC_F14), HYPR(KC_F15), + XXXXXXX, HYPR(KC_F16), HYPR(KC_F17), HYPR(KC_F18), HYPR(KC_F19), HYPR(KC_F20), XXXXXXX, + XXXXXXX, HYPR(KC_F21), HYPR(KC_F22), HYPR(KC_F23), HYPR(KC_F24), + + // left thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + + // right hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // right thumb + XXXXXXX, _______, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ), + + [FIRMWARE] = LAYOUT_ergodox( + + // left hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + + // left thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + RESET, XXXXXXX, XXXXXXX, + + // right hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // right thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, EEP_RST + ) +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c new file mode 100644 index 000000000000..323358357add --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c @@ -0,0 +1,13 @@ +// Compound keycode aliases +#define SCTL(kc) LSFT(LCTL(kc)) // Modifier keys: SHIFT+CTRL+kc combination. + +// Tap +#define LASG_T(kc) MT(MOD_LGUI | MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, GUI+ALT+SHIFT when held. +#define LCSG_T(kc) MT(MOD_LGUI | MOD_LSFT | MOD_LCTL, kc) // Mod tap: kc when tapped, GUI+CTL+SHIFT when held. + +#define LCG_T(kc) MT(MOD_LCTL | MOD_LGUI, kc) // Mod tap: kc when tapped, CTL+GUI when held. +#define LAS_T(kc) MT(MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, ALT+SHIFT when held. +#define LAG_T(kc) MT(MOD_LALT | MOD_LGUI, kc) // Mod tap: kc when tapped, ALT+GUI when held. + +// Others +#define COMPOSE KC_RALT // Compose key (used to input characters like á, ñ, ü). diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c new file mode 100644 index 000000000000..338910b53f6e --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c @@ -0,0 +1,7 @@ +// Define custom user keycodes: +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // Can always be here. + MY_CUSTOM_MACRO, // Custom macro example. + MY_OTHER_MACRO, // Custom macro example. + DYNAMIC_MACRO_RANGE // Should always be the last. +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c new file mode 100644 index 000000000000..e953f06de8c9 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H // Includes the QMK-verse. +#include "keymap_plover.h" // Includes the Plover keymap for easier readability. + + +// TODO: No eeprom changes unless needed, custom rgb settings for animations. +#include "keycodes/aliases_definitions.c" +#include "layers/layers_definitions.c" +#include "tap_dance/tap_dance_setup.c" +#include "tap_dance/tap_dances.c" +#include "user/matrix_scan_user.c" +#include "tap_dance/mod_tap_layer_dances/none_lead.c" +#include "tap_dance/mod_tap_layer_dances/dot_comm.c" +#include "tap_dance/mod_tap_layer_dances/quot_dquot.c" +#include "tap_dance/mod_tap_layer_dances/scln_coln.c" +#include "tap_dance/mod_tap_layer_dances/u_arrows_gui.c" +#include "tap_dance/mod_tap_layer_dances/h_mouse_gui.c" +#include "tap_dance/mod_tap_layer_dances/j_media_meh.c" +#include "tap_dance/mod_tap_layer_dances/w_media_meh.c" +#include "tap_dance/mod_tap_layer_dances/k_numpad_hyper.c" +#include "tap_dance/mod_tap_layer_dances/m_chords_hyper.c" +#include "tap_dance/tap_dance_actions.c" +#include "keycodes/custom_keycodes.c" +#include "dynamic_macro.h" // Includes dynamic macro definitions, needed *after* the custom keycodes. +#include "hacker_dvorak.c" +#include "user/eeconfig_init_user.c" +#include "user/process_record_user.c" +#include "plover/plover_mode.c" +#include "user/layer_set_state_user.c" diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c new file mode 100644 index 000000000000..f252bc802b2e --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c @@ -0,0 +1,12 @@ +enum layers { // Hacker Dvorak keyboard layers: + DVORAK = 0, // * Dvorak base layer. + PLOVER = 1, // * Steno layer for use with Plover. + GAMING = 2, // * Gaming layer intended for general purpose playing. + ARROWS = 3, // * Arrows movement keys and edition shortcuts. + MOUSE = 4, // * Mouse movement keys and edition shortcuts. + NUMPAD = 5, // * ATM style numpad with symbols and letters that should suffice to input any numeric literal. + LAYERS = 6, // * Layer switcher used to change between DVORAK, PLOVER and GAMING layers. + MEDIA_FN = 7, // * Media, RGB and function keys from F1 to F24 in symmetric fashion. + CHORD = 8, // * Hot keys layer (uses hyper + F1 .. F24) suitable for global shortcut tasks. + FIRMWARE = 9 // * Layer with firmware related functionality, like the reset and EEPROM keys. +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_dictionary.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_dictionary.c new file mode 100644 index 000000000000..8d5fa00a7d41 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_dictionary.c @@ -0,0 +1,14 @@ +LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(TD(APMR_PIPE)) { + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_U); + + unregister_code(KC_U); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + } +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c new file mode 100644 index 000000000000..c22670a05aaf --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c @@ -0,0 +1 @@ +LEADER_EXTERNS(); diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json b/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json new file mode 100644 index 000000000000..173bcd5a866c --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json @@ -0,0 +1,15 @@ +{ + "name": "hacker_dvorak", + "version": "1.0.0", + "description": "Inspired by the [*Programmer Dvorak*](https://www.kaufmann.no/roland/dvorak) keyboard layout, cherry picked ideas from other layouts in the [EZ Repository](https://configure.ergodox-ez.com/search?q=dvorak&legacy=true), a character distribution [heatmap vizualizer](https://run.plnkr.co/plunks/5EEO8nJ2wRzYAfT3), my own subjective use cases and lots of trial and error.", + "main": "gulpfile.js", + "scripts": { + "test": "test" + }, + "author": "SalchiPapa", + "license": "GPL-2.0", + "dependencies": { + "gulp": "^4.0.0", + "gulp-run-command": "0.0.9" + } +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/plover/plover_mode.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/plover/plover_mode.c new file mode 100644 index 000000000000..b388264907a4 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/plover/plover_mode.c @@ -0,0 +1,20 @@ +// TODO: improve feedback +void plover_toggle(void) { + // Press "PHROLG" + register_code(PV_LP); + register_code(PV_LH); + register_code(PV_LR); + register_code(PV_O); + register_code(PV_RL); + register_code(PV_RG); + + // Release "PHROLG" + unregister_code(PV_LP); + unregister_code(PV_LH); + unregister_code(PV_LR); + unregister_code(PV_O); + unregister_code(PV_RL); + unregister_code(PV_RG); +} + +bool PLOVER_MODE = false; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md b/keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md new file mode 100644 index 000000000000..8089a6d55a49 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md @@ -0,0 +1,62 @@ +# [Ergodox EZ Hacker Dvorak Layout](https://configure.ergodox-ez.com/layouts/Wadz/latest/0) + +Inspired by the [*Programmer Dvorak*](https://www.kaufmann.no/roland/dvorak) keyboard layout, cherry picked ideas from other layouts in the [EZ Repository](https://configure.ergodox-ez.com/search?q=dvorak&legacy=true), a character distribution [heatmap vizualizer](https://run.plnkr.co/plunks/5EEO8nJ2wRzYAfT3), my own subjective use cases and lots of trial and error. + +## Setup + +Configure your OS keyboard layout to US, or the keymap will be incorrect. + +## Limitations + +I plan to use [QMK](https://docs.qmk.fm) in the future, in order to overcome some limitations of the Ergodox EZ [graphical configurator](https://configure.ergodox-ez.com/layouts/default/latest/0)), however I will defer that, until more progress is made to the new [configurator](https://medium.com/the-ergo/the-configurator-is-out-of-beta-e107aec80cae). + +## Layers + +1. Dvorak + * US Dvorak layout. + * All symbols (including shifted symbols). + * All modifier are dual keys positioned near the home row. +2. Querty + * Used to overcome the limitation pointed above, when your OS layout is set to Dvorak instead of US, this way you can use + Standard Dvorak (available by default on all the main operating systems) on other normal keybdoards and Hacker Dvorak on + the Ergodox EZ Shine at the same time, without changing back and forth tho OS layout. +3. Gaming + * Still in development. + * Left side is mainly "normal" Qwerty. + * Right side is mainly for movement, either using the mouse, the arrow keys, the number pad or the `H`, `J`, `K`, `L` as direction keys. +4. Arrows + * Arrow keys navigation. + * All modifier keys. + * Common text edititng shortcuts (doesn't work for MacOS). +5. Mouse + * Mouse navigation. + * All modifier keys. + * Common text edititng shortcuts (doesn't work for MacOS). +6. Numpad + * ATM style numpad. + * All modifier keys. + * Letters from `A` to `F` for hexadecimal numbers (`B` is also used for binary numeric literals in most programming + languages, ie. `0b11001`). + * `X` for hexadecimal numeric literals in most programming languages, ie. `0xbeef`. + * `O` for octal numeric literals in most programming languages, ie `0o123`. + * `J` for complex numeric literals in Python, ie. `3j`. + * `I` and `M` for complex Julia numeric literals, ie. `3im`. + * Common symbols for mathematical operations. +7. Hyper Fn + * Useful for custom global shortcuts. +8. Media Fn + * Media keys. + * Function keys. + * EZ Shine keys. +9. Meh Fn + * Useful for custom application shortcuts. +10. Meh Fn + + * Useful for custom standard shortcuts. + +## To Do + +Add images. + +*** + +Please comment below if you have any ideas or suggestions. If you have used this layout or used it as a base, I'd love to hear about your experience! diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk new file mode 100644 index 000000000000..9da5278ed916 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk @@ -0,0 +1,38 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file + +LTO_ENABLE = yes +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes # Mouse keys(+4700b). +EXTRAKEY_ENABLE = yes # Audio control and System control(+450b). +RGBLIGHT_ENABLE = yes +LEADER_ENABLE = yes + +UNICODE_ENABLE = no +COMMAND_ENABLE = no # Commands for debug and configuration +SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard. + + +# This are by default off: +# COMBO_ENABLE = no +# UCIS_ENABLE = no # For Unicode. +# UNICODEMAP_ENABLE = no +# SLEEP_LED_ENABLE = no # Turn off leds when computer is sleeping. +# KEY_LOCK_ENABLE = no # (+1730b) +# CONSOLE_ENABLE = no # Console for debug(+400b) +# MIDI_ENABLE = no +# BLUETOOTH_ENABLE = no +# AUDIO_ENABLE = no +# VARIABLE_TRACE = no +# BACKLIGHT_ENABLE = no +# RGB_MATRIX_ENABLE = no + +# POINTING_DEVICE_ENABLE = no + +# AUTO_SHIFT_ENABLE = no +# AUTO_SHIFT_MODIFIERS = no + +# This don't need argument? +# CUSTOM_MATRIX # Custom matrix file for the ErgoDox EZ +# SPLIT_KEYBOARD diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/dot_comm.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/dot_comm.c new file mode 100644 index 000000000000..cbfbcdaf9f55 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/dot_comm.c @@ -0,0 +1,41 @@ +//instanalize an instance of 'tap' for the Dot - Comma tap dance. +static tap dot_comm_state = { + .is_press_action = true, + .state = 0 +}; + +void dot_comm_finished(qk_tap_dance_state_t *state, void *user_data) { + dot_comm_state.state = current_dance(state); + switch (dot_comm_state.state) { + case SINGLE_TAP: + register_code(KC_DOT); + break; + + case SINGLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + break; + + case DOUBLE_TAP: + register_code(KC_COMM); + break; + } +} + +void dot_comm_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (dot_comm_state.state) { + case SINGLE_TAP: + unregister_code(KC_DOT); + break; + + case SINGLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + break; + + case DOUBLE_TAP: + unregister_code(KC_COMM); + break; + } + dot_comm_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/h_mouse_gui.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/h_mouse_gui.c new file mode 100644 index 000000000000..76dda6eb3206 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/h_mouse_gui.c @@ -0,0 +1,39 @@ +//instanalize an instance of 'tap' for the H - Mouse - Gui tap dance. +static tap h_mouse_gui_state = { + .is_press_action = true, + .state = 0 +}; + +void h_mouse_gui_finished(qk_tap_dance_state_t *state, void *user_data) { + h_mouse_gui_state.state = current_dance(state); + switch (h_mouse_gui_state.state) { + case SINGLE_TAP: + register_code(KC_H); + break; + + case SINGLE_HOLD: + layer_on(MOUSE); + break; + + case DOUBLE_HOLD: + register_code(KC_LGUI); + break; + } +} + +void h_mouse_gui_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (h_mouse_gui_state.state) { + case SINGLE_TAP: + unregister_code(KC_H); + break; + + case SINGLE_HOLD: + layer_off(MOUSE); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LGUI); + break; + } + h_mouse_gui_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/j_media_meh.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/j_media_meh.c new file mode 100644 index 000000000000..daf7be1f6f12 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/j_media_meh.c @@ -0,0 +1,43 @@ +//instanalize an instance of 'tap' for the J - Media - Meh tap dance. +static tap j_media_meh_state = { + .is_press_action = true, + .state = 0 +}; + +void j_media_meh_finished(qk_tap_dance_state_t *state, void *user_data) { + j_media_meh_state.state = current_dance(state); + switch (j_media_meh_state.state) { + case SINGLE_TAP: + register_code(KC_J); + break; + + case SINGLE_HOLD: + layer_on(MEDIA_FN); + break; + + case DOUBLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_LALT); + break; + } +} + +void j_media_meh_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (j_media_meh_state.state) { + case SINGLE_TAP: + unregister_code(KC_J); + break; + + case SINGLE_HOLD: + layer_off(MEDIA_FN); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + break; + } + j_media_meh_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/k_numpad_hyper.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/k_numpad_hyper.c new file mode 100644 index 000000000000..609e9f55392d --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/k_numpad_hyper.c @@ -0,0 +1,45 @@ +//instanalize an instance of 'tap' for the K - Numpad - Hyper tap dance. +static tap k_numpad_hyper_state = { + .is_press_action = true, + .state = 0 +}; + +void k_numpad_hyper_finished(qk_tap_dance_state_t *state, void *user_data) { + k_numpad_hyper_state.state = current_dance(state); + switch (k_numpad_hyper_state.state) { + case SINGLE_TAP: + register_code(KC_K); + break; + + case SINGLE_HOLD: + layer_on(NUMPAD); + break; + + case DOUBLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_LALT); + register_code(KC_LGUI); + break; + } +} + +void k_numpad_hyper_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (k_numpad_hyper_state.state) { + case SINGLE_TAP: + unregister_code(KC_K); + break; + + case SINGLE_HOLD: + layer_off(NUMPAD); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + unregister_code(KC_LGUI); + break; + } + k_numpad_hyper_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/m_chords_hyper.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/m_chords_hyper.c new file mode 100644 index 000000000000..e7df3aef14c2 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/m_chords_hyper.c @@ -0,0 +1,45 @@ +//instanalize an instance of 'tap' for the M - Chords - Hyper tap dance. +static tap m_chords_hyper_state = { + .is_press_action = true, + .state = 0 +}; + +void m_chords_hyper_finished(qk_tap_dance_state_t *state, void *user_data) { + m_chords_hyper_state.state = current_dance(state); + switch (m_chords_hyper_state.state) { + case SINGLE_TAP: + register_code(KC_M); + break; + + case SINGLE_HOLD: + layer_on(CHORD); + break; + + case DOUBLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_LALT); + register_code(KC_LGUI); + break; + } +} + +void m_chords_hyper_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (m_chords_hyper_state.state) { + case SINGLE_TAP: + unregister_code(KC_M); + break; + + case SINGLE_HOLD: + layer_off(CHORD); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + unregister_code(KC_LGUI); + break; + } + m_chords_hyper_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c new file mode 100644 index 000000000000..0ba31cec81f8 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c @@ -0,0 +1,40 @@ +//instanalize an instance of 'tap' for the None - Lead tap dance. +static tap none_lead_state = { + .is_press_action = true, + .state = 0 +}; + +void none_lead_finished(qk_tap_dance_state_t *state, void *user_data) { + none_lead_state.state = current_dance(state); + switch (none_lead_state.state) { + case SINGLE_TAP: + register_code(KC_NO); + break; + + case SINGLE_HOLD: + register_code(KC_LALT); + register_code(KC_LSFT); + break; + + case DOUBLE_TAP: + qk_leader_start(); + break; + } +} + +void none_lead_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (none_lead_state.state) { + case SINGLE_TAP: + unregister_code(KC_NO); + break; + + case SINGLE_HOLD: + unregister_code(KC_LALT); + unregister_code(KC_LSFT); + break; + + case DOUBLE_TAP: + break; + } + none_lead_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/quot_dquot.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/quot_dquot.c new file mode 100644 index 000000000000..ac6da9e00e6d --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/quot_dquot.c @@ -0,0 +1,41 @@ +//instanalize an instance of 'tap' for the Quote - Double Quote tap dance. +static tap quot_dquot_state = { + .is_press_action = true, + .state = 0 +}; + +void quot_dquot_finished(qk_tap_dance_state_t *state, void *user_data) { + quot_dquot_state.state = current_dance(state); + switch (quot_dquot_state.state) { + case SINGLE_TAP: + register_code(KC_QUOT); + break; + + case SINGLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LALT); + break; + + case DOUBLE_TAP: + register_code16(KC_DQUO); + break; + } +} + +void quot_dquot_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (quot_dquot_state.state) { + case SINGLE_TAP: + unregister_code(KC_QUOT); + break; + + case SINGLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LALT); + break; + + case DOUBLE_TAP: + unregister_code16(KC_DQUO); + break; + } + quot_dquot_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/scln_coln.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/scln_coln.c new file mode 100644 index 000000000000..513c9326630f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/scln_coln.c @@ -0,0 +1,43 @@ +//instanalize an instance of 'tap' for the Semicolon - Colon tap dance. +static tap scln_coln_state = { + .is_press_action = true, + .state = 0 +}; + +void scln_coln_finished(qk_tap_dance_state_t *state, void *user_data) { + scln_coln_state.state = current_dance(state); + switch (scln_coln_state.state) { + case SINGLE_TAP: + register_code(KC_SCLN); + break; + + case SINGLE_HOLD: + register_code(KC_LALT); + register_code(KC_LSFT); + register_code(KC_LGUI); + break; + + case DOUBLE_TAP: + register_code16(KC_COLN); + break; + } +} + +void scln_coln_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (scln_coln_state.state) { + case SINGLE_TAP: + unregister_code(KC_SCLN); + break; + + case SINGLE_HOLD: + unregister_code(KC_LALT); + unregister_code(KC_LSFT); + unregister_code(KC_LGUI); + break; + + case DOUBLE_TAP: + unregister_code16(KC_COLN); + break; + } + scln_coln_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/u_arrows_gui.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/u_arrows_gui.c new file mode 100644 index 000000000000..e57502a79069 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/u_arrows_gui.c @@ -0,0 +1,39 @@ +//instanalize an instance of 'tap' for the U - Arrows - Gui tap dance. +static tap u_arrows_gui_state = { + .is_press_action = true, + .state = 0 +}; + +void u_arrows_gui_finished(qk_tap_dance_state_t *state, void *user_data) { + u_arrows_gui_state.state = current_dance(state); + switch (u_arrows_gui_state.state) { + case SINGLE_TAP: + register_code(KC_U); + break; + + case SINGLE_HOLD: + layer_on(ARROWS); + break; + + case DOUBLE_HOLD: + register_code(KC_LGUI); + break; + } +} + +void u_arrows_gui_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (u_arrows_gui_state.state) { + case SINGLE_TAP: + unregister_code(KC_U); + break; + + case SINGLE_HOLD: + layer_off(ARROWS); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LGUI); + break; + } + u_arrows_gui_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/w_media_meh.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/w_media_meh.c new file mode 100644 index 000000000000..c26980526c78 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/w_media_meh.c @@ -0,0 +1,43 @@ +//instanalize an instance of 'tap' for the W - Media - Meh tap dance. +static tap w_media_meh_state = { + .is_press_action = true, + .state = 0 +}; + +void w_media_meh_finished(qk_tap_dance_state_t *state, void *user_data) { + w_media_meh_state.state = current_dance(state); + switch (w_media_meh_state.state) { + case SINGLE_TAP: + register_code(KC_W); + break; + + case SINGLE_HOLD: + layer_on(MEDIA_FN); + break; + + case DOUBLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_LALT); + break; + } +} + +void w_media_meh_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (w_media_meh_state.state) { + case SINGLE_TAP: + unregister_code(KC_W); + break; + + case SINGLE_HOLD: + layer_off(MEDIA_FN); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + break; + } + w_media_meh_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c new file mode 100644 index 000000000000..59e3e2b0dcdf --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c @@ -0,0 +1,26 @@ +// Register the double tap dances: +qk_tap_dance_action_t tap_dance_actions[] = { + [EQL_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), + [MINS_UNDS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), + [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS), + [GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), + [ASTR_CIRC] = ACTION_TAP_DANCE_DOUBLE(KC_ASTR, KC_CIRC), + [APMR_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_AMPR, KC_PIPE), + [EXLM_QUES] = ACTION_TAP_DANCE_DOUBLE(KC_EXLM, KC_QUES), + [HASH_PERC] = ACTION_TAP_DANCE_DOUBLE(KC_HASH, KC_PERC), + [AT_DLR] = ACTION_TAP_DANCE_DOUBLE(KC_AT, KC_DLR), + [LPRN_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_LBRC), + [RPRN_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC), + [LCBR_LABK] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LABK), + [RCBR_RABK] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RABK), + [SCLN_COLN] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, scln_coln_finished, scln_coln_reset, DANCING_TERM), + [QUOT_DQUO] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, quot_dquot_finished, quot_dquot_reset, DANCING_TERM), + [DOT_COMM] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, dot_comm_finished, dot_comm_reset, DANCING_TERM), + [NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, none_lead_finished, none_lead_reset, DANCING_TERM), + [U_ARR_GUI] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, u_arrows_gui_finished, u_arrows_gui_reset, DANCING_TERM), + [H_MOU_GUI] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, h_mouse_gui_finished, h_mouse_gui_reset, DANCING_TERM), + [J_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, j_media_meh_finished, j_media_meh_reset, DANCING_TERM), + [W_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, w_media_meh_finished, w_media_meh_reset, DANCING_TERM), + [K_NUM_HYP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, k_numpad_hyper_finished, k_numpad_hyper_reset, DANCING_TERM), + [M_CHO_HYP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, m_chords_hyper_finished, m_chords_hyper_reset, DANCING_TERM), +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_setup.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_setup.c new file mode 100644 index 000000000000..340ccca133f6 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_setup.c @@ -0,0 +1,75 @@ +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, // Send two single taps. + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7, + TRIPLE_SINGLE_TAP = 8 // Send three single taps. +}; + +/* Return an integer that corresponds to what kind of tap dance should be executed. + * + * How to figure out tap dance state: interrupted and pressed. + * + * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit + * under the tapping term. This is typically indicitive that you are trying to "tap" the key. + * + * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term + * has ended, but the key is still being pressed down. This generally means the key is being "held". + * + * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold" + * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters. + * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters. + * + * Good places to put an advanced tap dance: + * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon + * + * Criteria for "good placement" of a tap dance key: + * Not a key that is hit frequently in a sentence + * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or + * in a web form. So 'tab' would be a poor choice for a tap dance. + * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the + * letter 'p', the word 'pepper' would be quite frustating to type. + * + * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested + * + */ +int current_dance(qk_tap_dance_state_t *state) { + int current_state = 0; + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + current_state = SINGLE_TAP; + } else { + current_state = SINGLE_HOLD; //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. + } + } else if (state->count == 2) { + /* + * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap + * action when hitting 'pp'. Suggested use case for this return value is when you want to send two + * keystrokes of the key, and not the 'double tap' action/macro. + */ + if (state->interrupted) { + current_state = DOUBLE_SINGLE_TAP; + } else if (state->pressed) { + current_state = DOUBLE_HOLD; + } else { + current_state = DOUBLE_TAP; + } + } else if (state->count == 3) { + if (state->interrupted) { + current_state = TRIPLE_SINGLE_TAP; + } else if (state->pressed) { + current_state = TRIPLE_HOLD; + } else { + current_state = TRIPLE_TAP; + } + } + return current_state; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c new file mode 100644 index 000000000000..d05a71d7e59b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c @@ -0,0 +1,98 @@ + //--------------------------------------------------------------------------------------------// + // | | | | | // + // Single tap | Single hold | Double tap | Double hold | Triple tap | Triple hold // +// Mod tap dances: // | | | | | // +enum tap_dances { //--------------------------------------------------------------------------------------------// + // | | | | | // + EQL_PLUS = 0, // = | | + | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + MINS_UNDS = 1, // - | | _ | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + SLSH_BSLS = 2, // / | | \ | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + GRV_TILD = 3, // ` | | ~ | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + QUOT_DQUO = 4, // ' | CTRL+ALT | " | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + SCLN_COLN = 5, // ; |ALT+SHIFT+META | : | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + ASTR_CIRC = 6, // * | | ^ | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + APMR_PIPE = 7, // & | | | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + EXLM_QUES = 8, // ! | | ? | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + HASH_PERC = 9, // # | | % | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + AT_DLR = 10, // @ | | $ | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + LPRN_LBRC = 11, // ( | | [ | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + RPRN_RBRC = 12, // ) | | ] | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + LCBR_LABK = 13, // { | | < | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + RCBR_RABK = 14, // } | | > | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + DOT_COMM = 15, // . | CTRL+SHIFT | , | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + NONE_LEAD = 16, // NONE | ALT+SHIFT | LEAD | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + U_ARR_GUI = 17, // U | ARROWS | | GUI | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + H_MOU_GUI = 18, // H | MOUSE | | GUI | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + J_MED_MEH = 19, // J | MEDIA_FN | | MEH | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + W_MED_MEH = 20, // W | MEDIA_FN | | MEH | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + K_NUM_HYP = 21, // K | NUMPAD | | HYPER | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + M_CHO_HYP = 22, // M | CHORD | | HYPER | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/eeconfig_init_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/eeconfig_init_user.c new file mode 100644 index 000000000000..41b7b669413a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/eeconfig_init_user.c @@ -0,0 +1,3 @@ +// void eeconfig_init_user(void) { +// +// }; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c new file mode 100644 index 000000000000..fd022681b0d4 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c @@ -0,0 +1,121 @@ + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + + switch (layer) { + case DVORAK: + rgblight_sethsv_noeeprom_green(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case PLOVER: + rgblight_sethsv_noeeprom_red(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + + if (!(PLOVER_MODE)) { + plover_toggle(); + PLOVER_MODE = true; + } + + break; + + case GAMING: + rgblight_sethsv_noeeprom_red(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case ARROWS: + rgblight_sethsv_noeeprom_blue(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case MOUSE: + rgblight_sethsv_noeeprom_blue(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case NUMPAD: + rgblight_sethsv_noeeprom_blue(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case LAYERS: + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case MEDIA_FN: + rgblight_sethsv_noeeprom_yellow(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case CHORD: + rgblight_sethsv_noeeprom_magenta(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case FIRMWARE: + rgblight_sethsv_noeeprom_magenta(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + default: + break; + } + + return state; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/matrix_scan_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/matrix_scan_user.c new file mode 100644 index 000000000000..3b78079ccafb --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/matrix_scan_user.c @@ -0,0 +1,12 @@ +#include "../leader/leader_setup.c" + +bool MATRIX_SCANNED = false; + +void matrix_scan_user(void) { + if (!(MATRIX_SCANNED)) { + rgblight_sethsv_noeeprom_green(); + MATRIX_SCANNED = true; + } + + #include "../leader/leader_dictionary.c" +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/process_record_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/process_record_user.c new file mode 100644 index 000000000000..76446358241e --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/process_record_user.c @@ -0,0 +1,75 @@ +// TODO: Improve this currently there is no feedback if activated by other means. +bool CAPS_LOCK = false; +bool NUM_LOCK = false; +bool SCROLL_LOCK = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + switch (keycode) { + case KC_CLCK: + if (record->event.pressed) { + if (!(CAPS_LOCK)) { + ergodox_right_led_1_on(); + CAPS_LOCK = true; + } else { + ergodox_right_led_1_off(); + CAPS_LOCK = false; + } + } + + return true; + + case KC_NLCK: + if (record->event.pressed) { + if (!(NUM_LOCK)) { + ergodox_right_led_2_on(); + NUM_LOCK = true; + } else { + ergodox_right_led_2_off(); + NUM_LOCK = false; + } + } + + return true; + + case KC_SLCK: + if (record->event.pressed) { + if (!(SCROLL_LOCK)) { + ergodox_right_led_3_on(); + SCROLL_LOCK = true; + } else { + ergodox_right_led_3_off(); + SCROLL_LOCK = false; + } + } + + return true; + + case KC_MS_WH_UP ... KC_MS_WH_RIGHT: + if (record->event.pressed) { + if (SCROLL_LOCK) { + return false; + } else { + return true; + } + } + + case MY_CUSTOM_MACRO: + if (record->event.pressed) { + SEND_STRING("QMK is the best thing ever!"); // this is our macro! + return false; + } + + case MY_OTHER_MACRO: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("ac")); // selects all and copies + return false; + } + + default: + return true; + } +} diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/config.h b/keyboards/ergodox_ez/keymaps/heartrobotninja/config.h new file mode 100644 index 000000000000..40d80b7018f5 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/config.h @@ -0,0 +1,18 @@ +#ifndef CONFIG_HEARTROBOTNINJA_H +#define CONFIG_HEARTROBOTNINJA_H + +#include "../../config.h" + +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_TIMEOUT 1000 + +#undef LEADER_TIMEOUT +#define LEADER_TIMEOUT 1000 + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 + +#endif \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c new file mode 100644 index 000000000000..b6edc175328c --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c @@ -0,0 +1,680 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "action_util.h" +#include "debug.h" +#include "eeconfig.h" +#include "version.h" +#include "wait.h" + +/* Aliases */ +#define ____ KC_TRNS + +/* Layers */ +enum +{ + COLE = 0, + LOWER, // right hand 10 key + RAISE, // Function keys + AUX, // Things like rebooting the board to be flashed. NUM + RAISE +}; + +/* Macros */ +enum +{ + NONE = 0, + + // OS Functions + F_PASTE, + + // Config Macros + CF_EPRM, + CF_VERS, + + // RGB Macro + RGB_ANI, +}; + +/* Tap Dancery */ +enum +{ + TD_BTK, + TD_TDE, + TD_LPRN, + TD_RPRN, + TD_MIN, + TD_USC, + TD_COPY, + TD_UNDO, + TD_FIND, +}; + +/* OS Identifier */ +enum +{ + OS_WIN = 0, + OS_OSX, + OS_LIN, +}; + +uint8_t os_type = OS_WIN; + +static uint16_t rgb_timer; +bool time_travel = false; +bool skip_leds = false; + +/* Keymaps */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Keymap 0: Colemak Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | Find | 1 ! | 2 @ | 3 # | 4 $ | 5 % | Undo | | VOLUP| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | LOCK | + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| + * | ' " ` | Q | W | F | P | G | CCopy| | VOLDN| J | L | U Ü | Y | = + | ~ : ; | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ( [ { | A Ä | R | S ß | T | D |------| |------| H | N | E | I | O Ö | ) ] } | + * |-----------+------+------+------+------+------| Paste| | MUTE |------+------+------+------+------+-----------| + * | - , < | Z | X | C | V | B | | | | K | M | / ? | \ | | ^ | _ . > | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | AUX | RAISE | LOWER | LEAD | GUI | | ESC | RUN | < | v | > | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | ALT | CTRL | | HOME | END | + * ,------|------|------| |------+------+------. + * | | | Del | | PGUP | | | + * | Space|Backsp|------| |------| Enter| Shift| + * | | | Tab | | PGDN | | | + * `--------------------' `--------------------' + */ + + [COLE] = LAYOUT_ergodox( + // Left Hand + TD(TD_FIND), KC_1, KC_2, KC_3, KC_4, KC_5, TD(TD_UNDO), + TD(TD_BTK), KC_Q, KC_W, KC_F, KC_P, KC_G, TD(TD_COPY), + TD(TD_LPRN), KC_A, KC_R, KC_S, KC_T, KC_D, + TD(TD_MIN), KC_Z, KC_X, KC_C, KC_V, KC_B, M(F_PASTE), + TT(AUX), TT(RAISE), TT(LOWER), KC_LEAD, OSM(MOD_LGUI), + OSM(MOD_LALT), OSM(MOD_LCTL), + KC_DEL, + KC_SPC, KC_BSPC, KC_TAB, + + // Right Hand + KC_VOLU, KC_6, KC_7, KC_8, KC_9, KC_0, LGUI(KC_L), + KC_VOLD, KC_J, KC_L, KC_U, KC_Y, KC_EQL, TD(TD_TDE), + KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN), + KC_MUTE, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC), + KC_ESC, LGUI(KC_R), KC_LEFT, KC_DOWN, KC_RGHT, + KC_HOME, KC_END, + KC_PGUP, + KC_PGDOWN, KC_ENT, OSM(MOD_LSFT)), + + /* Keymap 2: LOWER Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ( | ) | ^ | / | ---- | | + * | | | | | | | ---- | | ---- | | | | | | ---- | + * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | 7 | 8 | 9 | * | ---- | ---- | + * |-----------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| 4 | 5 | 6 | - | ---- | ---- | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | ---- | 1 | 2 | 3 | + | ---- | ---- | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | ---- | ---- | ---- | ---- | ---- | | 0 | = | ---- | ---- | ---- | + * `-----------------------------------' `-------------------------------------' + * ,-------------. ,-------------. + * | ---- | ---- | | ---- | ---- | + * ,------|------|------| |------+------+------. + * | | | ---- | | ---- | | | + * | ---- | ---- |------| |------| ---- | ---- | + * | | | ---- | | ---- | | | + * `--------------------' `--------------------' + */ + [LOWER] = LAYOUT_ergodox( + // Left Hand + ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____, + + // Right Hand + ____, KC_LPRN, KC_RPRN, KC_CIRC, KC_PSLS, ____, ____, + ____, KC_7, KC_8, KC_9, KC_PAST, ____, ____, + KC_4, KC_5, KC_6, KC_PMNS, ____, ____, + ____, KC_1, KC_2, KC_3, KC_PPLS, ____, ____, + KC_0, KC_PEQL, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____), + + /* Keymap 3: RAISE Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | ---- | | ---- | ! | @ | # | $ | % | ` ~ | + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| + * | F7 | F8 | F9 | F10 | F11 | F12 | ---- | | ---- | ^ | & | * | ( | ) | - _ | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| [ { | } ] | \ | | ; : | ' " | = + | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | ---- | , < | > . | / ? | ---- | ---- | ---- | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | ---- | ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- | ---- | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | ---- | ---- | | ---- | ---- | + * ,------|------|------| |------+------+------. + * | | | ---- | | ---- | | | + * | ---- | ---- |------| |------| ---- | ---- | + * | | | ---- | | ---- | | | + * `--------------------' `--------------------' + */ + [RAISE] = LAYOUT_ergodox( + // Left Hand + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, ____, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ____, + ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____, + + // Right Hand + ____, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV, + ____, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, + KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_EQL, + ____, KC_COMM, KC_DOT, KC_SLSH, ____, ____, ____, + ____, ____, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____), + + /* Keymap 7: Configuration Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | EEPROM | ---- | ---- | ---- | ---- | ---- | ---- | | PWR | ---- | ---- | ---- | ---- | ---- | | + * | | | | | | | | | | | | | | | VERSION | + * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |-----------+------+------+------+------+------| ---- | | SLP |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | WAKE | ---- | ---- | ---- | ---- | ---- | ---- | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | ---- | ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- | ---- | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | ---- | ---- | | TOG | ANI | + * ,------|------|------| |------+------+------. + * | | | ---- | | VAI | | | + * | ---- | ---- |------| |------| HUI | HUID | + * | | | ---- | | VAD | | | + * `--------------------' `--------------------' + */ + [AUX] = LAYOUT_ergodox( + // Left Hand + M(CF_EPRM), ____, ____, ____, ____, ____, KC_PWR, + ____, ____, ____, ____, ____, ____, KC_SLEP, + ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, KC_WAKE, + ____, ____, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____, + + // Right Hand + KC_PWR, ____, ____, ____, ____, ____, M(CF_VERS), + KC_SLEP, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, + KC_WAKE, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, + RGB_TOG, M(RGB_ANI), + RGB_VAI, + RGB_VAD, RGB_HUI, RGB_HUD), +}; + +void unredo(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) + { + register_code(KC_LCTL); + register_code(KC_Y); + unregister_code(KC_Y); + unregister_code(KC_LCTL); + } + else + { + register_code(KC_LCTL); + register_code(KC_Z); + unregister_code(KC_Z); + unregister_code(KC_LCTL); + } + reset_tap_dance(state); +} + +void ccopy(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) + { + register_code(KC_LCTL); + register_code(KC_X); + unregister_code(KC_X); + unregister_code(KC_LCTL); + } + else + { + register_code(KC_LCTL); + register_code(KC_C); + unregister_code(KC_C); + unregister_code(KC_LCTL); + } + reset_tap_dance(state); +} + +void findreplace(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) + { + register_code(KC_LCTL); + register_code(KC_H); + unregister_code(KC_H); + unregister_code(KC_LCTL); + } + else + { + register_code(KC_LCTL); + register_code(KC_F); + unregister_code(KC_F); + unregister_code(KC_LCTL); + } + reset_tap_dance(state); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BTK] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_GRV), + [TD_TDE] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_TILD), + [TD_LPRN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LPRN), + [TD_RPRN] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RPRN), + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINS), + [TD_USC] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_UNDS), + [TD_COPY] = ACTION_TAP_DANCE_FN(ccopy), + [TD_UNDO] = ACTION_TAP_DANCE_FN(unredo), + [TD_FIND] = ACTION_TAP_DANCE_FN(findreplace)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch (id) + { + case F_PASTE: + if (record->event.pressed) + { + register_code(KC_LCTL); + register_code(KC_V); + unregister_code(KC_V); + unregister_code(KC_LCTL); + } + break; + case RGB_ANI: + if (record->event.pressed) + { + rgb_timer = timer_read(); + } + else + { + if (timer_elapsed(rgb_timer) > 300) + { + rgblight_mode(1); + } + else + { + rgblight_step(); + } + } + case CF_EPRM: + if (record->event.pressed) + { + eeconfig_init(); + } + return false; + break; + case CF_VERS: + if (record->event.pressed) + { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + } + return MACRO_NONE; +}; + +/* +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{} +*/ + +void tap(uint16_t code) +{ + register_code(code); + unregister_code(code); +} + +LEADER_EXTERNS(); +void matrix_scan_user(void) +{ + + uint8_t layer = biton32(layer_state); + + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || + ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && + !has_oneshot_mods_timed_out())) + { + ergodox_right_led_1_set(LED_BRIGHTNESS_HI); + ergodox_right_led_1_on(); + } + else if (layer == RAISE || layer == AUX) + { + ergodox_right_led_1_set(LED_BRIGHTNESS_LO); + ergodox_right_led_1_on(); + } + else + { + ergodox_right_led_1_off(); + } + + if (keyboard_report->mods & MOD_BIT(KC_LCTL) || + ((get_oneshot_mods() & MOD_BIT(KC_LCTL)) && + !has_oneshot_mods_timed_out())) + { + ergodox_right_led_2_set(LED_BRIGHTNESS_HI); + ergodox_right_led_2_on(); + } + else if (layer == LOWER || layer == AUX) + { + ergodox_right_led_2_set(LED_BRIGHTNESS_LO); + ergodox_right_led_2_on(); + } + else + { + ergodox_right_led_2_off(); + } + + if (keyboard_report->mods & MOD_BIT(KC_LALT) || + ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && + !has_oneshot_mods_timed_out())) + { + ergodox_right_led_3_set(LED_BRIGHTNESS_HI); + ergodox_right_led_3_on(); + } + else if (layer == COLE || layer == AUX) + { + ergodox_right_led_3_set(LED_BRIGHTNESS_LO); + ergodox_right_led_3_on(); + } + else + { + ergodox_right_led_3_off(); + } + + LEADER_DICTIONARY() + { + leading = false; + leader_end(); + + SEQ_THREE_KEYS(KC_W, KC_I, KC_N) { os_type = OS_WIN; }; + SEQ_THREE_KEYS(KC_O, KC_S, KC_X) { os_type = OS_OSX; }; + SEQ_THREE_KEYS(KC_L, KC_I, KC_N) { os_type = OS_LIN; }; + + SEQ_ONE_KEY(KC_A) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_2); + tap(KC_KP_8); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(KC_A); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + tap(KC_A); + break; + } + } + SEQ_TWO_KEYS(KC_A, KC_A) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_1); + tap(KC_KP_9); + tap(KC_KP_6); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + register_code(KC_LSFT); + register_code(KC_A); + unregister_code(KC_A); + unregister_code(KC_LSFT); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + register_code(KC_LSFT); + register_code(KC_A); + unregister_code(KC_A); + unregister_code(KC_LSFT); + break; + } + } + SEQ_ONE_KEY(KC_O) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_4); + tap(KC_KP_6); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(KC_O); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + tap(KC_O); + break; + } + } + SEQ_TWO_KEYS(KC_O, KC_O) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_1); + tap(KC_KP_4); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(LSFT(KC_O)); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + register_code(KC_LSFT); + register_code(KC_O); + unregister_code(KC_O); + unregister_code(KC_LSFT); + break; + } + } + SEQ_ONE_KEY(KC_U) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_5); + tap(KC_KP_2); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(KC_U); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + tap(KC_U); + break; + } + } + SEQ_TWO_KEYS(KC_U, KC_U) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_2); + tap(KC_KP_0); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(LSFT(KC_U)); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + register_code(KC_LSFT); + register_code(KC_U); + unregister_code(KC_U); + unregister_code(KC_LSFT); + break; + } + } + SEQ_ONE_KEY(KC_S) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_2); + tap(KC_KP_3); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + tap(KC_S); + unregister_code(KC_RALT); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_S); + tap(KC_S); + break; + } + } + } +} + +void matrix_init_user(void) +{ + + ergodox_led_all_on(); + rgblight_init(); + rgblight_enable(); + rgblight_setrgb(255, 0, 0); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) + { + ergodox_led_all_set(i); + wait_ms(5); + } + rgblight_setrgb(255, 255, 0); + wait_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) + { + ergodox_led_all_set(i); + wait_ms(10); + } + rgblight_setrgb(0, 255, 255); + ergodox_led_all_off(); + wait_ms(1000); + + rgblight_effect_knight(50); +} \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk new file mode 100644 index 000000000000..3cd837d56913 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk @@ -0,0 +1,32 @@ +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +COMMAND_ENABLE=no +SLEEP_LED_ENABLE=no +NKRO_ENABLE = yes +FORCE_NKRO = no +DEBUG_ENABLE = no +CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = yes +KEYLOGGER_ENABLE = no +UCIS_ENABLE = no +MOUSEKEY_ENABLE = no +AUTOLOG_ENABLE = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_ANIMATION = yes +EXTRAKEY_ENABLE = yes +LEADER_ENABLE = yes + +OPT_DEFS += -DUSER_PRINT + +KEYMAP_VERSION = $(shell \ + if [ -d "${KEYMAP_PATH}/.git" ]; then \ + cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ + else echo QMK; fi) + +KEYMAP_BRANCH = $(shell \ + if [ -d "${KEYMAP_PATH}/.git" ]; then \ + cd "${KEYMAP_PATH}"; \ + fi; \ + git rev-parse --abbrev-ref HEAD 2>/dev/null) + +OPT_DEFS += -DKEYMAP_VERSION=\"$(KEYMAP_VERSION)\\\#$(KEYMAP_BRANCH)\" + diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/config.h b/keyboards/ergodox_ez/keymaps/ifohancroft/config.h new file mode 100644 index 000000000000..9a0d0e54f71b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 IFo Hancroft + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here +#define USB_POLLING_INTERVAL_MS 1 +#define FORCE_NKRO diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c b/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c new file mode 100644 index 000000000000..56c1ff28a781 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c @@ -0,0 +1,199 @@ +/* Copyright 2021 IFo Hancroft + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Default Layer + * *---------------------------------------------------------------------* *---------------------------------------------------------------------* + * | ` | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Del | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | ESC | A | S | D | F | G | Del | | | H | J | K | L | ; | ' | + * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| + * | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | + * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| + * | Ctrl | Super | Alt | MO(4) | MO(3) | | MO(3) | Left | Down | Up | Right | + * *-------------------------------------------------* *-------------------------------------------------* + * + * *-------------------* *-------------------* + * | MO(2) | | | | | + * *---------+---------+---------| |---------+---------+---------* + * | | | | | | | | + * | Bckspc | Enter |---------| |---------| Enter | Space | + * | | | Space | | | | | + * *---------+---------+---------* *---------+---------+---------* + */ + + LAYOUT_ergodox_pretty( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(3), MO(3), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + + MO(2), KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_BSPC, KC_ENT, KC_SPC, KC_NO, KC_ENT, KC_SPC + ), + + + + /* Gaming Layer + * *---------------------------------------------------------------------* *---------------------------------------------------------------------* + * | | | | | | | 6 | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | + * *-------------------------------------------------* *-------------------------------------------------* + * + * *-------------------* *-------------------* + * | | | | | | + * *---------+---------+---------| |---------+---------+---------* + * | | | | | | | | + * | Space | |---------| |---------| | | + * | | | | | | | | + * *---------+---------+---------* *---------+---------+---------* + */ + + LAYOUT_ergodox_pretty( + _______, _______, _______, _______, _______, _______, KC_6, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, + _______, _______, + KC_SPC, _______, _______, _______, _______, _______ + ), + + + + /* Left Hand Layer + * *---------------------------------------------------------------------* *---------------------------------------------------------------------* + * | | 6 | 7 | 8 | 9 | 0 | = | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | \ | Y | U | I | O | P | ] | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | ' | H | J | K | L | ; | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| + * | | N | M | , | . | / | | | | | | | | + * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | + * *-------------------------------------------------* *-------------------------------------------------* + * + * *-------------------* *-------------------* + * | | | | | | + * *---------+---------+---------| |---------+---------+---------* + * | | | | | | | | + * | | |---------| |---------| | | + * | | | | | | | | + * *---------+---------+---------* *---------+---------+---------* + */ + + LAYOUT_ergodox_pretty( + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, _______, _______, _______, _______, _______, _______, _______, + KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, + KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, _______, _______, _______, _______, _______, + _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + + + /* Function Keys Layer + * *---------------------------------------------------------------------* *---------------------------------------------------------------------* + * | NumLock | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | | + | 7 | 8 | 9 | * | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | | - | 4 | 5 | 6 | / | | | | Left | Down | Up | Right | | | + * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| + * | | 0 | 1 | 2 | 3 | . | | | | | | | | + * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | + * *-------------------------------------------------* *-------------------------------------------------* + * + * *-------------------* *-------------------* + * | | | | | | + * *---------+---------+---------| |---------+---------+---------* + * | | | | | | | | + * | | Enter |---------| |---------| | | + * | | | PgUp | | PgDn | | | + * *---------+---------+---------* *---------+---------+---------* + */ + + LAYOUT_ergodox_pretty( + KC_NUM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PAST, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_PSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PDOT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, + _______, _______, + _______, KC_PENT, KC_PGUP, KC_PGDN, _______, _______ + ), + + + + /* Layers Layer + * *---------------------------------------------------------------------* *---------------------------------------------------------------------* + * | | TO(0) | TO(1) | | | | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | | | + * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| + * | | | | | | | | | | | | + * *-------------------------------------------------* *-------------------------------------------------* + * + * *-------------------* *-------------------* + * | | | | | | + * *---------+---------+---------| |---------+---------+---------* + * | | | | | | | | + * | | |---------| |---------| | | + * | | | | | | | | + * *---------+---------+---------* *---------+---------+---------* + */ + + LAYOUT_ergodox_pretty( + _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md b/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md new file mode 100644 index 000000000000..daa581062c28 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md @@ -0,0 +1,20 @@ +![IFo Hancroft ErgoDox EZ Layout Image](https://i.imgur.com/BlH0ZdE.png) + +# IFo Hancroft's ErgoDox EZ Layout + +- Layer 0: A Standard ANSI QWERTY Layer. It adds some additional keys from the right half in-order to avoid having to lift your right hand of the mouse. +- Layer 1: A Gaming Layer. It replaces the Backspace with a Space, and the Dash with a 6, so you can play CS:GO without needing to lift your right hand of the mouse. +- Layer 2: A Left Hand Layer. It is basically a left hand version of the right half, so you can have access to a full-sized keyboard without needing to lift your right hand from the the mouse. +- Layer 3: A Function Layer. It contains the F1-F12 keys, PgUp, PgDn, Numpad, and arrows on HJKL. +- Layer 4: A Layer Switching Layer. The keys in this layer turn on a specific layer while disabling the rest. Basically, you come here to switch between the QWERTY and Gaming layers. + + +This keymap also does the following: + +- Sets the polling rate of the keyboard to 1ms +- Forces NKRO on +- Enables: + - Command +- Disables: + - Mouse Key + - Extra Key diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk b/keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk new file mode 100644 index 000000000000..775ecbd12bad --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no +COMMAND_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/kou/keymap.c b/keyboards/ergodox_ez/keymaps/kou/keymap.c new file mode 100644 index 000000000000..c8d0a6b5ddb0 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/kou/keymap.c @@ -0,0 +1,312 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define NPAD 2 // number pad +#define MDIA 3 // media keys +#define OTHR 4 // other keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1! | 2@ | 3# | 4$ | 5% | `~ | | \| | 6 | 7 | 8 | 9 | 0 | BkSp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | Del | | =+ | Y | U | I | O | P | '" | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCtrl | A | S | D | F | G |------| |------| H | J | K | L | ; | RCtrl | + * |--------+------+------+------+------+------| Esc | | -_ |------+------+------+------+------+--------| + * | LShift | Z/L2 | X | C | V | B | | | | N | M | , | . | //L3 | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ~L1 | LAlt | LGui | ~L1 | Space| | Left | Right| LGui | LAlt | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | (*1) | (*2) | | L2 | L1 | + * ,------|------|------| |------+--------+------. + * | | | L3 | | (*3) | | | + * | Enter| Esc |------| |------| Up | Down | + * | /LSft| /LCtr| L4 | | (*4) | | | + * `--------------------' `----------------------' + * (*1) -> Ctrl + Alt + U (Webstorm: Toggle Camel Case) + * (*2) -> Ctrl + Shift + Alt + P (Webstorm: Pritter Format) + * (*3) -> Ctrl + Shift + Alt + Up (Webstorm: Move Previous Change) + * (*4) -> Ctrl + Shift + Alt + Down (Webstorm: Move Next Change) + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, LT(NPAD, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_ESC, + MO(SYMB), KC_LALT, KC_LGUI, MO(SYMB), KC_SPC, + LSFT(LALT(KC_U)), LCTL(LSFT(LALT(KC_P))), + TG(MDIA), + SFT_T(KC_ENT), CTL_T(KC_ESC), TG(OTHR), + + + // right hand + KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL, + KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, LT(MDIA, KC_SLSH), KC_RSFT, + KC_LEFT, KC_RGHT, KC_RGUI, KC_RALT, MO(SYMB), + TG(NPAD), TG(SYMB), + LCTL(LSFT(LALT(KC_UP))), + LCTL(LSFT(LALT(KC_DOWN))), KC_UP, KC_DOWN + ), + + + +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | | | | [ | ] | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | F6 | F7 | F8 | F9 | F10 | | | | ! | @ | # | $ | % | ` | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F11 | F12 | GUI+1| GUI+2| GUI+3|------| |------| ^ | & | * | ~ | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | { | } | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | Home | End | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| PgUp | PgDn | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV, + KC_CIRC, KC_AMPR, KC_ASTR, KC_TILD, KC_PIPE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_BSLS, KC_TRNS, + KC_HOME, KC_END, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_PGUP, KC_PGDN +), + + + +/* Keymap 2: Number pad Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | |NumLk | * | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | + | | 7 | 8 | 9 | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | 4 | 5 | 6 | | | + * |--------+------+------+------+------+------| | | - |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 | / | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | . | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// Number Pad +[NPAD] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_NLCK, KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PPLS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, + KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, + KC_PMNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_TRNS, + KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + + + +/* Keymap 3: Mouse Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | WUp | | | | | WUp | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| WDn |------| |------| | WDn | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | |MsAcl0| | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | |Brwser|Brwser| + * | Lclk | Rclk |------| |------|Back |Fwd | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_WH_U, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ACL0, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, KC_TRNS, + + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_WBAK, KC_WFWD +), + + + +/* Keymap 4: + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// +[OTHR] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +}; diff --git a/keyboards/ergodox_ez/keymaps/kou/readme.md b/keyboards/ergodox_ez/keymaps/kou/readme.md new file mode 100644 index 000000000000..b77f32c72fd3 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/kou/readme.md @@ -0,0 +1,28 @@ +# ErgoDox EZ Kou Keymap Configuration + +## Changelog + +* Jun 22, 2018 + * Update keymap. + - enable prettier format of WebStorm. + - arrange key of toggle-camel-case. +* Sep 5, 2017 + * Update keymap. +* Jul 20, 2017 + * Update keymap. +* May 19, 2017 + * Update keymap. +* Jan 18, 2017 + * Update keymap. +* Jan 10, 2017 + * Update keymap. +* Jan 7, 2017: + * create kou keymap. + +## How to build + +```bash +# in project root +$ make git-submodule +$ make ergodox_ez:kou +``` diff --git a/keyboards/ergodox_ez/keymaps/levi_2023/keymap.c b/keyboards/ergodox_ez/keymaps/levi_2023/keymap.c new file mode 100644 index 000000000000..e3219097694a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/levi_2023/keymap.c @@ -0,0 +1,219 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define DV 0 // default Dvorak layer +#define QW 1 // symbols +#define FN 2 // media keys + +enum custom_keycodes { + EPRM = SAFE_RANGE, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic Dvorak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | ' | , | . | P | Y | +QW | | Tab | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCtl | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| Esc | | Enter|------+------+------+------+------+--------| + * | LSft | ; | Q | J | K | X | | | | B | M | W | V | Z | RSft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ~FN | LCtl | Z | LAlt | LSup | | RCtl | RAlt | \ | RSup | RCtl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Home | End | | PgUp | ESC | + * ,------|------|------| |------+------+------. + * | | | Enter| | PgDn | | | + * | Space| Bspc |------| |------| Bspc | ~FN | + * | | | Del | | Del | | | + * `--------------------' `--------------------' + */ +[DV] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(QW), + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_ESC, + MO(FN), KC_LCTL, KC_Z, KC_LALT, KC_LGUI, + KC_HOME, KC_END, + KC_ENT, + KC_SPC, KC_BSPC, KC_DEL, + // right hand + KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TAB, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + MO(FN), KC_RALT, KC_BSLS, KC_RGUI, KC_RCTL, + KC_PGUP, KC_ESC, + KC_PGDN, + KC_DEL, KC_BSPC, MO(FN) +), +/* Keymap 1: QWERTY Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | - | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | +DV | | Tab | Y | U | I | O | P | = | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |---------+------+------+------+------+------| Esc | | Enter|------+------+------+------+------+--------| + * | | Z | X | C | V | B | | | | N | M | , | . | / | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | Z | | ~FN | | ~FN | | \ | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Home | End | | PgUp | ESC | + * ,------|------|------| |------+------+------. + * | | | Enter| | PgDn | | | + * | Space| Bspc |------| |------| Bspc | ~FN | + * | | | Del | | Del | | | + * `--------------------' `--------------------' + */ +[QW] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_1 , KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(QW), + KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_END, + KC_ENT, + KC_SPC, KC_BSPC, KC_DEL, + // right hand + KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(FN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGUP, KC_ESC, + KC_PGDN, + KC_DEL, KC_BSPC, MO(FN) +), +/* Keymap 2: Arrows, function keys, media keys, etc. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Home | Up | End | PgUp | VolUp| | | | PgUp | Home | Up | End | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Left | Down | Right| PgDn | VolDn|------| |------| PgDn | Left | Down | Right| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | Mute | | | | | | Pause| Prev | Next | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | PrScr| | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[FN] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PSCR, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +/* bool process_record_user(uint16_t keycode, keyrecord_t *record) { */ + +/* }; */ + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs whenever there is a layer state change. +uint32_t layer_state_set_user(uint32_t state) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + uint8_t layer = biton32(state); + switch (layer) { + case 0: + #ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); + #else + #ifdef RGBLIGHT_ENABLE + rgblight_init(); + #endif + #endif + break; + case 1: + ergodox_right_led_1_on(); + #ifdef RGBLIGHT_COLOR_LAYER_1 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); + #endif + break; + case 2: + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_2 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); + #endif + break; + case 3: + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_3 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); + #endif + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_4 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); + #endif + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_5 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); + #endif + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_6 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); + #endif + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_7 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); + #endif + break; + default: + break; + } + + return state; +}; diff --git a/keyboards/ergodox_ez/keymaps/levi_layout/keymap.c b/keyboards/ergodox_ez/keymaps/levi_layout/keymap.c new file mode 100644 index 000000000000..02b41bf99a65 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/levi_layout/keymap.c @@ -0,0 +1,219 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define DV 0 // default Dvorak layer +#define QW 1 // symbols +#define FN 2 // media keys + +enum custom_keycodes { + EPRM = SAFE_RANGE, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic Dvorak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | ' | , | . | P | Y | +QW | | Tab | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCtl | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| Esc | | Enter|------+------+------+------+------+--------| + * | LSft | ; | Q | J | K | X | | | | B | M | W | V | Z | RSft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCtl | LSup | Z | LAlt | ~FN | | ~FN | RAlt | \ | RSup | RCtl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Home | End | | PgUp | ESC | + * ,------|------|------| |------+------+------. + * | | | Enter| | PgDn | | | + * | Space| Bspc |------| |------| Bspc | ~FN | + * | | | Del | | Del | | | + * `--------------------' `--------------------' + */ +[DV] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(QW), + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_ESC, + KC_LCTL, KC_LGUI, KC_Z, KC_LALT, MO(FN), + KC_HOME, KC_END, + KC_ENT, + KC_SPC, KC_BSPC, KC_DEL, + // right hand + KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TAB, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + MO(FN), KC_RALT, KC_BSLS, KC_RGUI, KC_RCTL, + KC_PGUP, KC_ESC, + KC_PGDN, + KC_DEL, KC_BSPC, MO(FN) +), +/* Keymap 1: QWERTY Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | - | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | +DV | | Tab | Y | U | I | O | P | = | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |---------+------+------+------+------+------| Esc | | Enter|------+------+------+------+------+--------| + * | | Z | X | C | V | B | | | | N | M | , | . | / | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | Z | | ~FN | | ~FN | | \ | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Home | End | | PgUp | ESC | + * ,------|------|------| |------+------+------. + * | | | Enter| | PgDn | | | + * | Space| Bspc |------| |------| Bspc | ~FN | + * | | | Del | | Del | | | + * `--------------------' `--------------------' + */ +[QW] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_1 , KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(QW), + KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_END, + KC_ENT, + KC_SPC, KC_BSPC, KC_DEL, + // right hand + KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(FN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGUP, KC_ESC, + KC_PGDN, + KC_DEL, KC_BSPC, MO(FN) +), +/* Keymap 2: Arrows, function keys, media keys, etc. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Home | Up | End | PgUp | VolUp| | | | PgUp | Home | Up | End | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Left | Down | Right| PgDn | VolDn|------| |------| PgDn | Left | Down | Right| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | Mute | | | | | | Pause| Prev | Next | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[FN] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +/* bool process_record_user(uint16_t keycode, keyrecord_t *record) { */ + +/* }; */ + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs whenever there is a layer state change. +uint32_t layer_state_set_user(uint32_t state) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + uint8_t layer = biton32(state); + switch (layer) { + case 0: + #ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); + #else + #ifdef RGBLIGHT_ENABLE + rgblight_init(); + #endif + #endif + break; + case 1: + ergodox_right_led_1_on(); + #ifdef RGBLIGHT_COLOR_LAYER_1 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); + #endif + break; + case 2: + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_2 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); + #endif + break; + case 3: + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_3 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); + #endif + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_4 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); + #endif + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_5 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); + #endif + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_6 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); + #endif + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_7 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); + #endif + break; + default: + break; + } + + return state; +}; diff --git a/keyboards/ergodox_ez/keymaps/lukaus/config.h b/keyboards/ergodox_ez/keymaps/lukaus/config.h new file mode 100644 index 000000000000..2b93445378a4 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/lukaus/config.h @@ -0,0 +1,16 @@ +#pragma once +#define CONFIG_USER_H + +#define TAPPING_TERM 200 + +#ifdef RGBLIGHT_ENABLE +#undef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#endif // RGBLIGHT_ENABLE + +#define FORCE_NKRO + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) diff --git a/keyboards/ergodox_ez/keymaps/lukaus/keymap.c b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c new file mode 100644 index 000000000000..5d797beb1850 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c @@ -0,0 +1,843 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#include "keymap_german.h" + +#include "keymap_nordic.h" + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + + // Programmer's Dvorak "macros" : + // To be paired with get_mods to enable both + // Shift functionality and Programmer's Dvorak + + DVP_ESC, // Grave escape basically i think + DVP_AMPR, + DVP_LBRACKET, + DVP_LCBR, + DVP_RCBR, + DVP_LPRN, + DVP_AT, + + DVP_EQUAL, + DVP_ASTERISK, + DVP_RPRN, + DVP_PLUS, + DVP_RBRACKET, + DVP_EXLM, + DVP_HASH, + + RU_2, + RU_3, + RU_4, + RU_6, + RU_7, + RU_DOT, + + SHFT_COMMA, + SHFT_DOT, + + RGB_SLD, + RGB_FF0000, + RGB_008000, + RGB_0000FF, + RGB_FFFFFF, + RGB_800080 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Programmer's Dvorak layer + [0] = LAYOUT_ergodox( + DVP_ESC, DVP_AMPR, DVP_LBRACKET, DVP_LCBR, DVP_RCBR, DVP_LPRN, DVP_AT, + KC_TAB, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Y, MO(4), + MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSHIFT, KC_QUOTE, KC_Q, KC_J, KC_K, KC_X, KC_HYPR, + KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_C), LCTL(KC_V), + + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, MO(4), KC_END, + + DVP_EQUAL, DVP_ASTERISK, DVP_RPRN, DVP_PLUS, DVP_RBRACKET, DVP_EXLM, DVP_HASH, + TT(4), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + KC_MEH, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(3), + KC_DELETE, KC_BSLASH, KC_RGUI, KC_RCTL, LCTL(KC_F), + + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ), + // Gaming QWERTY layer + [1] = LAYOUT_ergodox( + KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F14, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F23, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F24, + KC_LCTL, KC_F8, KC_LALT, KC_F14, KC_F13, + + KC_HOME, TO(0), KC_F15, KC_SPACE, KC_LCTL, KC_LALT, + + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, + KC_F24, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, + KC_F17, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, + KC_DELETE, KC_F19, KC_LGUI, KC_F21, KC_F22, + + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ), + [2] = LAYOUT_ergodox( + KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_C, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TO(0), + MO(3), KC_1, KC_2, KC_3, KC_4, KC_5, + KC_LSHIFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_LCTL, KC_F8, KC_LALT, KC_I, KC_S, + + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, + + KC_NO, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_NO, KC_NO, + TO(0), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_NO, KC_NO, + KC_KP_4, KC_KP_5, KC_KP_6, KC_EQUAL, KC_NO, KC_NO, + KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_NO, KC_NO, + KC_KP_0, KC_KP_DOT, KC_NO, KC_NO, KC_NO, + + TO(0), KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ), + // Function Layer + [3] = LAYOUT_ergodox( + KC_DLR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_MEDIA_PREV_TRACK,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_NEXT_TRACK,KC_NO, TT(4), + KC_TRANSPARENT, KC_TRANSPARENT, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, KC_TRANSPARENT, + KC_LSHIFT, LALT(KC_Z), KC_TRANSPARENT, KC_TRANSPARENT, KC_F12, KC_TRANSPARENT, ALL_T(KC_NO), + KC_LCTL, KC_LALT, KC_LGUI, KC_CAPSLOCK, LSFT(KC_F12), + + KC_PSCREEN, KC_PGUP, KC_PGDOWN, KC_SPACE, KC_LSHIFT, KC_INSERT, + + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_NO, KC_HOME, KC_TRANSPARENT, KC_PSCREEN, KC_SLCK, KC_TRANSPARENT, KC_TRANSPARENT, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRANSPARENT, KC_TRANSPARENT, + MEH_T(KC_NO), KC_CALCULATOR, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_RSHIFT, + KC_DELETE, KC_INSERT, KC_TRANSPARENT, KC_F19, KC_RCTL, + + TO(2),KC_TRANSPARENT,KC_TRANSPARENT,LALT(KC_F10),KC_ENTER,KC_BSPACE + ), + // Keypad, Lighting, and Mouse emulation layer + ///* + [4] = LAYOUT_ergodox( + KC_ESCAPE, KC_NO, KC_NO, KC_MS_BTN3, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_NO, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_WH_UP, TO(0), + KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, + KC_LSHIFT, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, TO(5), + KC_LCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, + + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, + + KC_NO, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_CALCULATOR, KC_NO, RGB_VAI, + TO(0), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS, KC_NO, RGB_VAD, + KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_NO, RGB_HUI, + KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, RGB_SLD, RGB_HUD, + KC_KP_0, KC_KP_DOT, KC_KP_ENTER, RGB_MOD, RGB_TOG, + + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ) + //*/ + /* + // Keypad, Lighting, and Mouse emulation layer + [4] = KEYMAP( + KC_ESCAPE, KC_NO, KC_NO, KC_MS_BTN3, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_NO, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_WH_UP, TO(0), + KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, + KC_LSHIFT, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, TO(5), + KC_LCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, + + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, + + KC_NO, KC_I, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_CALCULATOR, RGB_VAI, + TO(0), KC_G, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS, RGB_VAD, + SHFT_COMMA, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, RGB_HUI, + KC_NO, SHFT_DOT, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, RGB_HUD, + KC_NO, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, RGB_TOG, + + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ) + */ + +}; + +void led_set_keymap(uint8_t usb_led) { + +} + +void matrix_init_user (void) { + +} + + +bool left_shift_down = false; +bool right_shift_down = false; + +bool numlock = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + case KC_LSHIFT: + if (record->event.pressed) + { + left_shift_down = true; + return true; + } + else + { + left_shift_down = false; + return true; + } + break; + case KC_RSHIFT: + + if (record->event.pressed) + { + right_shift_down = true; + return true; + } + else + { + right_shift_down = false; + return true; + } + break; + case KC_NUMLOCK: + + if (record->event.pressed) + { + numlock = !numlock; + } + break; + + case DVP_ESC: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + SEND_STRING("~"); + return false; + } + else + { + if(record->event.pressed) + SEND_STRING(SS_DOWN(X_ESCAPE)); + else + SEND_STRING(SS_UP(X_ESCAPE)); + return false; + } + break; + + case DVP_AMPR: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + SEND_STRING("%"); + + } + } + else + { + if(record->event.pressed) + SEND_STRING("&"); + } + return false; + + break; + + case SHFT_DOT: + if(record->event.pressed) + SEND_STRING(">"); + break; + + case SHFT_COMMA: + if(record->event.pressed) + SEND_STRING("<"); + break; + + case DVP_LBRACKET: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_7); + unregister_code(KC_7); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("["); + } + return false; + + return false; + break; + + case DVP_LCBR: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_5); + unregister_code(KC_5); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("{"); + } + return false; + break; + + case DVP_RCBR: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_3); + unregister_code(KC_3); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("}"); + } + return false; + break; + + case DVP_LPRN: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_1); + unregister_code(KC_1); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("("); + } + return false; + break; + + case DVP_AT: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_LSHIFT); + register_code(KC_6); + unregister_code(KC_6); + unregister_code(KC_LSHIFT); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("@"); + } + return false; + break; + + + case DVP_EQUAL: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_9); + unregister_code(KC_9); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("="); + } + return false; + break; + + case DVP_ASTERISK: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_0); + unregister_code(KC_0); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("*"); + } + return false; + break; + + case DVP_RPRN: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_2); + unregister_code(KC_2); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING(")"); + } + return false; + break; + + case DVP_PLUS: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_4); + unregister_code(KC_4); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("+"); + } + return false; + break; + + case DVP_RBRACKET: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_6); + unregister_code(KC_6); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("]"); + } + return false; + break; + + case DVP_EXLM: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_8); + unregister_code(KC_8); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("!"); + } + return false; + break; + + case DVP_HASH: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; + + // Russian + case RU_2: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; +case RU_3: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; +case RU_4: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; +case RU_6: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; +case RU_7: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; + + case RU_DOT: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; + + + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + + case RGB_FF0000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0x00,0x00); + #endif + } + return false; + break; + + case RGB_008000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x80,0x00); + #endif + } + return false; + break; + + case RGB_0000FF: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x00,0xff); + #endif + } + return false; + break; + + case RGB_FFFFFF: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0xff,0xff); + #endif + } + return false; + break; + + case RGB_800080: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x80,0x00,0x80); + #endif + } + return false; + break; + + } + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + + uint8_t layer = biton32(state); + + // ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 0: + break; + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + return state; + +}; diff --git a/keyboards/ergodox_ez/keymaps/lukaus/readme.md b/keyboards/ergodox_ez/keymaps/lukaus/readme.md new file mode 100644 index 000000000000..af091bb1b9a1 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/lukaus/readme.md @@ -0,0 +1,3 @@ +# Lukaus' keymap + +Programmer's Dvorak as default layer with Qwerty gaming layer and two function layers diff --git a/keyboards/ergodox_ez/keymaps/lukaus/rules.mk b/keyboards/ergodox_ez/keymaps/lukaus/rules.mk new file mode 100644 index 000000000000..fe05f599b925 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/lukaus/rules.mk @@ -0,0 +1 @@ +#UNICODE_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/matrixman/keymap.c b/keyboards/ergodox_ez/keymaps/matrixman/keymap.c new file mode 100644 index 000000000000..10b6567cdb6c --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/matrixman/keymap.c @@ -0,0 +1,188 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" + +// http://www.keyboard-layout-editor.com/#/gists/9be130e4c9b503317619 + +#define BASE 0 // default layer +#define SYMB_R 1 // symbols (activated by right hand) +#define SYMB_L 2 // symbols (activated by left hand) +#define NAV 3 // navigation + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Prose layer + * + * Layer switch keys: + * [tap/toggle] + * (momentary) + * {toggle} + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | Del | | BSPC | 6 | 7 | 8 | 9 | 0 | BSPC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | Ctrl/| |Ctrl/ | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| Esc | | ; |------+------+------+------+------+--------| + * | Ctrl | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------|Alt/ | |Alt/ |------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B |Tab | |Ins | N | M | , | . | / | Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Ctrl |Super | Alt |[Nav] |[Symb]| |[Symb]|[Nav] | Alt | Ctrl | Enter| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Shift| Alt | | Alt | Shift | + * ,------|------|------| |------+--------+------. + * | | |[Nav] | |[Nav] | | | + * | Tab | Esc |------| |------| Space | Bspc | + * | | | Ctrl | | Ctrl | | | + * `--------------------' `----------------------' + */ +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + LT(NAV,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELETE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, CTL_T(KC_ESC), + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), + KC_LCTRL, KC_LGUI, KC_LALT,KC_NO, MO(NAV), + + KC_LCTRL, KC_LALT, + MO(NAV), + KC_TAB, LT(SYMB_L,KC_ESC), KC_LSFT, + // right hand + KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + CTL_T(KC_SCLN),KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + ALT_T(KC_INS), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + MO(NAV),KC_NO, KC_RALT,KC_RGUI, CTL_T(KC_ENT), + KC_RALT, KC_RCTRL, + MO(NAV), + KC_RSFT, LT(SYMB_R,KC_SPACE), KC_BSPC + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ` | ~ | * | & | / | < | | > | \ | 7 | 8 | 9 | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | _ | ^ | % | $ | ( |------| |------| ) | 4 | 5 | 6 | - | Enter | + * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| + * | | = | # | @ | ! | { | | | | } | 1 | 2 | 3 | + | Enter | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | " | | | | | | 0 | . | . | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | ? | : |------| |------| ; | . | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[SYMB_L] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_GRV , KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), + KC_TRNS, KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, + KC_TRNS, KC_EQL, KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_LBRC, + LSFT(KC_QUOT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + LSFT(KC_SLSH), KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE, KC_TRNS, + KC_RPRN, KC_4, KC_5, KC_6, KC_MINS, KC_ENT, + KC_RBRC, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS, KC_ENT, + KC_0, KC_DOT, KC_DOT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_SCLN, KC_DOT +), + +[SYMB_R] = LAYOUT_ergodox( // same as above, but avoids clash between SYMB and ;/: + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_GRV , KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), + KC_TRNS, KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, + KC_TRNS, KC_EQL, KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_LBRC, + LSFT(KC_QUOT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + LSFT(KC_SLSH), KC_COLN, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE, KC_TRNS, + KC_RPRN, KC_4, KC_5, KC_6, KC_MINS, KC_ENT, + KC_RBRC, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS, KC_ENT, + KC_0, KC_DOT, KC_DOT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_DOT +), +/* Keymap 2: Navigation Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 |Break | |PrntSc| F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | --- |MsLeft|MsUp |MsDown|MsRght|------| |------| Left | Down | Up | Right| F11 | Enter| + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | --- | Btn4 |ScrlDn|ScrlUp| Btn5 | | | | Home | PgDwn| PgUp | End | F12 | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NAV] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PAUSE, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, + KC_TRNS, KC_BTN2, KC_BTN4, KC_MS_WH_UP, KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_PSCREEN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_ENT, + KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + case 2: + ergodox_right_led_1_on(); + break; + case 3: + case 4: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +}; diff --git a/keyboards/ergodox_ez/keymaps/matrixman/readme.md b/keyboards/ergodox_ez/keymaps/matrixman/readme.md new file mode 100644 index 000000000000..1f72d732216f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/matrixman/readme.md @@ -0,0 +1,100 @@ +The Matrixman Ergodox / Split-Planck Keyboard Layout +==================================================== + +### The problem + +These layouts were designed to give my aching pinkeys a break + +### The Design + + - Pinkeys do less: + - Left q, a, z, `, _, =, [Shift], [F1] [Click], [Right Click] + - Right p, ', /, |, -, +, [Shift], [F10], [F11], [F12] + - Index fingers do more: + - Left: r, f, v, t, g, b, &, $, !, /, (, {, <, [, [Ctrl], [Tab], [Alt], [PrintScr] + - Right: u, j, m, y, h, n, 7, 4, 1, \, ), }, >, ], ;, [Ctrl], [Insert], [Alt], [Pause] + - Thumbs do more: + - Left: [Esc], :, [Shift], [Tab] + - Right: [Space], ;, [Shift], [Backspace] + - Palm Presses too: + - Left: [Ctrl], " + - Right: [Ctrl, [Enter] + +### The Plan + +I keep an Ergodox at home and at work, and when I'm mobile, I carry a planck. +These keymaps are designed to minimize the difficulty of switching between the two. + +### Other features + +- 10-key at home row for right hand +- "Matching" symbols use same finger on opposite hand: <> [] {} /\ () 1! 2@ 3# 4$ 5% 6^ 7& 8* -_ += +- Supports vim-like (hjkl) movements: + - mouse movement and scrolling + - arrow keys and nav keys (home, end, pg up, pg down) +- All non-modal keys mapped (all keys from a typical 105 key keyboard except caps, num, and scroll lock) + +The Planck Layout +----------------- + +For a picture, see here: http://www.keyboard-layout-editor.com/#/gists/eb0696806831fc0d93c9 + +### Prose Layer + + qwert▓▓yuiop + asdfg▓;hjkl' + zxcvb▓▓nm,./ + ▓▓▓▓▓▓▓ ▓▓▓▓ + +### Symbol Layer + + `~*&/<>\789| + _^%$([])456- + =#@!{▓▓}123+ + "▓,?:▓▓;0▓.▓ + +### Nav Layer + + FKEYF▓▓KEYFK + mouse▓▓arowE + scrol▓▓seekY + ▓▓▓▓▓▓▓▓▓▓▓▓ + + +The Ergodox Layout +------------------ + +For a picture, see here: http://www.keyboard-layout-editor.com/#/gists/9be130e4c9b503317619 + +Wherever the Ergodox has keys that the Planck doesn't, whichever key would be expected on a typical 105 key is in that place + +### Prose Layer + +▓▓▓▓▓▓▓ ▓▓▓▓▓▓ +▓qwert▓ ▓yuiop\ +▓asdfg▓ ;hjkl;' +▓zxcvb nm,./▓ +▓▓▓▓▓▓ ▓▓▓▓▓▓ + ▓▓ ▓▓ + ▓▓▓ ▓ ▓ + +### Symbol Layer + +▓▓▓▓▓▓ ▓▓▓▓▓▓ +▓`~*&/< >\789|\ +▓_^%$([ ])456-▓ +▓=#@!{ }123+▓ +"▓▓▓▓▓▓ 0▓.▓▓ + ▓▓ ▓▓ + ?:▓ ▓;. + + +### Nav Layer + +▓▓▓▓▓▓▓ ▓▓▓▓▓▓ +▓FKEYF▓ ▓KEYFK▓ +▓mouse▓ arowE▓ +▓scrol seekY▓ +▓▓▓▓▓▓ ▓▓▓▓▓▓ + ▓▓ ▓▓ + ▓▓▓ ▓▓▓ diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h new file mode 100644 index 000000000000..06c50e0a96db --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h @@ -0,0 +1,32 @@ +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#define ORYX_CONFIGURATOR +#undef TAPPING_TERM +#define TAPPING_TERM 175 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 20 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 14 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 30 + +#undef MOUSEKEY_WHEEL_INTERVAL +#define MOUSEKEY_WHEEL_INTERVAL 50 + +#undef MK_COMBINED +#define MK_COMBINED + +// /* Temporarily defining a tapping term that is ridiculous to see if i can tell if lt is working. */ +// #undef TAPPING_TERM +// #define TAPPING_TERM 499 + +/* Turning permissive hold and ignore mod tap interrupt off in order to test the tapping term. */ +#undef PERMISSIVE_HOLD +#define PERMISSIVE_HOLD +#undef IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c new file mode 100644 index 000000000000..18d6e667cc6a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c @@ -0,0 +1,434 @@ +#include QMK_KEYBOARD_H +#include "version.h" +#include "keymap_german.h" +#include "keymap_nordic.h" +#include "keymap_french.h" +#include "keymap_spanish.h" +#include "keymap_hungarian.h" +#include "keymap_swedish.h" +#include "keymap_br_abnt2.h" +#include "keymap_canadian_multilingual.h" +#include "keymap_german_ch.h" +#include "keymap_jp.h" +#include "keymap_bepo.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ES_LABK_MAC KC_GRAVE +#define ES_RABK_MAC LSFT(KC_GRAVE) +#define ES_BSLS_MAC ALGR(KC_6) +#define NO_PIPE_ALT KC_GRAVE +#define NO_BSLS_ALT KC_EQUAL + +enum custom_keycodes { + RGB_SLD = EZ_SAFE_RANGE, + MS_WH_UP, + MS_WH_DOWN, + MS_WH_RIGHT, + MS_WH_LEFT, +}; + +// tapdance keycodes +enum td_keycodes { + CTRL_TO12, + SHIFT_TO13, + ALT_TO11, +}; + +// define a type containing as many tapdance states as you need +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, +} td_state_t; + +// create a global instance of the tapdance state type +static td_state_t td_state; + +// declare your tapdance functions: + +// function to determine the current tapdance state +int cur_dance (qk_tap_dance_state_t *state); + +// `finished` and `reset` functions for each tapdance keycode +void ctrlto12_finished (qk_tap_dance_state_t *state, void *user_data); +void ctrlto12_reset (qk_tap_dance_state_t *state, void *user_data); +void altto11_finished (qk_tap_dance_state_t *state, void *user_data); +void altto11_reset (qk_tap_dance_state_t *state, void *user_data); +void shiftto13_finished (qk_tap_dance_state_t *state, void *user_data); +void shiftto13_reset (qk_tap_dance_state_t *state, void *user_data); + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ergodox_pretty( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_INSERT, KC_Q, LGUI_T(KC_W), MT(MOD_HYPR, KC_E),LT(5,KC_R), KC_T, KC_NO, KC_NO, KC_Y, LT(6,KC_U), MT(MOD_HYPR, KC_I),RGUI_T(KC_O), KC_P, KC_PSCREEN, + KC_ESCAPE, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), LT(1,KC_F), KC_G, KC_H, LT(2,KC_J), RALT_T(KC_K), RCTL_T(KC_L), RSFT_T(KC_SCOLON),KC_CAPSLOCK, + KC_HOME, LT(9,KC_Z), MT(MOD_LGUI | MOD_LCTL,KC_X), LT(7,KC_C), LT(3,KC_V), KC_B, KC_NO, KC_NO, KC_N, LT(4,KC_M), LT(8,KC_COMMA), MT(MOD_RGUI | MOD_RCTL, KC_DOT), KC_QUOTE, KC_END, + KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + TO(10), KC_BSPACE, KC_NO, KC_NO, KC_ENTER, KC_SPACE + ), + [1] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_7, KC_8, KC_9, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_TRANSPARENT, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_0, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_1, KC_2, KC_3, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [2] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_HYPR, KC_RGUI, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LPRN, KC_RPRN, KC_ASTR, KC_SLASH, KC_NO, KC_NO, KC_TRANSPARENT, KC_RALT, KC_RCTRL, KC_RSHIFT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, MT(MOD_RGUI | MOD_RCTL, KC_NO), KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [3] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_TRANSPARENT, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [4] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_HYPR, KC_RGUI, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LBRACKET, KC_RBRACKET, KC_QUES, KC_EXLM, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RCTRL, KC_RSHIFT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_TRANSPARENT, KC_NO, MT(MOD_RGUI | MOD_RCTL, KC_NO), KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [5] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_HYPR, KC_TRANSPARENT, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_HASH, KC_BSLASH, KC_GRAVE, KC_TILD, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [6] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_TRANSPARENT, KC_HYPR, KC_RGUI, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_UNDS, KC_EQUAL, KC_MINUS, KC_PLUS, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RCTRL, KC_RSHIFT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, MT(MOD_RGUI | MOD_RCTL, KC_NO), KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [7] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AT, KC_DLR, KC_PERC, KC_CIRC, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [8] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LCBR, KC_RCBR, KC_AMPR, KC_PIPE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [9] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_AUDIO_VOL_UP,KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MEDIA_PREV_TRACK,KC_AUDIO_VOL_DOWN,KC_MEDIA_NEXT_TRACK,KC_MEDIA_PLAY_PAUSE,KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), + [10] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_MS_BTN2, KC_ACL2, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, TD(SHIFT_TO13), TD(CTRL_TO12), TD(ALT_TO11), KC_MS_BTN1, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_ACL0, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, TO(0) + ), + [11] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, TO(0) + ), + [12] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_HYPR, KC_ACL2, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), MO(14), KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, TO(0) + ), + [13] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDOWN, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, TO(0) + ), + [14] = LAYOUT_ergodox_pretty( + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MS_WH_LEFT, MS_WH_DOWN, MS_WH_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + return state; +}; + +// determine the tapdance state to return +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted && state->pressed && state->interrupting_keycode == KC_MS_BTN1) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == 22273) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == 22272) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == KC_TAB) {return SINGLE_HOLD;} + else if (state->interrupted || !state->pressed) { + // if (state->interrupted) { + // print("interrupted\n"); + // uprintf("Shift: %u\n", KC_LSHIFT); + // uprintf("Control: %u\n", KC_LCTRL); + // uprintf("%u\n",state->interrupting_keycode); + // } + return SINGLE_TAP; + } + else { return SINGLE_HOLD; } + } + else { return 2; } // any number higher than the maximum state value you return above +} +// /* Backup in case previous code is hard to piece together. */ +// int cur_dance (qk_tap_dance_state_t *state) { +// if (state->count == 1) { +// if (state->interrupted || !state->pressed) { return SINGLE_TAP; } +// else { return SINGLE_HOLD; } +// } +// else { return 2; } // any number higher than the maximum state value you return above +// } + +void ctrlto12_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + layer_on(12); + break; + case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22273 || state->interrupting_keycode == 43)) { + register_mods(MOD_BIT(KC_LCTRL)); + break; + } + register_mods(MOD_BIT(KC_LCTRL)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LCTL(KC_MS_BTN1)); + } + break; + } +} + +void ctrlto12_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22273 || state->interrupting_keycode == 43) ) { + unregister_mods(MOD_BIT(KC_LCTRL)); + break; + } + unregister_mods(MOD_BIT(KC_LCTRL)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LCTL(KC_MS_BTN1)); + } + break; + } +} + +void shiftto13_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + layer_on(13); + break; + case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22272 || state->interrupting_keycode == 43) ) { + register_mods(MOD_BIT(KC_LSHIFT)); + break; + } + register_mods(MOD_BIT(KC_LSHIFT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LSFT(KC_MS_BTN1)); + } + break; + } +} + +void shiftto13_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22272 || state->interrupting_keycode == 43) ) { + unregister_mods(MOD_BIT(KC_LSHIFT)); + break; + } + unregister_mods(MOD_BIT(KC_LSHIFT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LSFT(KC_MS_BTN1)); + } + break; + } +} + +void altto11_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + layer_on(11); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LALT(KC_MS_BTN1)); + } + break; + } +} + +void altto11_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LALT(KC_MS_BTN1)); + } + break; + } +} + +// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions +qk_tap_dance_action_t tap_dance_actions[] = { + [CTRL_TO12] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrlto12_finished, ctrlto12_reset), + [SHIFT_TO13] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftto13_finished, shiftto13_reset), + [ALT_TO11] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altto11_finished, altto11_reset), +}; + +/* Debugging functions */ + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour +// debug_enable=true; +// debug_matrix=true; +// debug_keyboard=true; +// debug_mouse=true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed + // #ifdef CONSOLE_ENABLE + // uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + // #endif + switch (keycode) { + case MS_WH_DOWN: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_DOWN)); + } + break; + case MS_WH_UP: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_UP)); + } + break; + case MS_WH_LEFT: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_LEFT)); + } + break; + case MS_WH_RIGHT: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_RIGHT)); + } + break; + } + return true; +} + diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md b/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md new file mode 100644 index 000000000000..ff3c8d142cca --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md @@ -0,0 +1,27 @@ +# The nathanvercaemert ErgoDox EZ configuration + +Centered around the home row and the use of mouse keys, this configuration focuses on minimal finger movement. No key is more than one unit away from the home row. + +## Layers + +* Base Layer + * The two main thumb keys provide a loop to the mouse key layer. Pressing the left followed by the right always guarantees that you are on the base layer. + * There are a lot of dual function keys on the base layer. + * The layout of the letters is qwerty. + * Pinkys, ring fingers, and middle fingers apply dual function modifiers (along with the keys above and below the ring fingers.) +* Numbers, Symbols, and Function Keys. + * From the base layer, many keys are dual function layer switches. + * The switch on one hand changes the home row of the other hand to a row of symbols in most cases. + * The left index finger, and the key below it, change the right hand to the numbers and function keys + respectfully. +* Mouse Layer + * Clicking the main left thumb key navigates to the mouse layer (10.) Some dual function keys (technically tap dance functions) allow the left hand to apply modifiers to mouse clicks while tapping switches to + navigation layers. +* Navigation Layers + * From the Mouse Layer, taps to the left home row navigate to scroll keys, arrow keys, and page keys. +* Notes on Acceleration + * Designated as "Slow" and "Fast" on the mouse layers (movement and scroll,) these keys can be held to allow for slow/precise or fast/efficient control. + +Here is the image of my keymap: + +![Imgur Image](https://i.imgur.com/x6VgH9Z.png) \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk new file mode 100644 index 000000000000..0dadd4371f5f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk @@ -0,0 +1,9 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LTO_ENABLE = yes +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = no +TAP_DANCE_ENABLE=yes + +# Debugging +CONSOLE_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/nfriend/config.h b/keyboards/ergodox_ez/keymaps/nfriend/config.h new file mode 100644 index 000000000000..36d23c96b707 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/config.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#undef DEBOUNCE +#define DEBOUNCE 15 + +#undef ONESHOT_TIMEOUT +#define ONESHOT_TIMEOUT 1003 + +#define PERMISSIVE_HOLD + +#undef IGNORE_MOD_TAP_INTERRUPT + +#define RGBLIGHT_SLEEP diff --git a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c new file mode 100644 index 000000000000..1d12093babe4 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c @@ -0,0 +1,1096 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "version.h" +#include "keymap_german.h" +#include "keymap_nordic.h" +#include "keymap_french.h" +#include "keymap_spanish.h" +#include "keymap_hungarian.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ___ KC_TRNS + +/* Shortcut for Option+Ctrl */ +#define OC(keycode) LALT(LCTL(keycode)) + +enum layer_names { + + /* Base layers */ + _COLEMAK, + _QWERTY, + _DVORAK, + + /* Keys the base layers share */ + _COMMON, + + /* OS layers */ + _MAC, + _WINDOWS, + + /* Symbols */ + _NUMPAD, + _SYMBOLS, + + /* Window management */ + _WM_MAC, + _WM_WINDOWS, + + /* Navigation */ + _ARROWS_MAC, + _ARROWS_WINDOWS, + + _MISC +}; + +enum custom_keycodes { + RGB_SLD = SAFE_RANGE, /* Can always be here */ + HSV_0_255_255, + HSV_120_255_128, + HSV_240_255_255, + MAC_MODE, + WINDOWS_MODE, + DYNAMIC_MACRO_RANGE, /* This needs to be last! */ +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* clang-format off */ + + [_COLEMAK] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Q, /**/ KC_W, /**/ KC_F, /**/ KC_P, /**/ KC_G, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_A, /**/ KC_R, /**/ KC_S, /**/ KC_T, /**/ KC_D, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Z, /**/ KC_X, /**/ KC_C, /**/ KC_V, /**/ KC_B, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_J, /**/ KC_L, /**/ KC_U, /**/ KC_Y, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_H, /**/ KC_N, /**/ KC_E, /**/ KC_I, /**/ KC_O, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_K, /**/ KC_M, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_QWERTY] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Q, /**/ KC_W, /**/ KC_E, /**/ KC_R, /**/ KC_T, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_A, /**/ KC_S, /**/ KC_D, /**/ KC_F, /**/ KC_G, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Z, /**/ KC_X, /**/ KC_C, /**/ KC_V, /**/ KC_B, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Y, /**/ KC_U, /**/ KC_I, /**/ KC_O, /**/ KC_P, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_H, /**/ KC_J, /**/ KC_K, /**/ KC_L, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_N, /**/ KC_M, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_DVORAK] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_QUOTE, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_P, /**/ KC_Y, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_A, /**/ KC_O, /**/ KC_E, /**/ KC_U, /**/ KC_I, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_SCOLON,/**/ KC_Q, /**/ KC_J, /**/ KC_K, /**/ KC_X, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F, /**/ KC_G, /**/ KC_C, /**/ KC_R, /**/ KC_L, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_D, /**/ KC_H, /**/ KC_T, /**/ KC_N, /**/ KC_S, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_B, /**/ KC_M, /**/ KC_W, /**/ KC_V, /**/ KC_Z, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_COMMON] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_ESCAPE,/**/ KC_1, /**/ KC_2, /**/ KC_3, /**/ KC_4, /**/ KC_5, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_TAB, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/MO(_SYMBOLS), _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/KC_LSHIFT, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LT(_NUMPAD,KC_TAB), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ KC_SPACE, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ KC_AUDIO_VOL_DOWN, + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ KC_BSPACE,/**/ _______, /**/ KC_ENTER, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_6, /**/ KC_7, /**/ KC_8, /**/ KC_9, /**/ KC_0, /**/ KC_F12, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_HYPR, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ KC_BSLASH,/**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/MO(_SYMBOLS),// + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_MEH, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/KC_RSHIFT, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/TT(_MISC), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ KC_CAPS, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + KC_AUDIO_VOL_UP,/**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ KC_ESCAPE,/**/ KC_ENTER, /**/ KC_SPACE /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LCTL(LGUI(LSFT(KC_4))), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______ ,/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LALT(KC_BSPACE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + KC_LCTRL,/**/ KC_LGUI, /**/ KC_LALT, /**/MO(_WM_MAC), MO(_ARROWS_MAC), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/LCTL(LGUI(KC_Q)), + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LGUI, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + RGUI(RSFT(KC_7)),/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + MO(_ARROWS_MAC), MO(_WM_MAC),/**/ KC_LALT, /**/ KC_LGUI, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + LCTL(LGUI(KC_Q)),/**/ KC_CAPS, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_WINDOWS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LGUI(LSFT(KC_S)), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LCTL(KC_BSPACE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + KC_LGUI, /**/ KC_LCTRL, /**/ KC_LALT, MO(_WM_WINDOWS), MO(_ARROWS_WINDOWS), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_L),/**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LCTRL, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + LALT(KC_PSCREEN),/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + MO(_ARROWS_WINDOWS), MO(_WM_WINDOWS), KC_RALT, /**/ KC_RCTRL, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/LGUI(KC_L),/**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_NUMPAD] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ XXXXXXX, /**/ KC_ESCAPE, LALT(KC_KP_MINUS), KC_PERC, /**/KC_KP_SLASH, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ XXXXXXX, /**/ KC_KP_7, /**/ KC_KP_8, /**/ KC_KP_9, /**/KC_KP_ASTERISK, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_COLN, /**/ KC_KP_4, /**/ KC_KP_5, /**/ KC_KP_6, /**/KC_KP_MINUS, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_COMMA, /**/ KC_KP_1, /**/ KC_KP_2, /**/ KC_KP_3, /**/KC_KP_PLUS,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_0, /**/ KC_0, /**/ KC_DOT, /**/KC_KP_ENTER, ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ KC_0 /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_SYMBOLS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F1, /**/ KC_F2, /**/ KC_F3, /**/ KC_F4, /**/ KC_F5, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_EXLM, /**/ KC_AT, /**/ KC_LCBR, /**/ KC_RCBR, /**/ KC_PERC, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + LGUI(KC_BSPACE),/**/ KC_HASH, /**/ KC_UNDS, /**/ KC_LPRN, /**/ KC_RPRN, /**/ KC_AMPR, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_BSLASH,/**/ KC_SLASH, /**/KC_LBRACKET, KC_RBRACKET,/**/ KC_TILD, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F6, /**/ KC_F7, /**/ KC_F8, /**/ KC_F9, /**/ KC_F10, /**/ KC_F11, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_CIRC, /**/KC_KP_PLUS,/**/KC_KP_MINUS, KC_GRAVE, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_PIPE, /**/ KC_EQUAL, /**/ KC_QUOTE, /**/ KC_COLN, /**/ KC_DQUO, /**/LGUI(KC_DELETE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_DLR, /**/ KC_ASTR, /**/ KC_LABK, /**/ KC_RABK, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_WM_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ OC(KC_C), /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_U), OC(LGUI(KC_LEFT)),OC(KC_ENTER),OC(LGUI(KC_RIGHT)), OC(KC_I),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_J), OC(KC_LEFT), OC(KC_BSPACE), OC(KC_RIGHT), OC(KC_K), /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_UP, /**/ OC(KC_E), /**/ OC(KC_F), /**/ OC(KC_T), /**/ OC(KC_G), /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/KC_LEFT, KC_DOWN, /**/ KC_RIGHT, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ OC(KC_C), /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_U), OC(LGUI(KC_LEFT)),OC(KC_ENTER),OC(LGUI(KC_RIGHT)), OC(KC_I),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ OC(KC_J), OC(KC_LEFT), OC(KC_BSPACE), OC(KC_RIGHT), OC(KC_K), /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_D), /**/ OC(KC_E), /**/ OC(KC_F), /**/ OC(KC_T), /**/ KC_UP, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ KC_LEFT, /**/ KC_DOWN, /**/KC_RIGHT,// + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_ARROWS_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_Q),/**/LGUI(KC_W),/**/LGUI(KC_F),/**/LGUI(KC_P),/**/LGUI(KC_G),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LCTRL, /**/ KC_LGUI, /**/ KC_LSHIFT,/**/ KC_LALT, /**/LGUI(KC_D),/*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_Z),/**/LGUI(KC_X),/**/LGUI(KC_C),/**/LGUI(KC_V),/**/LGUI(KC_B),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RGUI(KC_J),/**/ KC_BSPACE,/**/ KC_UP, /**/ KC_DELETE, RGUI(KC_SCOLON), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/RGUI(KC_H),/**/ KC_LEFT, /**/ KC_DOWN, /**/ KC_RIGHT, /**/ KC_ENTER, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RGUI(KC_K),/**/RGUI(KC_M), RGUI(KC_COMMA), RGUI(KC_DOT), RGUI(KC_SLASH), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_ARROWS_WINDOWS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LCTL(KC_Q),/**/LCTL(KC_W),/**/LCTL(KC_F),/**/LCTL(KC_P),/**/LCTL(KC_G),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LGUI, /**/ KC_HYPR, /**/ KC_LSHIFT,/**/ KC_LCTRL, /**/LCTL(KC_D),/*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LCTL(KC_Z),/**/LCTL(KC_X),/**/LCTL(KC_C),/**/LCTL(KC_V),/**/LCTL(KC_B),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RCTL(KC_J),/**/ KC_BSPACE,/**/ KC_UP, /**/ KC_DELETE, RCTL(KC_SCOLON), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/RCTL(KC_H),/**/ KC_LEFT, /**/ KC_DOWN, /**/ KC_RIGHT, /**/ KC_ENTER, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RCTL(KC_K),/**/RCTL(KC_M), RCTL(KC_COMMA), RCTL(KC_DOT), RCTL(KC_SLASH), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_MISC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F14, /**/ KC_F15, /**/ _______, /**/ _______, /**/ _______, /**/ RESET, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ KC_MS_UP, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/KC_MS_LEFT,/**/KC_MS_DOWN,/**/KC_MS_RIGHT, _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ RGB_MOD, /**/HSV_0_255_255, + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/HSV_120_255_128, + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/KC_MS_BTN1,/**/KC_MS_BTN2,/**/HSV_240_255_255, + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/KC_MEDIA_EJECT, + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/DF(_DVORAK), DF(_QWERTY), DF(_COLEMAK),// + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, WINDOWS_MODE, MAC_MODE, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ RGB_TOG, /**/ RGB_SLD, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ RGB_VAI, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ RGB_VAD, /**/ RGB_HUD, /**/ RGB_HUI /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + /* clang-format on */ +}; + +bool suspended = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EEP_RST: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + case HSV_0_255_255: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(0, 255, 255); +#endif + } + return false; + break; + case HSV_120_255_128: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(120, 255, 128); +#endif + } + return false; + break; + case HSV_240_255_255: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(240, 255, 255); +#endif + } + return false; + break; + case MAC_MODE: + if (record->event.pressed) { + layer_on(_MAC); + layer_off(_WINDOWS); + } + return false; + break; + case WINDOWS_MODE: + if (record->event.pressed) { + layer_on(_WINDOWS); + layer_off(_MAC); + } + return false; + break; + } + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + if (layer == _ARROWS_MAC || layer == _ARROWS_WINDOWS) { + ergodox_right_led_1_on(); + } else if (layer == _SYMBOLS) { + ergodox_right_led_2_on(); + } else if (layer == _NUMPAD) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + } else if (layer == _WM_MAC || layer == _WM_WINDOWS) { + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if (layer == _MISC) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if (layer == _WINDOWS) { + ergodox_right_led_3_on(); + } else if (layer == _MAC) { + /* do nothing */ + } + + return state; +}; + +void keyboard_post_init_user(void) { + /* This layer is always on */ + layer_on(_COMMON); + + /* Default to Mac layout */ + layer_on(_MAC); +} diff --git a/keyboards/ergodox_ez/keymaps/nfriend/readme.md b/keyboards/ergodox_ez/keymaps/nfriend/readme.md new file mode 100644 index 000000000000..0a19e2d04296 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/readme.md @@ -0,0 +1,52 @@ +# [nfriend](https://gitlab.com/nfriend)'s ErgoDox EZ configuration + +![nfriend's ErgoDox EZ keymap](https://i.imgur.com/CMMmdBc.png) + +[View this keymap on +keyboard-layout-editor.com.](http://www.keyboard-layout-editor.com/#/gists/01283b322a647c96ef75955a9b0bac68) + +Color legend: + +- **Black:** Primary layer. +- **Blue:** Symbol layer. Accessed by holding either of the to sym + keys on either end of the keyboard. +- **Green:** Numpad layer. Accessed by holding the to numpad key. +- **Red:** Arrow layer. Accessed by holding either of the to arrows + thumb keys. +- **Teal:** Window management layer. Accessed by holding either of the to + WM thumb keys. + - Note: this layer is not pictured on this keymap since is tightly coupled + to [Magnet](https://magnet.crowdcafe.com/). +- **Yellow:** Miscellaneous layer. Includes LED control, layout toggling + (Colemak/Dvorak/QWERTY), platform toggling (Windows/Mac), and other + experimental features. + - Note: this layer is only partially pictured on this keymap + +## Caveats + +In its current state, this keymap is fairly Mac-centric. Some of the features +implemented in the Mac layers have not yet been ported to the corresponding +Windows layers. + +## Building + +To build this layout, open a command window in the root directory of this +repository and run: + +```bash +make ergodox_ez:nfriend +``` + +This will create a `.build/ergodox_ez_nfriend.hex` file which can be flashed +using the [Teensy loader](https://www.pjrc.com/teensy/loader.html). After the +`.hex` file has been loaded into Teensy, the keyboard can be reprogrammed by +pressing the bottom-right key of the right half of the keyboard and the +top-right key of the left half (the RESET key in the screenshot +above). + +## Developing + +Use the template in `./template.c` to help create new layers quickly. + +This layout was originally based on [this EZ Configurator +configuration](https://configure.ergodox-ez.com/ergodox-ez/layouts/x9MWL/latest/0). diff --git a/keyboards/ergodox_ez/keymaps/nfriend/rules.mk b/keyboards/ergodox_ez/keymaps/nfriend/rules.mk new file mode 100644 index 000000000000..721d8036010c --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/rules.mk @@ -0,0 +1,8 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +DEBOUNCE_TYPE = sym_eager_pk +LTO_ENABLE = yes +COMMAND_ENABLE = no +UNICODE_ENABLE = no +UNICODEMAP_ENABLE = no +DYNAMIC_MACRO_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/nfriend/template.c b/keyboards/ergodox_ez/keymaps/nfriend/template.c new file mode 100644 index 000000000000..dc4294d595b6 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/template.c @@ -0,0 +1,92 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* clang-format off */ + +[LAYER_NAME] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ +), diff --git a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c new file mode 100644 index 000000000000..85455fa9d9f9 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c @@ -0,0 +1,179 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | 1 | 2 | Home | | PgUp | 3 | 4 | + * |------|------|------| |------|--------|------| + * | Space| BkSp | End | | PgDn | Tab |Enter | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox_80( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_1, KC_2, KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP,KC_3, KC_4, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |------|------|------| |------|------|------| + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox_80( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+----------. + * | | | | | | | | + * |------|------|------| |------|------|----------| + * | | | | | | |BrwserBack| + * `--------------------' `------------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox_80( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox_ez/keymaps/profet_80/readme.md b/keyboards/ergodox_ez/keymaps/profet_80/readme.md new file mode 100644 index 000000000000..7380e3465f33 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/profet_80/readme.md @@ -0,0 +1,10 @@ +# ErgoDox 80 Default Configuration + +This is based on the default Ergodox EZ keymap. +The difference is that this keymap supports 80 key layouts. +If you own an 80 key Ergodox, use this as an example to get your desired keymap. + +**NOTE:** This layout is not physically supported by the Ergodox EZ. + + +![Default80](https://i.imgur.com/P2Lga9x.png) diff --git a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c new file mode 100644 index 000000000000..024cefd270ea --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c @@ -0,0 +1,334 @@ +// pvinis ergodox ez +// ,------------------------------------. ┌────┬────┬────┬────┬────┬────┬──────┐ +// | | | | | | | | │ │ │ │ │ │ │ │ +// |------+----+----+----+----+---------| ├────┼────┼────┼────┼────┼────┼──────┤ +// | | | | | | | | │ │ │ │ │ │ │ │ +// |------+----+----+----x----x----| | │ ├────╆━━━━╅────┼────┼────┼──────┤ +// | | | | | | |----| ├────┤ ┃ ┃ │ │ │ │ +// |------+----+----+----x----x----| | │ ├────╄━━━━╃────┼────┼────┼──────┤ +// | | | | | | | | │ │ │ │ │ │ │ │ +// `------+----+----+----+----+---------' └────┴────┼────┼────┼────┼────┼────┬─┘ +// | | | | | | │ │ │ │ │ │ +// `------------------------' └────┴────┴────┴────┴────┘ +// ,---------. ┌────┬────┐ +// | | | │ │ │ +// ,----+----+----| ├────┼────┼────┐ +// | | | | │ │ │ │ +// | | |----| ├────┤ │ │ +// | | | | │ │ │ │ +// `--------------' └────┴────┴────┘ + +#include QMK_KEYBOARD_H +#include "pvinis.h" +#include "mousekey.h" + +// layers +enum { + MOUSE = 8, +}; + +// extra keys +enum { + NONE = 30, + TD_LAYR, // SYSCTL and MOUSE layer switch +}; + +// application selection +// this is sending ctrl-alt-gui-, and this is picked up by hammerspoon +#define AP_SLCK ALLM(KC_S) +#define AP_XCOD ALLM(KC_X) +#define AP_MSGR ALLM(KC_M) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // ,------------------------------------. ,------------------------------------. + // |4xFLSH| | | | | |Opt | | | | | | | | | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | Tab | | | | | | | | | | | | | | | + // |------+----+----+----x----x----| | | |----x----x----+----+----+------| + // |EscCtl| | | | | |----| |----| | | | | | Ent | + // |------+----+----+----x----x----| | | |----x----x----+----+----+------| + // |LShift| | | | | | | | | | | | | |RShift| + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | | |Cmd |LOWR| |RASE|RAlt| | | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // |QWER| | | | | + // ,----+----+----| |----+----+----. + // | Ba | L | | | | | | + // | ck |Shi |----| |----| |Spc | + // | spc| ft | | | | | | + // `--------------' `--------------' + [LR_BASE] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, + KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______, + QWERTY , CARPALX, _______, _______, + _______, _______, + KC_BSPC, _______, _______, _______, _______, KC_SPC + // clang-format on + ), + + // ,------------------------------------. ,------------------------------------. + // | | NUMBERS_L | | | - | NUMBERS_R | = | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | | | [ | | ] | | | + // |------+ | | | | +------| + // | | QWERTY_L |----| |----| QWERTY_R | | + // |------+ | ( | | ) | +------| + // | | | | | | | | + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | ` | | | | | | | | ' | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // | | | | | | + // ,----+----+----| |----+----+----. + // | | | | | | | | + // | | |----| |----| | | + // | | | | | | | | + // `--------------' `--------------' + // See `users/pvinis/pvinis.h` + [LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + _______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL , + _______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______, + _______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______, + _______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______, + _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + // clang-format off + ), + + // ,------------------------------------. ,------------------------------------. + // | | NUMBERS_L | | | | NUMBERS_R | | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | | | | | | | | + // |------+ | | | | +------| + // | | CARPALX_L |----| |----| CARPALX_R | | + // |------+ | | | | +------| + // | | | | | | | | + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | | | | | | | | | | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // | | | | | | + // ,----+----+----| |----+----+----. + // | | | | | | | | + // | | |----| |----| | | + // | | | | | | | | + // `--------------' `--------------' + // See `users/pvinis/pvinis.h` + [LR_CARPALX] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + _______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______, + _______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______, + _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, + _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + // clang-format on + ), + + // See `users/pvinis/pvinis.h` + [LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + _______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______, + _______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + // clang-format off + ), + + // See `users/pvinis/pvinis.h` + [LR_SYSCTL] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______, + _______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + // clang-format on + ), + + // See `users/pvinis/pvinis.h` + [LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + // clang-format on + ), + + /* MOUSE + * a keymap to control my system. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ^ | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | MsUp | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | |MidClk| + * ,------|------|------| |------+------+------. + * | | | | | |Left |Right | + * | | |------| |------| Click| Click| + * | | | ^ | | | | | + * `--------------------' `--------------------' + */ + [MOUSE] = LAYOUT_ergodox_pretty( + // clang-format off + KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_TRNS + + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO + // clang-format on + ), +}; + +// keyboard initialization +void keyboard_post_init_user_keymap(void) { + ergodox_led_all_on(); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { + ergodox_led_all_set(i); + wait_ms(5); + } + wait_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { + ergodox_led_all_set(i); + wait_ms(10); + } + ergodox_led_all_off(); + + // restore default brightness for future use + ergodox_led_all_set(LED_BRIGHTNESS_HI); +} + +// light up leds based on the layer +uint32_t layer_state_set_user_keymap(uint32_t state) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (biton32(state)) { + case LR_SYSCTL: + ergodox_right_led_3_on(); // blue + break; + case LR_KBCTL: + ergodox_right_led_1_on(); // red + break; + case LR_SYMBOL: + ergodox_right_led_2_on(); // green + break; + default: + break; + } + return state; +} + +// tap dances + +// flash keyboard on 4x tap, with leds +// void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { +// switch (state->count) { +// case 1: +// ergodox_right_led_3_on(); +// break; +// case 2: +// ergodox_right_led_2_on(); +// break; +// case 3: +// ergodox_right_led_1_on(); +// break; +// case 4: +// ergodox_right_led_3_off(); +// wait_ms(50); +// ergodox_right_led_2_off(); +// wait_ms(50); +// ergodox_right_led_1_off(); +// break; +// } +// } + +// void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { +// if (state->count >= 4) { +// reset_keyboard(); +// reset_tap_dance(state); +// } +// } + +// void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { +// ergodox_right_led_1_off(); +// wait_ms(50); +// ergodox_right_led_2_off(); +// wait_ms(50); +// ergodox_right_led_3_off(); +// } + +// SYSCTL on first tap, MOUSE ON second tap +// void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) { +// uint8_t layer = biton32(layer_state); + +// switch(state->count) { +// case 1: +// switch(layer) { +// case LR_SYSCTL: +// layer_off(LR_SYSCTL); +// break; +// case MOUSE: +// layer_off(MOUSE); +// break; +// default: +// layer_on(LR_SYSCTL); +// break; +// } +// break; +// case 2: +// layer_on(MOUSE); +// break; +// } +// } + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), +// [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ), +// }; diff --git a/keyboards/ergodox_ez/keymaps/pvinis/readme.md b/keyboards/ergodox_ez/keymaps/pvinis/readme.md new file mode 100644 index 000000000000..af272105415f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/pvinis/readme.md @@ -0,0 +1,65 @@ +pvinis' keymap +============== + +This is a getting-used-to keymap for the [ErgoDox EZ][ez]. It's very much a work in progress. + +[ez]: https://ergodox-ez.com/ + +## Table of Contents + +* [Todo](#todo) +* [Layouts](#layouts) + - [Base layer](#base-layer) + - [Beginner layer](#beginner-layer) + - [QWERTY layer](#qwerty-layer) + - [CARPALX layer](#carpalx-layer) + - [System Control layer](#system-control-layer) + - [Template layers](#template-layers) +* [Building](#building) + +# Todo + +- [ ] Generate images from keymap +- [ ] Implement algernon's heatmap +- [ ] Implement `KC_POP` + +# Layouts + +## Base layer + +This is the base layer that contains the common buttons of all keymaps. Right now, it has the top left button as a `flash` button when it's tapped 4 times, and the two thumb islands. The islands contain the `space` and `enter` keys on the right, the `backspace` and `shift` on the left, and all the 1x1 keys are just layer switches. +Every time I connect the keyboard, I press the `BEGIN` layer switch, and then start typing. +Recently, I added a few application "shortcuts", that basically call `ctrl`+`alt`+`cmd`+``, and `` is `S` for Slack, `X` for Xcode, `M` for Messenger. Using [Hammerspoon][hammerspoon], I show/hide the application. + +[hammerspoon]: http://www.hammerspoon.org/ + +## Beginner layer + +This is a basic keymap I use right now until I'm comfortable typing on the Ergodox. Currently uses a QWERTY layout, and the `([{}])` on the middle keys. Not a perfect layout, and its going to go away at some point, but for now thats my daily driver. + +## QWERTY layer + +This is basically the same as the `BEGIN` layer, but it might go away. I'm not using it, but I should have a QWERTY layout on the keyboard, in case someone else wants to try it out, or if I completely forget how keyboards work! At some point, this and the `BEGIN` layer will become one. + +## CARPALX layer + +This is here as a placeholder. I want to transition to [Carpalx QGMLWY][carpalx] or [White][white] at some point. They both look very interesting and more comfortable to type on, but after I'm confident with typing on the Ergodox. + +[carpalx]: http://mkweb.bcgsc.ca/carpalx/?full_optimization +[white]: https://github.com/mw8/white_keyboard_layout + +## System Control layer + +This one is a layer that, in time, will have controls like mouse movement, volume up/down, mute, sleep, restart, shutdown, etc. + +## Template layers + +I have two commented out layers that are just templates, so I can easily create a new layer. + +# Building + +``` +$ git clone https://github.com/qmk/qmk_firmware.git +$ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis +$ make +``` diff --git a/keyboards/ergodox_ez/keymaps/pvinis/rules.mk b/keyboards/ergodox_ez/keymaps/pvinis/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/pvinis/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/rishka/config.h b/keyboards/ergodox_ez/keymaps/rishka/config.h new file mode 100644 index 000000000000..c8f8180bcc15 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/config.h @@ -0,0 +1,17 @@ +#pragma once + +#define PERMISSIVE_HOLD + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX + +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 + +#define MK_C_OFFSET_1 20 +#define MK_C_OFFSET_2 30 + +#undef MK_MOMENTARY_ACCEL diff --git a/keyboards/ergodox_ez/keymaps/rishka/keymap.c b/keyboards/ergodox_ez/keymaps/rishka/keymap.c new file mode 100644 index 000000000000..102803e512de --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/keymap.c @@ -0,0 +1,210 @@ + +#include QMK_KEYBOARD_H +#include "version.h" +#include "rishka.h" +enum layers { + BASE, // default layer + WIN, // Switch keys that are needed in windows + SYMB, // symbols + MDIA, // media keys + GAME, // Gamepad setup + FIRMWARE // Layer to trigger reset/refresh +}; +enum custom_keycodes { + VRSN = SAFE_RANGE, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = LAYOUT_ergodox_pretty_wrapper( + KC_EQL, ________________NUMBERS_L__________________, TG(WIN), OSX_LOCK, ________________NUMBERS_R__________________, KC_MINS, + KC_DELT, _________________QWERTY_L1_________________, TG(SYMB), TG(SYMB), _________________QWERTY_R1_________________, KC_BSLS, + KC_BSPC, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, LT(MDIA, KC_QUOT), + OS_LSFT, _________________QWERTY_L3_________________, ALL_T(KC_NO), TG(MDIA), _________________QWERTY_R3_________________, OS_RSFT, + LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, OSL(SYMB), + ALT_T(KC_APP), TG(GAME), KC_LALT, CTL_T(KC_ESC), + LT(FIRMWARE, KC_HOME), KC_PGUP, + KC_SPC, GUI_T(KC_BSPC), ALT_T(KC_END), GUI_T(KC_PGDN), CTL_T(KC_TAB), ALT_T(KC_ENT) +), + +[WIN] = LAYOUT_ergodox_pretty_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F1, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _________________QWERTY_L2_________________, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, + _______, KC_ESC, _______, _______, + _______, _______, + _______, KC_BSPC, KC_LALT, KC_PGDN, CTL_T(KC_TAB), _______ +), + +[SYMB] = LAYOUT_ergodox_pretty_wrapper( +VRSN, ______________________F_L__________________, KC_F11, KC_F12 , ______________________F_R__________________, KC_NLCK, +_______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______, +_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, +_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, +_______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PSLS, _______, + RGB_MOD, RGB_VAI, RGB_HUI, RGB_SLD, + RGB_VAD, RGB_HUD, + _______, _______, _______, RGB_TOG, _______, _______ +), + +[MDIA] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, KC_WH_U, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, KC_BTN5, + KC_BTN4, + KC_BTN1, KC_BTN2, KC_BTN3, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_WH_U, _______, _______, _______, + _______, KC_WH_L, KC_WH_D, KC_WH_R, _______, KC_MPLY, + _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, + KC_ACL2, KC_ACL1, KC_ACL0 +), + +[GAME] = LAYOUT_ergodox( + // left hand + KC_ESCAPE, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_F1, KC_Y, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_LSHIFT, KC_A, KC_S, KC_D, KC_F, + KC_LCTRL, KC_B, KC_Z, KC_X, KC_C, KC_V, KC_G, + LT(BASE, KC_L), KC_J, KC_I, KC_O, KC_M, + KC_ESCAPE, _______, + KC_ENTER, + KC_SPACE, KC_LCTRL, KC_LALT, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), + MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN, KC_TAB, KC_ENT +), + +[FIRMWARE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + RESET, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, EEP_RST +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case VRSN: + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + #ifdef RGBLIGHT_ENABLE + case RGB_SLD: + rgblight_mode(1); + return false; + #endif + } + } + return true; +} + +// Runs just one time when the keyboard initializes. +void keyboard_post_init_user(void) { +#ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); +#endif +}; + +// Runs whenever there is a layer state change. +uint32_t layer_state_set_user(layer_state_t state) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + uint8_t layer = get_highest_layer(state); + switch (layer) { + case 0: + #ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); + #else + #ifdef RGBLIGHT_ENABLE + rgblight_init(); + #endif + #endif + break; + case 1: + ergodox_right_led_1_on(); + #ifdef RGBLIGHT_COLOR_LAYER_1 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); + #endif + break; + case 2: + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_2 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); + #endif + break; + case 3: + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_3 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); + #endif + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_4 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); + #endif + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_5 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); + #endif + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_6 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); + #endif + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_7 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); + #endif + break; + default: + break; + } + + return state; +}; diff --git a/keyboards/ergodox_ez/keymaps/rishka/rules.mk b/keyboards/ergodox_ez/keymaps/rishka/rules.mk new file mode 100644 index 000000000000..c867f89718f2 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/rules.mk @@ -0,0 +1,2 @@ +# TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/rmw/config.h b/keyboards/ergodox_ez/keymaps/rmw/config.h new file mode 100644 index 000000000000..1ecf8b8b7916 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/config.h @@ -0,0 +1,54 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Edited like hell 2017+ by Reed Williams + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#define MACOSX + +#define USB_MAX_POWER_CONSUMPTION 500 + +#define QMK_KEYS_PER_SCAN 4 +/* Set 0 if debouncing isn't needed */ +#undef DEBOUNCE +#define DEBOUNCE 5 + + +#define ONESHOT_TIMEOUT 900 // how long before oneshot times out +//#define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 20 +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 6 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 254 +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 10 +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 254 + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_SCAN_RATE diff --git a/keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c b/keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c new file mode 100644 index 000000000000..7a78ce98e790 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c @@ -0,0 +1,188 @@ +#include "rmw.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [QWERTY] = LAYOUT_ergodox( + TD(FRBK2), KC_1, KC_2, KC_3, KC_4, KC_5, KC_F4, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TO(EDIT), + OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_D, LT(FSYM,KC_F), KC_G, + LCTL(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, SFT_T(KC_B), KC_TAB, + TD(CTLALL), OSL(ADJUST), TD(GUCTL), TD(SGCA), TD(AGC), + OS_CMD, OS_CTL , + KC_ESCAPE, + KC_BSPACE, TD(SHENT), OSL(EDIT), + + KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TO(NUMPAD), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, LT(JSYM,KC_J), KC_K, KC_L, LT(EDIT,KC_SCLN), KC_QUOTE, + CTL_T(KC_B), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), LCTL(KC_RIGHT), + TD(GCA), TD(CTLALL), KC_LBRC, KC_RBRC, KC_MS_BTN1, + OS_CALT, KC_TAB, + KC_DEL, + KC_CAPS, SFTENT, KC_SPC), + + + [MINIMAK4] = LAYOUT_ergodox( + TD(FRBK2), KC_1, KC_2, KC_3, KC_4, KC_5, KC_F4, + KC_TAB, KC_Q, KC_W, KC_D, KC_R, KC_K, TO(EDIT), + OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_T, LT(FSYM,KC_F), KC_G, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, SFT_T(KC_B), KC_TAB, + TD(CTLALL), OSL(ADJUST), TD(GUCTL), TD(SGCA), TD(AGC), + OS_CMD, OS_CTL , + KC_ESCAPE, + KC_BSPACE, TD(SHENT), OSL(EDIT), + KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TO(NUMPAD), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, LT(JSYM,KC_J), KC_E, KC_L, LT(EDIT,KC_SCLN), KC_QUOTE, + CTL_T(KC_B), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), KC_MS_BTN1, + TD(GCA), TD(CTLALL), LGUI(KC_GRV), KC_RBRC, KC_MS_BTN1, + OS_ALT, KC_TAB, + KC_DEL, + KC_CAPS, SFT_T(KC_ENT), KC_SPC), + + [NUMPAD] = LAYOUT_ergodox(VRSN, KC_F11, KC_F12, KC_F1, KC_F2, KC_F3, _______, + _______, _______, KC_PGUP, KC_UP, KC_PGDOWN, _______, TO(QWERTY), + _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, + _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_Y), _______, + _______, _______, _______, _______, _______, + _______, _______, KC_PSCREEN, _______, _______, TO(QWERTY), + + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + TO(EDIT), _______, KC_7, KC_8, KC_9, KC_KP_MINUS, _______, + _______, KC_4, KC_5, KC_6, KC_KP_PLUS, _______, + _______, KC_COMM, KC_1, KC_2, KC_3, KC_KP_SLASH, _______, + KC_0, KC_DOT, KC_EQUAL, KC_KP_ASTERISK, _______, + _______, _______, KC_INSERT, TO(EDIT), _______, _______), + + [EDIT] = LAYOUT_ergodox(_______, _______, KC_MS_WH_UP, KC_MS_BTN1, KC_MS_BTN2, _______, _______, + _______, LGUI(LALT(KC_ESCAPE)), KC_MS_WH_DOWN, LALT(S(KC_LEFT)), LALT(S(KC_RIGHT)), _______, TO(NUMPAD), + _______, _______, LGUI(KC_GRV), LALT(KC_LEFT), LALT(KC_RIGHT), _______, + LCTL(KC_RIGHT), LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_Y), _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TO(NUMPAD), + _______, _______, _______, S(KC_UP), _______, _______, KC_DELETE, + TO(QWERTY), LGUI(KC_T), KC_PGUP, KC_UP, KC_PGDOWN, KC_PSCREEN, _______, + LGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LGUI(KC_RIGHT), _______, + _______, S(LGUI(KC_LEFT)), S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), S(LGUI(KC_RIGHT)), LCTL(KC_LEFT), + _______, _______, FORM_GET, FORM_PUT, _______, + _______, _______, _______, S(KC_F10), _______, _______), + + [FSYM] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_TILD, KC_EXLM, _______, _______, + LCTL(KC_RIGHT), _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, DEL_WRD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, KC_CIRC, KC_AMPR , KC_ASTR, KC_GRV , _______, _______, + KC_EQUAL, KC_MINUS, KC_UNDS, KC_BSLS, KC_COLON, KC_DQT , + _______, _______, KC_PLUS , KC_SLSH, KC_PIPE, _______ , _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + + [JSYM] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, KC_GRV, KC_AT , KC_LCBR, KC_RCBR, _______, _______, + _______, KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_LEFT, + _______, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_QUES, KC_SLSH, KC_COLON, _______, + _______, _______, _______, _______, _______, _______, LCTL(KC_LEFT), + _______, _______, _______, _______, _______, + _______, _______, _______, _______, LGUI(KC_DOWN), _______), + + [MEDIA] = LAYOUT_ergodox(_______, _______, KC_MS_BTN4, _______, KC_MS_BTN5, _______, _______, + _______, KC_MS_WH_UP, KC_MS_WH_LEFT, KC_MS_UP, KC_MS_WH_RIGHT, _______, _______, + _______, KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, + _______, _______, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, + _______, _______, _______, _______, KC_MS_BTN3, + _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, _______, _______, + KC_MEDIA_REWIND, KC_MEDIA_FAST_FORWARD, _______, _______, _______, + _______, _______, _______, _______, KC_MS_BTN1, KC_MEDIA_PLAY_PAUSE), + + [ADJUST] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, TO(EDIT), TO(NUMPAD), TO(FSYM), TO(JSYM), TO(MEDIA), + _______, _______, _______, _______, _______, _______, _______, + _______, TO(QWERTY), DF(MINIMAK4), DF(QWERTY), _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + case FORM_GET: + if (record->event.pressed) { + tap_code(KC_BTN1); + tap_code16(G(KC_A)); + tap_code16(G(KC_C)); + } + return false; + case FORM_PUT: + if (record->event.pressed) { + tap_code(KC_BTN1); + tap_code16(G(KC_A)); + tap_code16(G(KC_V)); + } + return false; + } + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case QWERTY: + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case NUMPAD: + ergodox_right_led_1_on(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case EDIT: + ergodox_right_led_1_off(); + ergodox_right_led_2_on(); + ergodox_right_led_3_off(); + break; + case FSYM: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_off(); + break; + case JSYM: + ergodox_right_led_1_on(); + ergodox_right_led_2_off(); + ergodox_right_led_3_on(); + break; + case MEDIA: + ergodox_right_led_1_off(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case ADJUST: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + } + return state; +} diff --git a/keyboards/ergodox_ez/keymaps/rmw/keymap-win.c b/keyboards/ergodox_ez/keymaps/rmw/keymap-win.c new file mode 100644 index 000000000000..9f7435c0d7ed --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/keymap-win.c @@ -0,0 +1,159 @@ +#include "rmw.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [QWERTY] = LAYOUT_ergodox( // LEFT HAND + TD(FRBK), KC_1, KC_2, KC_3, KC_4, KC_5, KC_F4, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TO(EDIT), + OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_D, LT(FSYM,KC_F), KC_G, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, SFT_T(KC_B), KC_TAB, + TD(CTLAND), OSL(ADJUST), TD(SCAG), TD(TDGUI), TD(ACG), + OS_ALT, OS_CTL , + KC_ESCAPE, + KC_BSPACE, TD(SHENT), OSL(EDIT), + + // RIGHT HAND + KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TO(NUMPAD), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, LT(JSYM,KC_J), KC_K, KC_L, LT(EDIT,KC_SCLN), KC_QUOTE, + CTL_T(KC_B), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), TD(SHENT), + TD(CAG), TD(TDGUI), KC_LBRC, KC_RBRC, KC_MS_BTN1, + OS_ALT, KC_TAB, + KC_DEL, + KC_CAPS, SFT_T(KC_ENT), KC_SPC), + + + [NUMPAD] = LAYOUT_ergodox(VRSN, KC_F11, KC_F12, KC_F1, KC_F2, KC_F3, _______, + _______, _______, KC_PGUP, KC_UP, KC_PGDOWN, _______, TO(0), + _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Y), _______, + _______, _______, _______, _______, _______, + _______, _______, KC_PSCREEN, _______, _______, TO(0), + + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + TO(EDIT), _______, KC_7, KC_8, KC_9, KC_KP_MINUS, _______, + _______, KC_4, KC_5, KC_6, KC_KP_PLUS, _______, + _______, KC_COMM, KC_1, KC_2, KC_3, KC_KP_SLASH, _______, + KC_0, KC_DOT, KC_EQUAL, KC_KP_ASTERISK, _______, + _______, _______, KC_INSERT, TO(EDIT), _______, _______), + + [EDIT] = LAYOUT_ergodox(KC_ESCAPE, LALT(LCTL(KC_DELETE)), KC_MS_WH_UP, KC_MS_BTN1, KC_MS_BTN2, _______, _______, + _______, LCTL(S(KC_ESCAPE)), KC_MS_WH_DOWN, LCTL(S(KC_LEFT)), LCTL(S(KC_RIGHT)), _______, TO(NUMPAD), + _______, _______, KC_LEFT, LCTL(KC_LEFT), LCTL(KC_RIGHT), _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Y), _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TO(NUMPAD), + _______, _______, _______, S(KC_UP), _______, _______, KC_DELETE, + TO(0), LCTL(KC_T), KC_PGUP, KC_UP, KC_PGDOWN, KC_PSCREEN, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, _______, + _______, S(KC_HOME), S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), S(KC_END), _______, + _______, _______, _______, _______, _______, + _______, _______, _______, S(KC_F10), _______, _______), + + [FSYM] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_TILD, KC_EXLM, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, KC_CIRC, KC_AMPR , KC_ASTR, KC_GRV , _______, _______, + KC_EQUAL, KC_MINUS, KC_UNDS, KC_BSLS, KC_COLON, KC_DQT , + _______, _______, KC_PLUS , KC_SLSH, KC_PIPE, _______ , _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + + [JSYM] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, KC_GRV, KC_AT , KC_LCBR, KC_RCBR, _______, _______, + _______, KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_LEFT, + _______, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_QUES, KC_SLSH, KC_COLON, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + + [MEDIA] = LAYOUT_ergodox(_______, _______, KC_MS_BTN4, _______, KC_MS_BTN5, _______, _______, + _______, KC_MS_WH_UP, KC_MS_WH_LEFT, KC_MS_UP, KC_MS_WH_RIGHT, _______, _______, + _______, KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, + _______, _______, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, + _______, _______, _______, _______, KC_MS_BTN3, + _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, _______, _______, + KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, _______, _______, _______, + _______, _______, _______, _______, KC_MS_BTN1, KC_MEDIA_PLAY_PAUSE), + + [ADJUST] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, TO(EDIT), TO(NUMPAD), TO(FSYM), TO(JSYM), TO(MEDIA), + _______, _______, _______, _______, _______, _______, _______, + _______, TO(QWERTY), _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + } + return true; +} + + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case QWERTY: + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case NUMPAD: + ergodox_right_led_1_on(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case EDIT: + ergodox_right_led_1_off(); + ergodox_right_led_2_on(); + ergodox_right_led_3_off(); + break; + case FSYM: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_off(); + break; + case JSYM: + ergodox_right_led_1_on(); + ergodox_right_led_2_off(); + ergodox_right_led_3_on(); + break; + case MEDIA: + ergodox_right_led_1_off(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case ADJUST: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + } + return state; +} diff --git a/keyboards/ergodox_ez/keymaps/rmw/keymap.c b/keyboards/ergodox_ez/keymaps/rmw/keymap.c new file mode 100644 index 000000000000..b0b9bf13cdd8 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/keymap.c @@ -0,0 +1,13 @@ +#include "ergodox_ez.h" +#include "version.h" + +#define LONGPRESS_DELAY 180 +#define LAYER_TOGGLE_DELAY 350 + +#ifdef MACOSX +#include "keymap-mac.c" +#endif + +#ifdef WINDOWS +#include "keymap-win.c" +#endif diff --git a/keyboards/ergodox_ez/keymaps/rmw/readme.md b/keyboards/ergodox_ez/keymaps/rmw/readme.md new file mode 100644 index 000000000000..36e0d1de00d6 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/readme.md @@ -0,0 +1,11 @@ +# RMW Ergodox_EZ Layout + +This is the keymap I use on the Ergodox_EZ I use for work. I write reports and code in a variety of languages on this board and the various layers provide plenty of flexibility for navigating, editing text, and writing code and prose. + +I switched to a Mac in the past year, so my keymap now mostly gets used in the Mac mode; simply edit the keymap.c file to uncomment \#include keymap-win.c and comment out \#include keymap-mac.c to change back to the Windows version, but I haven't been updating that map as I've made changes moving forward on the Mac version. + +## The theory of this keymap + +The base layer is either QWERTY or MINIMAK4, as desired. Overlaid on that base layer are various layers triggered by one-shots, TOs, and LTs. Tapdances are used to cram lots of mods into few keys and provide freedom to hit combinations with either hand. Mods and layer things are one-shot (where reasonable) because I prefer that. + +An EDIT layer provides text navigation, selection, and editing capabilities in home position. The EXCEL layer offers a numpad and various spreadsheet-useful navigations and operations. Holding S will put the numpad under your right hand in home position. Keys F and J offer various useful symbols (mostly) on the opposite hand when held, including \[\]\(\)\{\} under the left pointer and middle fingers on bottom, middle, and top rows respectively. The MEDIA layer provides media controls (obvs) and some mouse movement and nav, in case I don't feel like reaching for the trackball/trackpad/mouse. diff --git a/keyboards/ergodox_ez/keymaps/rmw/rules.mk b/keyboards/ergodox_ez/keymaps/rmw/rules.mk new file mode 100644 index 000000000000..31e0fcf29339 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE=yes diff --git a/keyboards/ergodox_ez/keymaps/saha/keymap.c b/keyboards/ergodox_ez/keymaps/saha/keymap.c new file mode 100644 index 000000000000..83aaf13e33f0 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/saha/keymap.c @@ -0,0 +1,254 @@ +#include QMK_KEYBOARD_H + +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // Base layer - QWERTY +#define SPEC 1 // Special keys favoring programming in c-like languages +#define NUM 2 // Numeric layer with number row functional keys + +#define ___ KC_TRNS +#define BSLASH LSFT(KC_SLSH) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT_ergodox( + + // Left side + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_VOLU, /**/ KC_1, /**/ KC_2, /**/ KC_3, /**/ KC_4, /**/ KC_5, /**/ KC_F11, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_VOLD, /**/ KC_Q, /**/ KC_W, /**/ KC_E, /**/ KC_R, /**/ KC_T, /**/ KC_ESC, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_MPLY, /**/ KC_A, /**/ KC_S, /**/ KC_D, /**/ KC_F, /**/ KC_G, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_MUTE, /**/ KC_Z, /**/ KC_X, /**/ KC_C, /**/ KC_V, /**/ KC_B, /**/ KC_BSPC, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ ___, /**/ ___, /**/ KC_RALT, /**/ KC_LCTRL, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + + + /*==============================*/ + /**/ /**/ /**/ + /**/ ___, /**/ KC_DEL, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ KC_LALT, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ KC_SPACE, /**/ KC_LGUI, /**/ KC_LCTRL, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + // Right side + // + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_F12, /**/ KC_1, /**/ KC_2, /**/ KC_3, /**/ KC_4, /**/ KC_5, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_Y, /**/ KC_U, /**/ KC_I, /**/ KC_O, /**/ KC_P, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_H, /**/ KC_J, /**/ KC_K, /**/ KC_L, /**/ KC_SCLN, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_ENT, /**/ KC_N, /**/ KC_M, /**/ KC_COMM, /**/ KC_DOT, /**/ KC_SLSH, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ MO(NUM), /**/ ___, /**/ ___, /**/ ___, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + + /*==============================*/ + /**/ /**/ /**/ + /**/ ___, /**/ ___, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ ___, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_RSFT, /**/ MO(SPEC) /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + + [SPEC] = LAYOUT_ergodox( + + // Left side + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_EXLM, /**/ KC_AT, /**/ KC_HASH, /**/ KC_DLR, /**/ KC_PERC, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_GRV, /**/ KC_QUOT, /**/ KC_LCBR, /**/ KC_RCBR, /**/ KC_PLUS, /**/ KC_ESC, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_TAB, /**/ KC_ASTR, /**/ KC_LPRN, /**/ KC_RPRN, /**/ KC_EQUAL, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_HASH, /**/ KC_PERC, /**/ KC_LBRC, /**/ KC_RBRC, /**/ KC_MINUS, /**/ KC_BSPC, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ ___, /**/ ___, /**/ KC_LALT, /**/ KC_LCTRL, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + + + /*==============================*/ + /**/ /**/ /**/ + /**/ ___, /**/ KC_DEL, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ KC_LALT, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ KC_SPACE, /**/ KC_LGUI, /**/ KC_LCTRL, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + // Right side + // + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_CIRC, /**/ KC_AMPR, /**/ KC_ASTR, /**/ KC_LPRN, /**/ KC_RPRN, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_AMPR, /**/ KC_HOME, /**/ KC_UP, /**/ KC_END, /**/ KC_CIRC, /**/ KC_F7, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_EXLM, /**/ KC_LEFT, /**/ KC_DOWN, /**/ KC_RIGHT, /**/ KC_COLN, /**/ KC_F8, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_ENT, /**/ KC_PIPE, /**/ KC_UNDS, /**/ KC_LT, /**/ KC_GT, /**/ KC_BSLS, /**/ KC_F9, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ ___, /**/ ___, /**/ ___, /**/KC_F10,/**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + + /*==============================*/ + /**/ /**/ /**/ + /**/ ___, /**/ ___, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ ___, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_RSFT, /**/ ___ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [NUM] = LAYOUT_ergodox( + + // Left side + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_F1, /**/ KC_F2, /**/ KC_F3, /**/ KC_F4, /**/ KC_F5, /**/ KC_F11, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_EXLM, /**/ KC_AT, /**/ KC_HASH, /**/ KC_DLR, /**/ KC_PERC, /**/ KC_ESC, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_1, /**/ KC_2, /**/ KC_3, /**/ KC_4, /**/ KC_5, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_HASH, /**/ KC_PERC, /**/ KC_LBRC, /**/ KC_RBRC, /**/ KC_MINUS, /**/ KC_BSPC, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ ___, /**/ ___, /**/ KC_LALT, /**/ KC_LCTRL, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + + + /*==============================*/ + /**/ /**/ /**/ + /**/ ___, /**/ KC_DEL, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ KC_LALT, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ KC_SPACE, /**/ KC_LGUI, /**/ KC_LCTRL, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + // Right side + // + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_F12, /**/ KC_F6, /**/ KC_F7, /**/ KC_F8, /**/ KC_F9, /**/ KC_F10, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_CIRC, /**/ KC_AMPR, /**/ KC_ASTR, /**/ KC_LPRN, /**/ KC_RPRN, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_6, /**/ KC_7, /**/ KC_8, /**/ KC_9, /**/ KC_0, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_ENT, /**/ KC_PIPE, /**/ KC_UNDS, /**/ KC_COMM, /**/ KC_DOT, /**/ KC_BSLS, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ ___, /**/ ___, /**/ ___, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + + /*==============================*/ + /**/ /**/ /**/ + /**/ ___, /**/ ___, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ ___, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ ___, /**/ KC_RSFT, /**/ ___ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + +}; diff --git a/keyboards/ergodox_ez/keymaps/skug/config.h b/keyboards/ergodox_ez/keymaps/skug/config.h new file mode 100644 index 000000000000..abf1c635f10d --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/skug/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define FORCE_NKRO + +#undef LSPO_KEY +#undef RSPC_KEY +#define LSPO_KEY KC_8 // Nordic Left SpaceCadet +#define RSPC_KEY KC_9 // Nordic Right SpaceCadet diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c new file mode 100644 index 000000000000..1446ea7466f6 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -0,0 +1,251 @@ +/* Copyright 2018 Andreas Lindhé, Christoffer Holmberg + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + + + + +#include QMK_KEYBOARD_H +#include "version.h" +#include "keymap_swedish.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys +#define ARRW 3 // arrow + soon mouse + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | ! | " | # | # | % | Ins | | L1 | & | / | ( | ) | = | ? | + * | | 1 | 2 @ | 3 £ | 4 $ | 5 | | | | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | Å | + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | L4 | A | S | D | F | G |------| |------| H | J | K | L |Ö / L3| Ä/L2 | + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| Back | |Forwd |------+------+------+------+------+--------| + * | LShift/| Z | X | C | V | B | | | | N | M | ; | : | _ | RShift/| + * | ( | | | | | | | | | | | , | . | - | ) | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | '/ | ` |Alt | Left | Right| | Spc | Bksp | AltGr| * | ~/ | + * | Ctrl | ' | | | | | | | | | Ctrl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | <>| | End | | Home | ^ | + * ,------|------|------| |------+--------+------. + * | Left | Right| PgDn | | PgUp | Up | Down | + * |------|------|------| |------|--------|------| + * | Ctrl/| Alt/ | | | | Alt/ | Ctrl/| + * | Enter| Esc | Lgui | | Lgui | Esc | Enter| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_ +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox_80( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_WBAK, + CTL_T(SE_QUOT), SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, + SE_LABK, KC_END, + KC_LEFT, KC_RIGHT, KC_PGDN, + CTL_T(KC_ENT), ALT_T(KC_ESC), KC_LGUI, + + // right hand + TO(ARRW), KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_ODIA), LT(SYMB, SE_ADIA), + KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSPC, + KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, CTL_T(SE_TILD), + KC_HOME, SE_CIRC, + KC_PGUP, KC_UP, KC_DOWN, + KC_LGUI, ALT_T(KC_ESC), CTL_T(KC_ENT) +), +/* Keymap: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | - | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | < | > | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |------|------|------| |------|------|------| + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox_80( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______,KC_EXLM,SE_AT, SE_LCBR,SE_RCBR,SE_PIPE,_______, + _______,KC_HASH,SE_DLR, SE_LPRN,SE_RPRN,SE_GRV, + _______,KC_PERC,SE_CIRC,SE_LBRC,SE_RBRC,SE_TILD,_______, + EPRM, _______, _______, SE_LABK , SE_RABK, + _______,_______, + _______,_______,_______, + _______,_______,_______, + // right hand + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_UP, KC_7, KC_8, KC_9, SE_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, SE_PLUS, _______, + _______, SE_AMPR, KC_1, KC_2, KC_3, SE_MINS, _______, + _______,KC_DOT, KC_0, SE_EQL, _______, + _______, _______, + _______, _______, _______, + _______, _______, _______ +), + +/* Keymap: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | MsUp | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |MsLeft|MsDown|MsRght| | |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | |------|------| |------|------|------| + * | | | | | | |BrBck | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox_80( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MS_U, _______, _______, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, _______, _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, _______, _______, + _______, _______, KC_WBAK +), + // Keymap: Ducky Style arrows +[ARRW] = LAYOUT_ergodox_80( + SE_HALF, _______, _______, _______, _______, _______, _______, + _______, _______, KC_UP , _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_DEL, _______, + _______, _______, + _______, _______, _______, + _______, _______, _______, + // right hand + TO(BASE), _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, _______, _______, + _______, _______, _______ +), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // Binary: lsb at bottom + case 1: + ergodox_right_led_3_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_board_led_on(); + default: + // none + break; + } +}; diff --git a/keyboards/ergodox_ez/keymaps/skug/readme.md b/keyboards/ergodox_ez/keymaps/skug/readme.md new file mode 100644 index 000000000000..5c155619c051 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/skug/readme.md @@ -0,0 +1,4 @@ +# Nordic Qwerty layout for ErgoDox EZ, based on Andreas Lindhe's version + +*NOTE:* it might still be desirable to set the software layout to sv_SE in your +OS. diff --git a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c new file mode 100644 index 000000000000..42ac13775f57 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c @@ -0,0 +1,204 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define MDIA 1 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +bool capsOn = false; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | Bksp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | { | | } | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |HyperCaps| A | S | D | F | G |------| |------| H | J | K | L |; / L1| Enter | + * |--------+------+------+------+------+------| Alt | | L1 |------+------+------+------+------+--------| + * | LShift | Z/L1 | X | C | V | B | | | | N | M | , | . | ? | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |lCrtr | [ | ] | ` | ' | | Left | Up | Down | Right| PlayWin | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |PRTSRN| Win | | Home | End | + * ,------|------|------| |------+--------+------. + * | | | Ins | | PgUp | | | + * | Space|Backsp|------| |------| Enter |Space | + * | |ace | Del | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCBR, + ALL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, LT(MDIA,KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LALT, + KC_LCTRL, KC_LBRC, KC_RBRC, KC_GRV, KC_QUOT, + KC_PSCR, KC_LGUI, + KC_INS, + KC_SPC,KC_BSPC,KC_DEL, + // right hand + KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, + KC_RCBR, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_ENT, + TG(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LEFT, KC_UP,KC_DOWN,KC_RGHT, GUI_T(KC_MPLY), + KC_HOME, KC_END, + KC_PGUP, + KC_PGDN,KC_ENT, KC_SPC + ), +/* Keymap 1: Media and mouse keys + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * |BootLoad | | Lclk | MsUp | Rclk | | | | | | | Up | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsAcl0|MsAcl1|MsAcl2| | | | | | | Mute | Mute | | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | Prev |VolUp |VolDn | Next | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// Functions +[MDIA] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + RESET,_______,KC_BTN1,KC_MS_U,KC_BTN2,_______,_______, + _______,_______,KC_MS_L,KC_MS_D,KC_MS_R,_______, + _______,_______,KC_ACL0,KC_ACL1,KC_ACL2,_______,_______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,_______, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______, + _______,_______,_______, KC_UP ,_______,_______,_______, + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______, + _______,_______,_______,KC_MUTE,KC_MUTE,_______,_______, + KC_MPRV,KC_VOLU,KC_VOLD,KC_MNXT,_______, + _______, _______, + _______, + _______, _______, _______ +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +#ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); +#endif +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + if(layer == 1) + { + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + + ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + ergodox_right_led_3_set (LED_BRIGHTNESS_HI); + } + + if(capsOn) + { + ergodox_right_led_1_set (LED_BRIGHTNESS_HI); + ergodox_right_led_1_on (); + } + + if(keyboard_report->mods & MOD_BIT(KC_LSFT)) + { + ergodox_right_led_1_set (LED_BRIGHTNESS_HI); + ergodox_right_led_1_on (); + } else { + ergodox_right_led_1_set (LED_BRIGHTNESS_LO); + + if(!capsOn) + { + ergodox_right_led_1_off (); + } + } + + if(keyboard_report->mods & MOD_BIT(KC_LALT)) + { + ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + ergodox_right_led_2_on (); + } else { + ergodox_right_led_2_set (LED_BRIGHTNESS_LO); + if(layer != 1) + { + ergodox_right_led_2_off (); + } + } + + if(keyboard_report->mods & MOD_BIT(KC_LCTRL)) + { + ergodox_right_led_3_set (LED_BRIGHTNESS_HI); + ergodox_right_led_3_on (); + } else { + ergodox_right_led_3_set (LED_BRIGHTNESS_LO); + if(layer != 1) + { + ergodox_right_led_3_off (); + } + } +}; + +void led_set_user(uint8_t usb_led){ + if (usb_led & (1 << USB_LED_CAPS_LOCK)) + { + capsOn = true; + }else { + capsOn = false; + } +} diff --git a/keyboards/ergodox_ez/keymaps/stamm/config.h b/keyboards/ergodox_ez/keymaps/stamm/config.h new file mode 100644 index 000000000000..e1db3d9002e2 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/config.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Rustam Zagirov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#pragma once + +#define ORYX_CONFIGURATOR +#define LEADER_TIMEOUT 500 +#define LEADER_PER_KEY_TIMING + +#define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY +#define PERMISSIVE_HOLD +/* #define PERMISSIVE_HOLD_PER_KEY */ + +#define IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY + +#define TAPPING_FORCE_HOLD +#define TAPPING_FORCE_HOLD_PER_KEY + +/* #define RETRO_TAPPING */ +#undef LED_BRIGHTNESS_DEFAULT +#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_LO) diff --git a/keyboards/ergodox_ez/keymaps/stamm/keymap.c b/keyboards/ergodox_ez/keymaps/stamm/keymap.c new file mode 100644 index 000000000000..19eecae03d03 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/keymap.c @@ -0,0 +1,286 @@ +/* Copyright 2020 Rustam Zagirov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "version.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ES_LABK_MAC KC_GRAVE +#define ES_RABK_MAC LSFT(KC_GRAVE) +#define ES_BSLS_MAC ALGR(KC_6) +#define NO_PIPE_ALT KC_GRAVE +#define NO_BSLS_ALT KC_EQUAL +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) + +#define E_NUMBERS LT(_1_NUMBERS, KC_E) +#define R_MOUSE LT(_2_MOUSE, KC_R) + +#define ARROWS MO(_3_ARROW) + +enum custom_keycodes { + RGB_SLD = EZ_SAFE_RANGE, + ALT_TAB, +}; + +bool is_alt_tab_active = false; // ADD this near the begining of keymap.c +uint16_t alt_tab_timer = 0; // we will be using them soon. + +enum layers { + _0_BASE, + _1_NUMBERS, + _2_MOUSE, + _3_ARROW, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_0_BASE] = LAYOUT_ergodox( + KC_NONUS_BSLASH, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_AUDIO_MUTE, + KC_LEAD, KC_Q, KC_W, E_NUMBERS, R_MOUSE, KC_T, XXXXXXX, + LCTL(KC_B), LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), LGUI_T(KC_F), KC_G, + KC_BSLASH, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, + ALT_TAB, XXXXXXX, XXXXXXX, MO(_1_NUMBERS), ARROWS, + KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, + XXXXXXX, + KC_ENTER, KC_TAB, KC_ESCAPE, + KC_CAPSLOCK, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINUS, + XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, + KC_H, RGUI_T(KC_J), RALT_T(KC_K), RCTL_T(KC_L), RSFT_T(KC_SCOLON), KC_QUOTE, + KC_RBRACKET, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_EQUAL, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, + XXXXXXX, + KC_ESCAPE, KC_BSPACE, KC_SPACE +), +[_1_NUMBERS] = LAYOUT_ergodox( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, _______, KC_1, KC_2, KC_3, KC_BSLASH, _______, + KC_0, KC_KP_DOT, _______, KC_EQUAL, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_2_MOUSE] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + RGB_HUI, RGB_HUD, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______, + RGB_SLD, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, + TOGGLE_LAYER_COLOR, _______, KC_MS_WH_UP, _______, KC_MS_WH_DOWN, _______, _______, + _______, _______, _______, _______, _______, + + RGB_VAD, RGB_VAI, + _______, + _______, _______, _______ +), +[_3_ARROW] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______ +), +}; + + +/* bool suspended = false; */ +void keyboard_post_init_user(void) { + rgblight_disable(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LGUI); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + ergodox_led_all_off(); + /* rgblight_disable(); */ + switch (get_highest_layer(state)) { + case _1_NUMBERS: + ergodox_right_led_1_on(); + /* rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(HSV_BLUE);*/ + break; + case _2_MOUSE: + ergodox_right_led_2_on(); + break; + case _3_ARROW: + ergodox_right_led_3_on(); + break; + /* case 7: */ + /* ergodox_right_led_1_on(); */ + /* ergodox_right_led_2_on(); */ + /* ergodox_right_led_3_on(); */ + /* break; */ + default: + break; + } + return state; + +}; + + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + /* case SFT_T(KC_SPC): */ + /* return TAPPING_TERM + 1250; */ + case E_NUMBERS: + return 200; + case LT(_2_MOUSE, KC_R): + return 200; + /* case LGUI_T(KC_F): */ + /* return 50; */ + default: + return TAPPING_TERM; + } +} +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case E_NUMBERS: + case R_MOUSE: + case LSFT_T(KC_A): + case LCTL_T(KC_S): + case LALT_T(KC_D): + case LGUI_T(KC_F): + case RGUI_T(KC_J): + case RALT_T(KC_K): + case RCTL_T(KC_L): + case RSFT_T(KC_SCOLON): + case ARROWS: + return true; + default: + return false; + } +} + + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(_1_NUMBERS, KC_E): + case R_MOUSE: + case LSFT_T(KC_A): + case LCTL_T(KC_S): + case LALT_T(KC_D): + case LGUI_T(KC_F): + case RGUI_T(KC_J): + case RALT_T(KC_K): + case RCTL_T(KC_L): + case RSFT_T(KC_SCOLON): + case ARROWS: + return false; + default: + return true; + } +} + + + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LGUI); + is_alt_tab_active = false; + } + } + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_F) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + SEQ_ONE_KEY(KC_S) { + SEND_STRING ("sudo -i\n"); + } + SEQ_ONE_KEY(KC_H) { + SEND_STRING ("--help\n"); + } + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(SS_LGUI("ac")); + /* SEND_STRING(SS_LGUI("a") SS_LGUI("c")); */ + } + SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { + SEND_STRING("https://start.duckduckgo.com\n"); + } + SEQ_TWO_KEYS(KC_A, KC_S) { + register_code(KC_LGUI); + register_code(KC_S); + unregister_code(KC_S); + unregister_code(KC_LGUI); + } + } +} diff --git a/keyboards/ergodox_ez/keymaps/stamm/readme.md b/keyboards/ergodox_ez/keymaps/stamm/readme.md new file mode 100644 index 000000000000..9ca886aa922e --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/readme.md @@ -0,0 +1,97 @@ +# Stamm layouts for ergodox_ez + +4 layers: + +* QUERTY +* Numbers +* Mouse +* Arrows + +On home row there are hold dual keys: +- shift, ctrl, alt, cmd — on the fingers on the left hand +- cmd, alt, ctrl, shift — mirrored on the finger on the righ hand + +Top row behaves like shifter numbers row. +Hold E switch to layer with numbers. +Hold R switch to mouse controll layer. + +``` + 0_Base +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ ` │ ! │ @ │ # │ $ │ % │Mute │ │Capsl│ ^ │ & │ * │ ( │ ) │ - │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ Lead │ Q │ W │E|LT1│R|LT2│ T │ │ │ │ Y │ U │ I │ O │ P │ [ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│Ctrl + B│A | ⇧│S | ⌃│D | ⌥│F | ⌘│ G ├─────┤ ├─────┤ H │J | ⌘│K | ⌥│L | ⌃│; | ⇧│ ' │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ] ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ \ │ Z │ X │ C │ V │ B │ │ │ │ N │ M │ , │ . │ / │ = │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │⎇ + T│ │ │ │Arrow│ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │Vol- │Vol+ │ │Play │Next │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │Enter│ Tab ├─────┤ ├─────┤Bspac│ ⎵ │ + │ │ │ Esc │ │ Esc │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 1_Numbers +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ * │ F12 │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤ │ 4 │ 5 │ 6 │ + │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ \ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │Reset│ │ │ │ │ │ 0 │ . │ │ = │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 2_Mouse +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │RgbMo│RgbTo│MsBtn│MsUp │MsBtn│ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤RgbSl│MsLef│MsDow│MsRig│ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │Toggl├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │MsWhU│ │MsWhD│ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │RgbHu│RgbHu│ │RgbVa│RgbVa│ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 3_Arrow +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤ ← │ ↓ │ ↑ │ → │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + +``` + +Copyright © 2020 Rustam Zagirov. Released under [GPL-2.0](/LICENSE). diff --git a/keyboards/ergodox_ez/keymaps/stamm/rules.mk b/keyboards/ergodox_ez/keymaps/stamm/rules.mk new file mode 100644 index 000000000000..619224bef45b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/rules.mk @@ -0,0 +1,8 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LTO_ENABLE = yes +COMMAND_ENABLE = no +LEADER_ENABLE = yes +RGBLIGHT_ENABLE = yes + +TAP_DANCE_ENABLE = no diff --git a/keyboards/ergodox_ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c new file mode 100644 index 000000000000..080d3f6cef0a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -0,0 +1,250 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "keymap_steno.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys +#define TXBOLT 3 // TxBolt Steno Virtual Serial +#define TXBOLT2 4 // TxBolt Steno Virtual Serial Alternative Layout + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | TX | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | BOLT |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(TXBOLT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +/* Keymap 3: TxBolt (Serial) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | BKSPC | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | # | # | # | # | # | | | | # | # | # | # | # | # | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | S | T | P | H | * |------| |------| * | F | P | L | T | D | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | S | K | W | R | * | | | | * | R | B | G | S | Z | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | A | O |------| |------| E | U | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// TxBolt over Serial +[TXBOLT] = LAYOUT_ergodox( + KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, KC_NO, + KC_NO, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, + KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + STN_A, STN_O, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, + STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + KC_NO, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, STN_E, STN_U +), +/* Keymap 4: TxBolt (Serial) Alternative + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | # | # | # | # | # | | | | # | # | # | # | # | # | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | S | T | P | H | * | | | | * | F | P | L | T | D | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | S | K | W | R | * |------| |------| * | R | B | G | S | Z | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | A | O | | E | U | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// TxBolt over Serial +[TXBOLT2] = LAYOUT_ergodox( + KC_NO, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, KC_NO, + KC_NO, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, KC_NO, + KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, STN_A, STN_O, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO, + // right hand + KC_NO, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, + KC_TRNS, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + STN_E, STN_U, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO +), +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox_ez/keymaps/steno/readme.md b/keyboards/ergodox_ez/keymaps/steno/readme.md new file mode 100644 index 000000000000..d67cde2a3cf3 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/steno/readme.md @@ -0,0 +1,92 @@ +# ErgoDox EZ Steno Configuration + +This layout has a layer that uses the TxBolt Stenograph protocol over a Virtual Serial port. It requires something like Plover in order to function. + +In Plover, you can select TX Bolt as the Stenotype Machine, and find the COM port that was assigned. In this way, your regular keyboard will still function normally, and you can switch back and forth between the Steno and Keyboard layers. + +

+/* Keymap 0: Basic layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |   =    |   1  |   2  |   3  |   4  |   5  | LEFT |           | RIGHT|   6  |   7  |   8  |   9  |   0  |   -    |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * | Del    |   Q  |   W  |   E  |   R  |   T  |  L1  |           |  TX  |   Y  |   U  |   I  |   O  |   P  |   \    |
+ * |--------+------+------+------+------+------|      |           | BOLT |------+------+------+------+------+--------|
+ * | BkSp   |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |; / L2|' / Cmd |
+ * |--------+------+------+------+------+------| Hyper|           | Meh  |------+------+------+------+------+--------|
+ * | LShift |Z/Ctrl|   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |//Ctrl| RShift |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |Grv/L1|  '"  |AltShf| Left | Right|                                       |  Up  | Down |   [  |   ]  | ~L1  |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        | App  | LGui |       | Alt  |Ctrl/Esc|
+ *                                 ,------|------|------|       |------+--------+------.
+ *                                 |      |      | Home |       | PgUp |        |      |
+ *                                 | Space|Backsp|------|       |------|  Tab   |Enter |
+ *                                 |      |ace   | End  |       | PgDn |        |      |
+ *                                 `--------------------'       `----------------------'
+ */
+/* Keymap 1: Symbol Layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |Version |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   !  |   @  |   {  |   }  |   |  |      |           |      |   Up |   7  |   8  |   9  |   *  |   F12  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   #  |   $  |   (  |   )  |   `  |------|           |------| Down |   4  |   5  |   6  |   +  |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   %  |   ^  |   [  |   ]  |   ~  |      |           |      |   &  |   1  |   2  |   3  |   \  |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |    . |   0  |   =  |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |      |      |------|       |------|      |      |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+/* Keymap 2: Media keys
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * | RESET  |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |------|           |------|      |      |      |      |      |  Play  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      | Prev | Next |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |VolUp |VolDn | Mute |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |Brwser|
+ *                                 |      |      |------|       |------|      |Back  |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+/* Keymap 3: TxBolt (Serial)
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * | BKSPC  |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   #  |   #  |   #  |   #  |   #  |      |           |      |   #  |   #  |   #  |   #  |   #  |   #    |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   S  |   T  |   P  |   H  |   *  |------|           |------|   *  |   F  |   P  |   L  |   T  |   D    |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   S  |   K  |   W  |   R  |   *  |      |           |      |   *  |   R  |   B  |   G  |   S  |   Z    |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |   A  |   O  |------|       |------|   E  |   U  |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+
diff --git a/keyboards/ergodox_ez/keymaps/steno/rules.mk b/keyboards/ergodox_ez/keymaps/steno/rules.mk new file mode 100644 index 000000000000..4b64fd22de6a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/steno/rules.mk @@ -0,0 +1,3 @@ +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER +# Not enough interupts, so something has to go +MOUSEKEY_ENABLE = no diff --git a/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c b/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c new file mode 100644 index 000000000000..77242596d2c7 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c @@ -0,0 +1,98 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, LGUI(KC_LCTL), + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, LGUI(KC_LALT), + _______, _______, _______, _______, LOWER, + KC_LGUI, _______, + _______, + KC_ENT, RGUI(KC_RCTL), _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + RGUI(KC_RCTL), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_H, KC_J, KC_K, KC_L, KC_RSFT, KC_RGUI, + RGUI(KC_RALT), KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), + RAISE, _______, _______, _______, _______, + _______, KC_RGUI, + _______, + _______, KC_BSPC, KC_ENT + ), + + [_LOWER] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, + KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, + KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, + KC_NO, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, + KC_RGUI, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ), + + [_RAISE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, _______, + KC_NO, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_LGUI, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, KC_NO, + KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_NO, + _______, ADJUST, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ), + + [_ADJUST] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, RESET, _______, + _______, _______, _______, _______, KC_LGUI, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, KC_LANG1, KC_LANG2, + _______, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ) +}; diff --git a/keyboards/ergodox_ez/keymaps/vim/config.h b/keyboards/ergodox_ez/keymaps/vim/config.h new file mode 100644 index 000000000000..12928595010c --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/vim/config.h @@ -0,0 +1,10 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H +#endif + +#define NORMAL_MODE 0 +#define INSERT_MODE 1 +#define SYMB 2 +#define MOUSE 3 + +#include "../../config.h" diff --git a/keyboards/ergodox_ez/keymaps/vim/keymap.c b/keyboards/ergodox_ez/keymaps/vim/keymap.c new file mode 100644 index 000000000000..948f2b4794fa --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/vim/keymap.c @@ -0,0 +1,370 @@ +#include QMK_KEYBOARD_H +#include "quantum_keycodes.h" +#include "action_layer.h" +#include "version.h" +#include "vim.h" + +#define VERSION_STRING QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION +#define X_____X KC_TRNS +#define KC_ATM LGUI(LSFT(KC_P)) +#define KC_ATP LGUI(LCTL(KC_P)) +#define TO_NORM TO(NORMAL_MODE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Normal mode + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | | WORD | END | | | | | | YANK | UNDO | | OPEN | PUT | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ⎋ | | | DEL | | |------| |------| ← | ↓ | ↑ | → | | ⎋ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | SHIFT | | | |VISUAL| BACK | | | | | | | | | SHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |SPACE |DELETE|------| |------|ENTER |BACKSP| + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NORMAL_MODE] = LAYOUT_ergodox( + // Layer 2 Left Hand + X_____X,X_____X,X_____X,X_____X,X_____X,X_____X,X_____X, + KC_TAB ,X_____X,VIM_W, VIM_E ,X_____X,X_____X,X_____X, + X_____X,VIM_A ,VIM_S ,VIM_D ,X_____X,X_____X, + KC_LSFT,X_____X,VIM_X ,VIM_C ,VIM_V ,VIM_B ,X_____X, + KC_LCTL,KC_LALT,X_____X,X_____X,X_____X, + + KC_HOME,KC_END , + TO(SYMB), + GUI_T(KC_SPC), KC_ESC ,_______, + + + // Layer 2 Right Hand + X_____X,X_____X,X_____X,X_____X,X_____X,X_____X,X_____X, + X_____X,VIM_Y ,VIM_U ,VIM_I ,VIM_O ,VIM_P ,X_____X, + VIM_H ,VIM_J ,VIM_K ,VIM_L ,X_____X,X_____X, + X_____X,X_____X,X_____X,X_____X,X_____X,X_____X,KC_LSFT, + X_____X,X_____X,X_____X,KC_RALT,KC_RCTL, + + KC_PGUP, KC_PGDN, + TO(SYMB), + KC_DEL , KC_ENT, GUI_T(KC_BSPC) +), + + /* Insert mode + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | NORMAL | 1 | 2 | 3 | 4 | 5 | ⇧⌘P | | PROJ | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ⇥ | Q | W | E | R | T | ` | | - | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ⎋ | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| = | | + |------+------+------+------+------+--------| + * | L⇧ | Z | X | C | V | B | | | | N | M | , | . | / | R⇧ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ⌃ | ⌥ | ( | [ | { | | } | ] | ) | ⌥ | ⌃ | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | HOME | END | | PGDN | PGUP | + * ,------|------|------| |------+------+------. + * |SPACE | | | | | | BSPC | + * | |NORMAL|------| |------| ENTER| | + * | ⌘ | | | | | | ⌘ | + * `--------------------' `--------------------' + */ + [INSERT_MODE] = LAYOUT_ergodox( + // Left Hand + NOR_MOD,KC_1, KC_2, KC_3, KC_4, KC_5, KC_ATM, + KC_TAB ,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, + KC_ESC ,KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, + KC_LCTL,KC_LALT,KC_LPRN,KC_LBRC, KC_LCBR, + + KC_HOME,KC_END , + TO(SYMB), + GUI_T(KC_SPC),KC_ESC ,TO_NORM, + + + // Right Hand + KC_ATP , KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_MINS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + KC_PLUS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,KC_RSFT, + KC_RCBR,KC_RBRC, KC_RPRN,KC_RALT,KC_RCTL, + + KC_PGUP, KC_PGDN, + TO(SYMB), + MO(MOUSE) , KC_ENT, GUI_T(KC_BSPC) + ), + + [SYMB] = LAYOUT_ergodox( + // Left Hand + NOR_MOD,KC_1, KC_2, KC_3, KC_4, KC_5, KC_ATM, + KC_TAB ,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, + _______,KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, + KC_LCTL,KC_LALT,KC_LPRN,KC_LBRC, KC_LCBR, + + _______,_______, + _______, + _______,_______,TO_NORM, + + // Right Hand + KC_ATP , KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_MINS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + KC_PLUS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,KC_RSFT, + KC_RCBR,KC_RBRC, KC_RPRN,KC_RALT,KC_RCTL, + + _______,_______, + _______, + _______,_______,_______ + ), + + [MOUSE] = LAYOUT_ergodox( + // Left Hand + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, + + _______,_______, + _______, + _______,_______,_______, + + // Right Hand + _______,_______,_______,_______,_______,_______,_______, + _______,_______,KC_BTN1,KC_BTN3,KC_BTN2,_______,_______, + KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,_______,_______, + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, + + _______,_______, + _______, + _______,_______,_______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool SHIFTED = (keyboard_report->mods & MOD_BIT(KC_LSFT)) | + (keyboard_report->mods & MOD_BIT(KC_RSFT)); + + switch (keycode) { + + case VIM_A: + if (record->event.pressed) { SHIFTED ? VIM_APPEND_LINE() : VIM_APPEND(); } + return false; + + case VIM_B: + if (record->event.pressed) { + switch(VIM_QUEUE) { + case KC_NO: VIM_BACK(); break; + case VIM_C: VIM_CHANGE_BACK(); break; + case VIM_D: VIM_DELETE_BACK(); break; + case VIM_V: VIM_VISUAL_BACK(); break; + } + } + return false; + + case VIM_C: + if (record->event.pressed) { + switch(VIM_QUEUE) { + case KC_NO: SHIFTED ? VIM_CHANGE_LINE() : VIM_LEADER(VIM_C); break; + case VIM_C: VIM_CHANGE_WHOLE_LINE(); break; + } + } + return false; + + case VIM_D: + if (record->event.pressed) { + switch(VIM_QUEUE) { + case KC_NO: SHIFTED ? VIM_DELETE_LINE() : VIM_LEADER(VIM_D); break; + case VIM_D: VIM_DELETE_WHOLE_LINE(); break; + } + } + return false; + + case VIM_E: + if (record->event.pressed) { + switch (VIM_QUEUE) { + case KC_NO: VIM_END(); break; + case VIM_C: VIM_CHANGE_END(); break; + case VIM_D: VIM_DELETE_END(); break; + case VIM_V: VIM_VISUAL_END(); break; + } + } + return false; + + case VIM_H: + if (record->event.pressed) { + switch (VIM_QUEUE) { + case KC_NO: VIM_LEFT(); break; + case VIM_C: VIM_CHANGE_LEFT(); break; + case VIM_D: VIM_DELETE_LEFT(); break; + case VIM_V: VIM_VISUAL_LEFT(); break; + } + } + return false; + + case VIM_I: + if (record->event.pressed) { + switch (VIM_QUEUE) { + case KC_NO: layer_on(INSERT_MODE); break; + case VIM_C: VIM_LEADER(VIM_CI); break; + case VIM_D: VIM_LEADER(VIM_DI); break; + case VIM_V: VIM_LEADER(VIM_VI); break; + } + } + return false; + + case VIM_J: + if (record->event.pressed) { + switch (VIM_QUEUE) { + case KC_NO: SHIFTED ? VIM_JOIN() : VIM_DOWN(); break; + case VIM_C: VIM_CHANGE_DOWN(); break; + case VIM_D: VIM_DELETE_DOWN(); break; + case VIM_V: VIM_VISUAL_DOWN(); break; + } + } + return false; + + case VIM_K: + if (record->event.pressed) { + switch (VIM_QUEUE) { + case KC_NO: VIM_UP(); break; + case VIM_C: VIM_CHANGE_UP(); break; + case VIM_D: VIM_DELETE_UP(); break; + case VIM_V: VIM_VISUAL_UP(); break; + } + } + return false; + + case VIM_L: + if (record->event.pressed) { + switch (VIM_QUEUE) { + case KC_NO: VIM_RIGHT(); break; + case VIM_C: VIM_CHANGE_RIGHT(); break; + case VIM_D: VIM_DELETE_RIGHT(); break; + case VIM_V: VIM_VISUAL_RIGHT(); break; + } + } + return false; + + case VIM_O: + if (record->event.pressed) { SHIFTED ? VIM_OPEN_ABOVE() : VIM_OPEN(); } + return false; + + case VIM_P: + if (record->event.pressed) { SHIFTED ? VIM_PUT_BEFORE() : VIM_PUT(); } + return false; + + case VIM_S: + if (record->event.pressed) { SHIFTED ? VIM_CHANGE_WHOLE_LINE() : VIM_SUBSTITUTE(); } + return false; + + case VIM_U: + if (record->event.pressed) { VIM_UNDO(); } + return false; + + case VIM_V: + if (record->event.pressed) { VIM_LEADER(VIM_V); } + return false; + + case VIM_W: + if (record->event.pressed) { + switch (VIM_QUEUE) { + case KC_NO: VIM_WORD(); break; + case VIM_C: VIM_CHANGE_WORD(); break; + case VIM_CI: VIM_CHANGE_INNER_WORD(); break; + case VIM_D: VIM_DELETE_WORD(); break; + case VIM_DI: VIM_DELETE_INNER_WORD(); break; + case VIM_V: VIM_VISUAL_WORD(); break; + case VIM_VI: VIM_VISUAL_INNER_WORD(); break; + } + } + return false; + + case VIM_X: + if (record->event.pressed) { VIM_CUT(); } + return false; + + case VIM_Y: + if (record->event.pressed) { SHIFTED ? VIM_YANK_LINE() : VIM_YANK(); } + return false; + + // dynamically generate these. + case EPRM: + if (record->event.pressed) { eeconfig_init(); } + return false; + case VRSN: + if (record->event.pressed) { SEND_STRING(VERSION_STRING); } + return false; + case RGB_SLD: + if (record->event.pressed) { rgblight_mode(1); } + return false; + } + + // End by clearing the queue unless keycode is a + // if ((record->event.pressed) && + // (keycode != VIM_I || + // keycode != VIM_C || + // keycode != VIM_D || + // keycode != VIM_V)) { + // VIM_LEADER(KC_NO); + // } + + return true; +}; + +void matrix_init_user(void) { + debug_enable = true; + VIM_LEADER(KC_NO); +}; + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + +}; diff --git a/keyboards/ergodox_ez/keymaps/vim/readme.md b/keyboards/ergodox_ez/keymaps/vim/readme.md new file mode 100644 index 000000000000..8f7c6852446e --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/vim/readme.md @@ -0,0 +1,5 @@ +# Vim-like keymap for macOS + +This keymap adds vim emulation to the keyboard firmware. Layer 0 is 'normal mode', providing a number of commands like `w`, `e`, `a`, `dw`, etc. + +The keymap works by using macOS text-editing shortcuts, so currently it only chooches on macOS. diff --git a/keyboards/ergodox_ez/keymaps/vim/rules.mk b/keyboards/ergodox_ez/keymaps/vim/rules.mk new file mode 100644 index 000000000000..6c605daecf53 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/vim/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/vim/vim.h b/keyboards/ergodox_ez/keymaps/vim/vim.h new file mode 100644 index 000000000000..7565c6e3e6a5 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/vim/vim.h @@ -0,0 +1,755 @@ +#include "config.h" +#include "print.h" +#include "keycode.h" +#include "quantum.h" +#include "quantum_keycodes.h" + +#define NOR_MOD TO(NORMAL_MODE) +#define INS_MOD TO(INSERT_MODE) + +#define PRESS(keycode) register_code16(keycode) +#define RELEASE(keycode) unregister_code16(keycode) + +uint16_t VIM_QUEUE = KC_NO; + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + VIM_A, + VIM_B, + VIM_C, + VIM_CI, + VIM_D, + VIM_DI, + VIM_E, + VIM_H, + VIM_I, + VIM_J, + VIM_K, + VIM_L, + VIM_O, + VIM_P, + VIM_S, + VIM_U, + VIM_V, + VIM_VI, + VIM_W, + VIM_X, + VIM_Y, + EPRM, + VRSN, + RGB_SLD, +}; + +void VIM_APPEND(void); +void VIM_APPEND_LINE(void); +void VIM_BACK(void); +void VIM_CHANGE_BACK(void); +void VIM_CHANGE_DOWN(void); +void VIM_CHANGE_END(void); +void VIM_CHANGE_INNER_WORD(void); +void VIM_CHANGE_LEFT(void); +void VIM_CHANGE_LINE(void); +void VIM_CHANGE_RIGHT(void); +void VIM_CHANGE_UP(void); +void VIM_CHANGE_WHOLE_LINE(void); +void VIM_CHANGE_WORD(void); +void VIM_CUT(void); +void VIM_DELETE_BACK(void); +void VIM_DELETE_DOWN(void); +void VIM_DELETE_END(void); +void VIM_DELETE_INNER_WORD(void); +void VIM_DELETE_LEFT(void); +void VIM_DELETE_LINE(void); +void VIM_DELETE_RIGHT(void); +void VIM_DELETE_UP(void); +void VIM_DELETE_WHOLE_LINE(void); +void VIM_DELETE_WORD(void); +void VIM_END(void); +void VIM_JOIN(void); +void VIM_OPEN(void); +void VIM_OPEN_ABOVE(void); +void VIM_PUT(void); +void VIM_SUBSTITUTE(void); +void VIM_UNDO(void); +void VIM_VISUAL_BACK(void); +void VIM_VISUAL_DOWN(void); +void VIM_VISUAL_END(void); +void VIM_VISUAL_INNER_WORD(void); +void VIM_VISUAL_LEFT(void); +void VIM_VISUAL_RIGHT(void); +void VIM_VISUAL_UP(void); +void VIM_VISUAL_WORD(void); +void VIM_WORD(void); +void VIM_YANK(void); + +void TAP(uint16_t keycode) { + PRESS(keycode); + RELEASE(keycode); +} + +void CMD(uint16_t keycode) { + PRESS(KC_LGUI); + TAP(keycode); + RELEASE(KC_LGUI); +} + +void CTRL(uint16_t keycode) { + PRESS(KC_LCTRL); + TAP(keycode); + RELEASE(KC_LCTRL); +} + +void SHIFT(uint16_t keycode) { + PRESS(KC_LSHIFT); + TAP(keycode); + RELEASE(KC_LSHIFT); +} + +void ALT(uint16_t keycode) { + PRESS(KC_LALT); + TAP(keycode); + RELEASE(KC_LALT); +} + +/** + * Sets the `VIM_QUEUE` variable to the incoming keycode. + * Pass `KC_NO` to cancel the operation. + * @param keycode + */ +void VIM_LEADER(uint16_t keycode) { + VIM_QUEUE = keycode; + switch(keycode) { + case VIM_C: print("\e[32mc\e[0m"); break; + case VIM_CI: print("\e[32mi\e[0m"); break; + case VIM_D: print("\e[32md\e[0m"); break; + case VIM_DI: print("\e[32mi\e[0m"); break; + case VIM_V: print("\e[32mv\e[0m"); break; + case VIM_VI: print("\e[32mi\e[0m"); break; + case KC_NO: print("❎"); break; + } +} + +/*** + * ####### # # ####### ##### # # ####### ####### + * # # ## # # # # # # # # # + * # # # # # # # # # # # # + * # # # # # ##### ##### ####### # # # + * # # # # # # # # # # # # + * # # # ## # # # # # # # # + * ####### # # ####### ##### # # ####### # + * + */ + +/** + * Vim-like `append` command. + * Works by sending →. + */ +void VIM_APPEND(void) { + print("\e[31ma\e[0m"); + TAP(KC_RIGHT); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `back` command + * Simulates vim's `b` command by sending ⌥← + */ +void VIM_BACK(void) { + print("\e[31mb\e[0m"); + ALT(KC_LEFT); +} + +/** + * Vim-like `cut` command + * Simulates vim's `x` command by sending ⇧→ then ⌘X. + */ +void VIM_CUT(void) { + print("\e[31mx\e[0m"); + SHIFT(KC_RIGHT); + CMD(KC_X); +} + +/** + * Vim-like `down` command + * Sends ↓ + */ +void VIM_DOWN(void) { + print("\e[31mj\e[0m"); + TAP(KC_DOWN); +} + +/** + * Vim-like `end` command + * Simulates vim's `e` command by sending ⌥→ + */ +void VIM_END(void) { + print("\e[31me\e[0m"); + ALT(KC_RIGHT); +} + +/** + * Vim-like `left` command + * Sends ← + */ +void VIM_LEFT(void) { + print("\e[31mh\e[0m"); + VIM_LEADER(KC_NO); + TAP(KC_LEFT); +} + +/** + * Vim-like `open` command. + * Works by sending ⌘→ to move to the end of the line, `enter` to open a new line, + * then switching to insert mode. + */ +void VIM_OPEN(void) { + print("\e[31mo\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_RIGHT); + TAP(KC_ENTER); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `put` command + * Simulates vim's `p` command by sending ⌘V + */ +void VIM_PUT(void) { + print("\e[31mp\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_V); +} + +/** + * Vim-like `put before` command + * Simulates vim's `P` command by sending ↑, ⌘←, then ⌘V + */ +void VIM_PUT_BEFORE(void) { + print("\e[31mP\e[0m"); + VIM_LEADER(KC_NO); + TAP(KC_UP); + CMD(KC_LEFT); + CMD(KC_V); +} + +/** + * Vim-like `right` command + * Sends → + */ +void VIM_RIGHT(void) { + print("\e[31ml\e[0m"); + VIM_LEADER(KC_NO); + TAP(KC_RIGHT); +} + +/** + * Vim-like `substitute` command + * Simulates vim's `s` command by sending ⇧→ to select the next character, then + * ⌘X to cut it, then entering insert mode. + */ +void VIM_SUBSTITUTE(void) { + print("\e[31ms\e[0m"); + VIM_LEADER(KC_NO); + SHIFT(KC_RIGHT); + CMD(KC_X); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `undo` command + * Simulates vim's `u` command by sending ⌘Z + */ +void VIM_UNDO(void) { + print("\e[31mu\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_Z); +} + +/** + * Vim-like `up` command + * Sends ↑ + */ +void VIM_UP(void) { + print("\e[31mk\e[0m"); + VIM_LEADER(KC_NO); + TAP(KC_UP); +} + +/** + * Vim-like `word` command + * Simulates vim's `w` command by moving the cursor first to the + * end of the current word, then to the end of the next word, + * then to the beginning of that word. + */ +void VIM_WORD(void) { + print("\e[31mw\e[0m"); + VIM_LEADER(KC_NO); + PRESS(KC_LALT); + TAP(KC_RIGHT); + TAP(KC_RIGHT); + TAP(KC_LEFT); + RELEASE(KC_LALT); +} + +/** + * Vim-like `yank` command + * Simulates vim's `y` command by sending ⌘C + */ +void VIM_YANK(void) { + print("\e[31my\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_C); +} + +/** + * Vim-like `yank line` command + * Simulates vim's `y` command by sending ⌘← then ⇧⌘→ then ⌘C + */ +void VIM_YANK_LINE(void) { + print("\e[31mY\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_LEFT); + PRESS(KC_LSHIFT); + CMD(KC_RIGHT); + RELEASE(KC_LSHIFT); + CMD(KC_C); +} + +/*** + * ##### # # ### ####### ####### ####### ###### + * # # # # # # # # # # + * # # # # # # # # # + * ##### ####### # ##### # ##### # # + * # # # # # # # # # + * # # # # # # # # # # + * ##### # # ### # # ####### ###### + * + */ + +/** + * Vim-like `append to line` command + * Simulates vim's `A` command by sending ⌘→ then switching to insert mode. + */ +void VIM_APPEND_LINE(void) { + print("\e[31mA\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_RIGHT); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `change line` command + * Simulates vim's `C` command by sending ⌃K then switching to insert mode. + */ +void VIM_CHANGE_LINE(void) { + print("\e[31mC\e[0m"); + VIM_LEADER(KC_NO); + VIM_DELETE_LINE(); + layer_on(INSERT_MODE); +} + +/** + * Vim-like 'delete line' command + * Simulates vim's `D` command by sending ⌃K to kill the line + */ +void VIM_DELETE_LINE(void) { + print("\e[31mD\e[0m"); + VIM_LEADER(KC_NO); + CTRL(KC_K); +} + +/** + * Vim-like 'join lines' command + * Simulates vim's `J` command by sending ⌘→ to go to the end of the line, then + * DELETE to join the lines + */ +void VIM_JOIN(void) { + print("\e[31mJ\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_RIGHT); + TAP(KC_DELETE); + VIM_LEADER(KC_NO); +} + +/** + * Vim-like 'open above' command + * Simulates vim's `O` command by sending ⌘→ to go to the start of the line, + * enter to move the line down, ↑ to move up to the new line, then switching to + * insert mode. + */ +void VIM_OPEN_ABOVE(void) { + print("\e[31mO\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_LEFT); + TAP(KC_ENTER); + TAP(KC_UP); + layer_on(INSERT_MODE); +} + +/** + * Vim-like 'change whole line' command + * Simulates vim's `S` `cc` or `c$` commands by sending ⌘← to go to the start of the line, + * ⌃K to kill the line, then switching to insert mode. + */ +void VIM_CHANGE_WHOLE_LINE(void) { + print("\e[31mS\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_LEFT); + VIM_CHANGE_LINE(); +} + +/*** + * ###### ###### ###### ####### ####### ### # # ####### ###### + * # # # # # # # # # # # # # # + * # # # # # # # # # # # # # # + * # # ###### ###### ##### ##### # # ##### # # + * # # # # # # # # # # # # # + * # # # # # # # # # # # # # + * ###### # # # ####### # ### # # ####### ###### + * + */ + +/** + * Vim-like `delete to end` command + * Simulates vim's `de` command by sending ⌥⇧→ then ⌘X. + */ +void VIM_DELETE_END(void) { + print("\e[31me\e[0m"); + VIM_LEADER(KC_NO); + PRESS(KC_LALT); + SHIFT(KC_RIGHT); // select to end of this word + RELEASE(KC_LALT); + CMD(KC_X); +} + +/** + * Vim-like `delete whole line` command + * Simulates vim's `dd` command by sending ⌘← to move to start of line, + * selecting the whole line, then sending ⌘X to cut the line. + * alternate method: ⌘⌫, ⌃K + */ +void VIM_DELETE_WHOLE_LINE(void) { + print("\e[31md\e[0m"); + VIM_LEADER(KC_NO); + CMD(KC_LEFT); + PRESS(KC_LSHIFT); + CMD(KC_RIGHT); + RELEASE(KC_LSHIFT); + CMD(KC_X); +} + +/** + * Vim-like `delete word` command + * Simulates vim's `dw` command by sending ⌥⇧→→← then ⌘X to select to the start + * of the next word then cut. + */ +void VIM_DELETE_WORD(void) { + print("\e[31mw\e[0m"); + VIM_LEADER(KC_NO); + PRESS(KC_LALT); + SHIFT(KC_RIGHT); // select to end of this word + SHIFT(KC_RIGHT); // select to end of next word + SHIFT(KC_LEFT); // select to start of next word + RELEASE(KC_LALT); + CMD(KC_X); // delete selection +} + +/** + * Vim-like `delete back` command + * Simulates vim's `db` command by selecting to the end of the word then deleting. + */ +void VIM_DELETE_BACK(void) { + print("\e[31mb\e[0m"); + VIM_LEADER(KC_NO); + PRESS(KC_LALT); + SHIFT(KC_LEFT); // select to start of word + SHIFT(KC_DEL); // delete selection + RELEASE(KC_LSHIFT); +} + +/** + * Vim-like `delete left` command + * Simulates vim's `dh` command by sending ⇧← then ⌘X. + */ +void VIM_DELETE_LEFT(void) { + print("\e[31mh\e[0m"); + VIM_LEADER(KC_NO); + SHIFT(KC_LEFT); + CMD(KC_X); +} + +/** + * Vim-like `delete right` command + * Simulates vim's `dl` command by sending ⇧→ then ⌘X. + */ +void VIM_DELETE_RIGHT(void) { + print("\e[31ml\e[0m"); + VIM_LEADER(KC_NO); + SHIFT(KC_RIGHT); + CMD(KC_X); +} + +/** + * Vim-like `delete up` command + * Simulates vim's `dk` command by sending ↑ then deleting the line. + */ +void VIM_DELETE_UP(void) { + print("\e[31mk\e[0m"); + VIM_LEADER(KC_NO); + TAP(KC_UP); + VIM_DELETE_LINE(); +} + +/** + * Vim-like `delete down` command + * Simulates vim's `dj` command by sending ↓ then deleting the line. + */ +void VIM_DELETE_DOWN(void) { + print("\e[31mj\e[0m"); + VIM_LEADER(KC_NO); + TAP(KC_DOWN); + VIM_DELETE_LINE(); +} + +/*** + * ###### ### ###### ###### ####### ####### ### # # ####### ###### + * # # # # # # # # # # # # # # # + * # # # # # # # # # # # # # # # + * # # # ###### ###### ##### ##### # # ##### # # + * # # # # # # # # # # # # # # + * # # # # # # # # # # # # # # + * ###### ### # # # ####### # ### # # ####### ###### + * + */ + +/** + * Vim-like `delete inner word` command + * Simulates vim's `diw` command by moving back then cutting to the end of the word. + */ +void VIM_DELETE_INNER_WORD(void) { + print("\e[31mw\e[0m"); + VIM_LEADER(KC_NO); + VIM_BACK(); + VIM_DELETE_END(); +} + +/*** + * ##### ###### ###### ####### ####### ### # # ####### ###### + * # # # # # # # # # # # # # # + * # # # # # # # # # # # # # + * # ###### ###### ##### ##### # # ##### # # + * # # # # # # # # # # # # + * # # # # # # # # # # # # # + * ##### # # # ####### # ### # # ####### ###### + * + */ + +/** + * Vim-like `change back` command + * Simulates vim's `cb` command by first deleting to the start of the word, + * then switching to insert mode. + */ +void VIM_CHANGE_BACK(void) { + print("\e[31mb\e[0m"); + VIM_LEADER(KC_NO); + VIM_DELETE_BACK(); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `change down` command + * Simulates vim's `cj` command by sending ↓ then changing the line. + */ +void VIM_CHANGE_DOWN(void) { + print("\e[31mj\e[0m"); + VIM_LEADER(KC_NO); + VIM_DELETE_DOWN(); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `change to end` command + * Simulates vim's `ce` command by first deleting to the end of the word, + * then switching to insert mode. + */ +void VIM_CHANGE_END(void) { + print("\e[31mce\e[0m"); + VIM_LEADER(KC_NO); + VIM_DELETE_END(); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `change left` command + * Simulates vim's `ch` command by deleting left then switching to insert mode. + */ +void VIM_CHANGE_LEFT(void) { + print("\e[31mch\e[0m"); + VIM_LEADER(KC_NO); + VIM_DELETE_LEFT(); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `change right` command + * Simulates vim's `cl` command by deleting right then switching to insert mode. + */ +void VIM_CHANGE_RIGHT(void) { + print("\e[31mcl\e[0m"); + VIM_DELETE_RIGHT(); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `change up` command + * Simulates vim's `ck` command by deleting up then switching to insert mode. + */ +void VIM_CHANGE_UP(void) { + print("\e[31mck\e[0m"); + VIM_DELETE_UP(); + layer_on(INSERT_MODE); +} + +/** + * Vim-like `change word` command + * Simulates vim's `cw` command by first deleting to the end of the word, + * then switching to insert mode. + */ +void VIM_CHANGE_WORD(void) { + print("\e[31mcw\e[0m"); + VIM_LEADER(KC_NO); + VIM_DELETE_WORD(); + layer_on(INSERT_MODE); +} + +/*** + * ##### ### ###### ###### ####### ####### ### # # ####### ###### + * # # # # # # # # # # # # # # # + * # # # # # # # # # # # # # # + * # # ###### ###### ##### ##### # # ##### # # + * # # # # # # # # # # # # # + * # # # # # # # # # # # # # # + * ##### ### # # # ####### # ### # # ####### ###### + * + */ + +/** + * Vim-like `change inner word` command + * Simulates vim's `ciw` command by deleting the inner word then switching to insert mode. + */ +void VIM_CHANGE_INNER_WORD(void) { + print("\e[31mciw\e[0m"); + VIM_DELETE_INNER_WORD(); + layer_on(INSERT_MODE); +} + +/*** + * # # ###### ###### ####### ####### ### # # ####### ###### + * # # # # # # # # # # # # # # + * # # # # # # # # # # # # # # + * # # ###### ###### ##### ##### # # ##### # # + * # # # # # # # # # # # # # + * # # # # # # # # # # # # # + * # # # # ####### # ### # # ####### ###### + * + */ + +/** + * Vim-like `visual select back` command + * Simulates vim's `vb` command by selecting to the enc of the word. + */ +void VIM_VISUAL_BACK(void) { + print("\e[31mvb\e[0m"); + VIM_LEADER(KC_NO); + PRESS(KC_LALT); + SHIFT(KC_LEFT); // select to start of word + RELEASE(KC_LALT); +} + +/** + * Vim-like `visual select to end` command + * Simulates vim's `ve` command by selecting to the end of the word. + */ +void VIM_VISUAL_END(void) { + print("\e[31mve\e[0m"); + VIM_LEADER(KC_NO); + PRESS(KC_LALT); + SHIFT(KC_RIGHT); // select to end of this word + RELEASE(KC_LALT); +} + +/** + * Vim-like `visual select word` command + * Simulates vim's `vw` command by selecting to the end of the word. + */ +void VIM_VISUAL_WORD(void) { + print("\e[31mvw\e[0m"); + VIM_LEADER(KC_NO); + PRESS(KC_LALT); + SHIFT(KC_RIGHT); // select to end of this word + SHIFT(KC_RIGHT); // select to end of next word + SHIFT(KC_LEFT); // select to start of next word + RELEASE(KC_LALT); +} + +/** + * Vim-like `visual left` command + * Simulates vim's `vh` command by sending ⇧←. + */ +void VIM_VISUAL_LEFT(void) { + print("\e[31mvh\e[0m"); + VIM_LEADER(KC_NO); + SHIFT(KC_LEFT); +} + +/** + * Vim-like `visual right` command + * Simulates vim's `vl` command by sending ⇧→. + */ +void VIM_VISUAL_RIGHT(void) { + print("\e[31mvl\e[0m"); + VIM_LEADER(KC_NO); + SHIFT(KC_RIGHT); +} + +/** + * Vim-like `visual up` command + * Simulates vim's `vk` command by sending ⇧↑. + */ +void VIM_VISUAL_UP(void) { + print("\e[31mvk\e[0m"); + VIM_LEADER(KC_NO); + SHIFT(KC_UP); +} + +/** + * Vim-like `visual down` command + * Simulates vim's `vj` command by sending ⇧↓. + */ +void VIM_VISUAL_DOWN(void) { + print("\e[31mdj\e[0m"); + VIM_LEADER(KC_NO); + SHIFT(KC_DOWN); +} + +/*** + * # # ### ###### ###### ####### ####### ### # # ####### ###### + * # # # # # # # # # # # # # # # + * # # # # # # # # # # # # # # # + * # # # ###### ###### ##### ##### # # ##### # # + * # # # # # # # # # # # # # # + * # # # # # # # # # # # # # # + * # ### # # # ####### # ### # # ####### ###### + * + */ + +/** + * Vim-like `visual inner word` command + * Simulates vim's `viw` command by moving back then selecting to the end of the word. + */ +void VIM_VISUAL_INNER_WORD(void) { + print("\e[31mviw\e[0m"); + VIM_LEADER(KC_NO); + VIM_BACK(); + VIM_VISUAL_END(); +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c new file mode 100644 index 000000000000..99504de9565c --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 alexmarmon + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Alt_L Win_L SPACE Ct_R Alt_R FN Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MODE_FORWARD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, _______, KC_MEDIA_NEXT_TRACK + ), + + +}; + + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/readme.md new file mode 100644 index 000000000000..36ad42b1af37 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/readme.md @@ -0,0 +1,7 @@ +![Layout Image](https://i.imgur.com/MizMvsI.jpg) + +# Simple MacOS like keymap with RGB + +* Working basic RGB thanks to https://github.com/qmk/qmk_firmware/pull/13430 +* Restore working rotary knob volume control +* Add media_previous and media_next to FN+left and FN+right \ No newline at end of file diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h new file mode 100644 index 000000000000..1438d317fbd2 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Andre Brait + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef RGB_MATRIX_ENABLE + #define RGB_DISABLE_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) + #define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c new file mode 100644 index 000000000000..e521425f267a --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c @@ -0,0 +1,348 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2022 Andre Brait + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +enum layers { + WIN_BASE = 0, + WIN_FN, + MAC_BASE, + MAC_FN +}; + +enum custom_keycodes { + KC_MISSION_CONTROL = SAFE_RANGE, + KC_LAUNCHPAD +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) +#define KC_MCTL KC_MISSION_CONTROL +#define KC_LPAD KC_LAUNCHPAD +#define TO_WINB TO(WIN_BASE) +#define TO_MACB TO(MAC_BASE) +#define MO_WINF MO(WIN_FN) +#define MO_MACF MO(MAC_FN) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Play/Pause) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + // + // RGB and function keys are inspired by the Keychron Q1 layouts instead of using the default keys. + // + // KC_PAUS/KC_BRMU and KC_SCRL/KC_BRMD are aliases for the same keys, but their names reflect better the function in each layout. + [WIN_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO_WINF, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [WIN_FN] = LAYOUT( + _______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, KC_INS, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_PAUS, + TO_MACB, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCRL, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NK_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [MAC_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO_MACF, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [MAC_FN] = LAYOUT( + _______, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, KC_INS, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_BRMU, + TO_WINB, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BRMD, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NK_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; +// clang-format on + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif // ENCODER_ENABLE + +#ifdef RGB_MATRIX_ENABLE + +#define RGB_CONFIRMATION_BLINKING_TIME 2000 // 2 seconds + +/* Renaming those to make the purpose on this keymap clearer */ +#define LED_FLAG_CAPS LED_FLAG_NONE +#define LED_FLAG_EFFECTS LED_FLAG_INDICATOR + +static void set_rgb_caps_leds(void); + +static uint16_t effect_started_time = 0; +static uint8_t r_effect = 0x0, g_effect = 0x0, b_effect = 0x0; +static void start_effects(void); + +/* The higher this is, the slower the blinking will be */ +#ifndef TIME_SELECTED_BIT + #define TIME_SELECTED_BIT 8 +#endif +#if TIME_SELECTED_BIT < 0 || TIME_SELECTED_BIT >= 16 + #error "TIME_SELECTED_BIT must be a positive integer smaller than 16" +#endif +#define effect_red() r_effect = 0xFF, g_effect = 0x0, b_effect = 0x0 +#define effect_green() r_effect = 0x0, g_effect = 0xFF, b_effect = 0x0 +#define effect_blue() r_effect = 0x0, g_effect = 0x0, b_effect = 0xFF +#define effect_white() r_effect = 0xFF, g_effect = 0xFF, b_effect = 0xFF + +static uint8_t previous_effect_layer = 255; + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t current_layer = get_highest_layer(state); + switch (current_layer) { + case WIN_BASE: + if (previous_effect_layer != current_layer) { + previous_effect_layer = current_layer; + effect_blue(); + start_effects(); + } + break; + case MAC_BASE: + if (previous_effect_layer != current_layer) { + previous_effect_layer = current_layer; + effect_white(); + start_effects(); + } + break; + } + return state; +} + +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + if (!rgb_matrix_is_enabled()) { + /* Turn ON the RGB Matrix for CAPS LOCK */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + rgb_matrix_enable(); + } + } else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + /* RGB Matrix was only ON because of CAPS LOCK. Turn it OFF. */ + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_disable(); + } + return true; +} + +#endif // RGB_MATRIX_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MISSION_CONTROL: + if (record->event.pressed) { + host_consumer_send(0x29F); + } else { + host_consumer_send(0); + } + return false; // Skip all further processing of this key + case KC_LAUNCHPAD: + if (record->event.pressed) { + host_consumer_send(0x2A0); + } else { + host_consumer_send(0); + } + return false; // Skip all further processing of this key + #ifdef RGB_MATRIX_ENABLE + #ifdef NKRO_ENABLE + case NK_TOGG: + if (record->event.pressed) { + if (keymap_config.nkro) { + /* Turning NKRO OFF */ + effect_red(); + } else { + /* Turning NKRO ON */ + effect_green(); + } + start_effects(); + } + break; + #endif // NKRO_ENABLE + case RGB_MOD: + case RGB_RMOD: + case RGB_HUI: + case RGB_HUD: + case RGB_SAI: + case RGB_SAD: + case RGB_VAI: + case RGB_VAD: + case RGB_SPI: + case RGB_SPD: + if (record->event.pressed) { + if (rgb_matrix_get_flags() != LED_FLAG_ALL) { + /* Ignore changes to RGB settings while only it's supposed to be OFF */ + return false; // Skip all further processing of this key + } + } + break; + case RGB_TOG: + if (record->event.pressed) { + if (rgb_matrix_is_enabled()) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_EFFECTS: + case LED_FLAG_CAPS: + /* Turned ON because of EFFECTS or CAPS, is actually OFF */ + /* Change to LED_FLAG_ALL to signal it's really ON */ + rgb_matrix_set_flags(LED_FLAG_ALL); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + break; + case LED_FLAG_ALL: + /* Is actually ON */ + if (effect_started_time > 0) { + /* Signal EFFECTS */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + } else + if (host_keyboard_led_state().caps_lock) { + /* Signal CAPS */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + } + break; + } + } + } + break; + #endif // RGB_MATRIX_ENABLE + } + return true; +} + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_indicators_user() { + if (effect_started_time > 0) { + /* Render blinking EFFECTS */ + const uint16_t deltaTime = sync_timer_elapsed(effect_started_time); + if (deltaTime <= RGB_CONFIRMATION_BLINKING_TIME) { + const uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01; + const uint8_t val_r = led_state * r_effect; + const uint8_t val_g = led_state * g_effect; + const uint8_t val_b = led_state * b_effect; + rgb_matrix_set_color_all(val_r, val_g, val_b); + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds(); + } + return; + } else { + /* EFFECTS duration is finished */ + effect_started_time = 0; + if (rgb_matrix_get_flags() == LED_FLAG_EFFECTS) { + /* It was turned ON because of EFFECTS */ + if (host_keyboard_led_state().caps_lock) { + /* CAPS is still ON. Demote to CAPS */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + } else { + /* There is nothing else keeping RGB enabled. Reset flags and turn if off. */ + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_disable_noeeprom(); + } + } + } + } + if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + rgb_matrix_set_color_all(0x0, 0x0, 0x0); + } + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds(); + } +} + +static void start_effects() { + effect_started_time = sync_timer_read(); + if (!rgb_matrix_is_enabled()) { + /* Turn it ON, signal the cause (EFFECTS) */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + rgb_matrix_enable_noeeprom(); + } else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + /* It's already ON, promote the cause from CAPS to EFFECTS */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + } +} + +// RGB led number layout, function of the key + +// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12 +// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13 +// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14 +// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15 +// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16 +// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17 +// 87, led 07 88, led 18 +// 91, led 08 92, led 19 + +static void set_rgb_caps_leds() { + rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1 + rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1 + rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2 + rgb_matrix_set_color(71, 0xFF, 0x0, 0x0); // Right side LED 2 + rgb_matrix_set_color(73, 0xFF, 0x0, 0x0); // Left side LED 3 + rgb_matrix_set_color(74, 0xFF, 0x0, 0x0); // Right side LED 3 + rgb_matrix_set_color(76, 0xFF, 0x0, 0x0); // Left side LED 4 + rgb_matrix_set_color(77, 0xFF, 0x0, 0x0); // Right side LED 4 + rgb_matrix_set_color(80, 0xFF, 0x0, 0x0); // Left side LED 5 + rgb_matrix_set_color(81, 0xFF, 0x0, 0x0); // Right side LED 5 + rgb_matrix_set_color(83, 0xFF, 0x0, 0x0); // Left side LED 6 + rgb_matrix_set_color(84, 0xFF, 0x0, 0x0); // Right side LED 6 + rgb_matrix_set_color(87, 0xFF, 0x0, 0x0); // Left side LED 7 + rgb_matrix_set_color(88, 0xFF, 0x0, 0x0); // Right side LED 7 + rgb_matrix_set_color(91, 0xFF, 0x0, 0x0); // Left side LED 8 + rgb_matrix_set_color(92, 0xFF, 0x0, 0x0); // Right side LED 8 + rgb_matrix_set_color(3, 0xFF, 0x0, 0x0); // CAPS LED +} + +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md new file mode 100644 index 000000000000..99d0a36721d2 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md @@ -0,0 +1,26 @@ +# andrebrait's GMMK Pro layout + +This is pretty much the stock layout with a few things moved around. +It basically reflects my needs for both Delete and Insert being readily available for coding, as well as a full Home/PgUp/PgDwn/End column. + +The differences are as follows: + +- Dedicated MacOS and Windows/Linux layers + - Switching between them by pressing Fn + CAPS LOCK +- Disabled Mouse Keys (to fix issues with KVM switches and also because they're not used here anyway) +- Short DEBOUNCE time (5 ms) +- Per-key debounce algorithm (sym_defer_pk) +- RGB turns off after 20 minutes of inactivity +- RGB turns off when USB is suspended +- Layer 0: + - Print Screen (default) -> Delete + - Delete (default) -> Home +- Layer 1 (accessed by pressing Fn): + - Fn + Delete -> Insert + - Fn + Home -> Print Screen + +This keymap also includes CAPS LOCK ON indicator.\ +All left and right side LEDs, and the Caps key LED will turn solid red while CAPS LOCK is ON. + +No other changes have been made. \ +The other keys on each layer have been kept intact. diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk new file mode 100644 index 000000000000..057e9a954110 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk @@ -0,0 +1,6 @@ +# Enable additional features. + +DEBOUNCE_TYPE = sym_defer_pk + +# Disabling MouseKey because it breaks my KVM switch +MOUSEKEY_ENABLE = no diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/batin/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/batin/keymap.c new file mode 100644 index 000000000000..be88ea82f8bb --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/batin/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_BRID, KC_BRIU, RGB_VAD, RGB_VAI, RGB_RMOD, RGB_MOD, KC_F9, KC_MPRV, KC_MPLY, KC_MNXT, KC_PSCR, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F10, KC_F12, _______, KC_MUTE, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, RGB_MOD, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), +}; +// clang-format on + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return false; +} +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c new file mode 100644 index 000000000000..5f3e3f5fd8f5 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c @@ -0,0 +1,127 @@ +/* Copyright 2021 Glorious, LLC +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +enum userspace_layers { + QWERTY, + FNLAYER, + POPTAB, +}; + +//custom keycodes +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)) // Make ALT layer for encoder use +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)) // Make CTRL layer for encoder use +#define SWAP_L SGUI(KC_LEFT) // Swap application to left display +#define SWAP_R SGUI(KC_RGHT) // Swap application to right display +#define MINI LGUI(KC_DOWN) // Shrink window +#define MAXI LGUI(KC_UP) // Maximize window +#define CLOSEAPPLICATION LALT(KC_F4) // Kill application +#define CLOSETAB LCTL(KC_W) // Kill current tab +#define POPOUT LCTL(LSFT(KC_K)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + + [QWERTY] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FNLAYER), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [FNLAYER] = LAYOUT( + CLOSEAPPLICATION, CLOSETAB,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PLAY_PAUSE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, SWAP_L , MAXI , SWAP_R , _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET , _______, + _______, _______, MINI , _______, POPOUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_TRNS, _______, _______, _______ + ), + + +}; + + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (get_mods() & MODS_ALT_MASK) { + if (clockwise) { + tap_code(KC_TAB); + } else { + tap_code16(S(KC_TAB)); + } + } else if (get_mods() & MODS_CTRL_MASK) { + if (clockwise) { + tap_code(KC_TAB); + } else { + tap_code16(S(KC_TAB)); + } + } else if(IS_LAYER_ON(FNLAYER)) { + if (clockwise) { + tap_code(KC_MEDIA_NEXT_TRACK); + } else { + tap_code(KC_MEDIA_PREV_TRACK); + } + } else { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return false; +} + +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + switch(get_highest_layer(layer_state)) { + // special handling per layer + case 0: //layer one + if (host_keyboard_led_state().caps_lock) + rgb_matrix_set_color_all(255,0,0); + else + rgb_matrix_set_color_all(0,255,56); + break; + case 1: + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_INDICATOR_SET_COLOR(i,0,0,0); + } + RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 255) //esc + RGB_MATRIX_INDICATOR_SET_COLOR(6, 0, 0, 255) //f1 + RGB_MATRIX_INDICATOR_SET_COLOR(8, 0, 0, 255) //q + RGB_MATRIX_INDICATOR_SET_COLOR(14, 0, 0, 255) //w + RGB_MATRIX_INDICATOR_SET_COLOR(20, 0, 0, 255) //e + RGB_MATRIX_INDICATOR_SET_COLOR(15, 0, 0, 255) //s + RGB_MATRIX_INDICATOR_SET_COLOR(26, 0, 0, 255) //f + RGB_MATRIX_INDICATOR_SET_COLOR(49, 0, 0, 255) //R_Alt + break; + default: + break; + } +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/readme.md new file mode 100644 index 000000000000..8162002892a9 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/readme.md @@ -0,0 +1,19 @@ +# Description +Pretty simple keymap with a few handy tools on a 2nd layer and rotary encoder. + +# Encoder +Holding tab and scrolling encoder will allow scrolling through applications, as if using alt + tab +Holding ctrl and scrolling encoder will allow scrolling through chrome tabs +FN + Encoder scroll is media next/prev +FN + Encoder press is media pause +default encoder behavior is volume up/down + +# Function Layer +FN + \ is used to put keyboard into bootloader mode +FN + ESC is the same as alt F4, for closing applications +FN + F1 is to close current browser tab +FN + Q moves current application one monitor to the left +FN + W maximizes current application +FN + E moves current application one monitor to the right +FN + S minimizes current application +FN + F is used in junction with the "Popout tab" extension to chrome (https://chrome.google.com/webstore/detail/popout-tab/pcfcieidiaaobigemjnkclebhnmgfbco) to pop out current tab to its own window diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/config.h new file mode 100644 index 000000000000..16ac4f240789 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/config.h @@ -0,0 +1,72 @@ +/* Copyright 2021 Choi Byungyoon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define RGB_MATRIX_KEYPRESSES + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +// #define ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #define ENABLE_RGB_MATRIX_CYCLE_ALL +// #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_HUE_BREATHING +#undef ENABLE_RGB_MATRIX_HUE_PENDULUM +#undef ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_PIXEL_RAIN +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +// #define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +#undef DEBOUNCE +/* High debounce time is required to avoid key chattering because of the debouncing algorithm sym_eager_pk */ +#define DEBOUNCE 40 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c new file mode 100644 index 000000000000..1ad8417de283 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c @@ -0,0 +1,129 @@ +/* Copyright 2021 Choi Byungyoon + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "byungyoonc.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mic Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc TaskMgr +// Tab Q W E R T Y U I O P [ ] \ Del +// Caps A S D F G H J K L ; " Enter Home +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MMUT, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TASK, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_BRID, KC_BRIU, KC_CALC, KC_MSEL, RGB_VAD, RGB_VAI, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, KC_SEC1, KC_SEC2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DEBUG, _______, + _______, _______, _______, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUI, RGB_HUD, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, GUI_TOG, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + +}; +// clang-format on + +bool process_record_user_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + rgblight_increase_hue(); + } + return true; +} + +#if defined(ENCODER_ENABLE) +bool encoder_update_user(uint8_t index, bool clockwise) { + uint8_t mod_state = get_mods(); + if (mod_state & MOD_MASK_CTRL) { + unregister_mods(MOD_MASK_CTRL); + if (clockwise) { + tap_code16(LCTL(KC_RGHT)); + } else { + tap_code16(LCTL(KC_LEFT)); + } + set_mods(mod_state); + } else { + if (clockwise) { + tap_code16(KC_VOLU); + } else { + tap_code16(KC_VOLD); + } + } + return true; +} +#endif // ENCODER_ENABLE + +static void set_rgb_caps_leds(void); + +static void set_rgb_caps_leds() { + rgb_matrix_set_color(73, 0xFF, 0x77, 0x77); // Left side LED 3 + rgb_matrix_set_color(74, 0xFF, 0x77, 0x77); // Right side LED 3 + rgb_matrix_set_color(76, 0xFF, 0x77, 0x77); // Left side LED 4 + rgb_matrix_set_color(77, 0xFF, 0x77, 0x77); // Right side LED 4 + rgb_matrix_set_color(80, 0xFF, 0x77, 0x77); // Left side LED 5 + rgb_matrix_set_color(81, 0xFF, 0x77, 0x77); // Right side LED 5 + rgb_matrix_set_color(83, 0xFF, 0x77, 0x77); // Left side LED 6 + rgb_matrix_set_color(84, 0xFF, 0x77, 0x77); // Right side LED 6 + rgb_matrix_set_color(3, 0xFF, 0x77, 0x77); // CAPS LED +} + +static void set_rgb_nlck_notset_leds(void); + +static void set_rgb_wlck_leds(void); + +static void set_rgb_nlck_notset_leds() { + rgb_matrix_set_color(67, 0x77, 0x77, 0xFF); // Left side LED 1 + rgb_matrix_set_color(68, 0x77, 0x77, 0xFF); // Right side LED 1 + rgb_matrix_set_color(70, 0x77, 0x77, 0xFF); // Left side LED 2 + rgb_matrix_set_color(71, 0x77, 0x77, 0xFF); // Right side LED 2 +} + +static void set_rgb_wlck_leds() { + rgb_matrix_set_color(87, 0x77, 0xFF, 0x77); // Left side LED 7 + rgb_matrix_set_color(88, 0x77, 0xFF, 0x77); // Right side LED 7 + rgb_matrix_set_color(91, 0x77, 0xFF, 0x77); // Left side LED 8 + rgb_matrix_set_color(92, 0x77, 0xFF, 0x77); // Right side LED 8 +} + +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + set_rgb_caps_leds(); + } + if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { + set_rgb_nlck_notset_leds(); + } + if (keymap_config.no_gui) { + set_rgb_wlck_leds(); + } +} + +void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { + for (int i = 0; i < 20; i++) { + wait_cpuclock(STM32_SYSCLK / 1000000L); + } +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/readme.md new file mode 100644 index 000000000000..d340bf86ed78 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/readme.md @@ -0,0 +1,41 @@ +byungyoonc's GMMK Pro Layout +============================ + +## Keymap + +### Base Layer +![GMMK Pro Base Layer Layout Image](https://i.imgur.com/VvEL08Q.png) + +Made a bit of a change on the leftmost side of the keyboard to set Home and End closer to the arrow keys. Also uses a shortcut for Windows Task Manager, Windows PowerToys microphone mute. + +### Fn Layer +![GMMK Pro Fn Layer Layout Image](https://i.imgur.com/uQy2gSh.png) + +F-row media functions roughly matches the Keychron keyboard's layout. + +Added Debug key for faster debugging iteration. + +Supports Secrets input by Fn + Numbers. + +The rest are pretty self-explanatory RGB controls, a GUI toggle and an NKRO toggle. + +## Rotary Encoder Rotation +Volume control when no mods, Ctrl+Left/Right when Ctrl is pressed while rotating the encoder. + +## RGB Indicators +Uses side strap RGB as the RGB indicators. +- Top third lights on when the Num Lock is turned off. +- Middle third lights on when the Caps Lock is turned on. +- Bottom third lights on when the GUI is disabled (via `GUI_TOG`). + +## Debounce +Uses the `DEBOUNCE_TYPE` of `sym_eager_pk` for the shortest response time possible, and `DEBOUNCE` time of `40` in order to eliminate any key chattering. + +## NKRO +N-key rollover is turned on by default. + +## RGB Matrix +Keypresses effects are enabled. +Disabled default several RGB effects. +Added custom RGB matrix effect `saturated_solid_multisplash`. +Every keypress increases the RGB hue value. diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/rgb_matrix_user.inc b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/rgb_matrix_user.inc new file mode 100644 index 000000000000..0d61e19f4c10 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/rgb_matrix_user.inc @@ -0,0 +1 @@ +#include "saturated_solid_multisplash.h" diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/rules.mk new file mode 100644 index 000000000000..08f832c51bc0 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/rules.mk @@ -0,0 +1,2 @@ +DEBOUNCE_TYPE = sym_eager_pk +RGB_MATRIX_CUSTOM_USER = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c new file mode 100644 index 000000000000..2361ab56608b --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c @@ -0,0 +1,154 @@ +/* Copyright 2021 Cedrik Lussier @cedrikl +.* Directly inspired from the work of jonavin https://github.com/qmk/qmk_firmware/tree/master/keyboards/gmmk/pro/ansi/keymaps/jonavin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "rgb_matrix_map.h" +#include "cedrikl.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + EEP_RST, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, KC_MUTE, + KC_NLCK, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, KC_PSCR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PSLS, KC_PAST, KC_BSLS, KC_PGUP, + KC_CAPS, RGB_VAD, RGB_TOG, RGB_VAI, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_PENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_PDOT, KC_SLSH, KC_RSFT, KC_UP, KC_INS, + KC_LCTL, KC_RGUI, KC_LALT, KC_SPC, KC_RALT, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; +// clang-format on + +#ifdef ENCODER_ENABLE + bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; + } +#endif // ENCODER_ENABLE + + +#ifdef RGB_MATRIX_ENABLE +//void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer) { +// const ledmap *l = &(ledmaps[layer]); +// +// +// +// for (int i = 0; i < DRIVER_LED_TOTAL; i++) { +// HSV hsv = { +// .h = (*l)[i][0], +// .s = (*l)[i][1], +// .v = val, +// }; +// +// if (hsv.h || hsv.s) { +// RGB rgb = hsv_to_rgb(hsv); +// RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); +// } +// } +//} + + // These shorthands are used below to set led colors on each matrix cycle + void loop_colorset(const uint8_t *indices, int array_size, const HSV target_color) { + HSV work_color = target_color; + work_color.v = rgb_matrix_get_val(); + + RGB final_color = hsv_to_rgb(work_color); + + for (int i = 0; i < array_size; i++) { + rgb_matrix_set_color(indices[i], final_color.r, final_color.g, final_color.b); // Set color A here + } + } + + // Capslock, Scroll lock and Numlock indicator on Left side lights. + void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + loop_colorset(LED_REGION_A, (sizeof(LED_REGION_A) / sizeof(LED_REGION_A[0])), hsv_cl_blue); + loop_colorset(LED_REGION_B, (sizeof(LED_REGION_B) / sizeof(LED_REGION_B[0])), hsv_cl_purple); + loop_colorset(LED_REGION_L_SIDE, (sizeof(LED_REGION_L_SIDE) / sizeof(LED_REGION_L_SIDE[0])), hsv_cl_purple); + loop_colorset(LED_REGION_R_SIDE, (sizeof(LED_REGION_R_SIDE) / sizeof(LED_REGION_R_SIDE[0])), hsv_cl_purple); + + switch(get_highest_layer(layer_state)){ // special handling per layer + case 1: //layer 1 + //rgb_matrix_set_color_all(RGB_AZURE); + loop_colorset(LED_REGION_NUMPAD, (sizeof(LED_REGION_NUMPAD) / sizeof(LED_REGION_NUMPAD[0])), hsv_cl_numpad); + loop_colorset(LED_REGION_OTHER, (sizeof(LED_REGION_OTHER) / sizeof(LED_REGION_OTHER[0])), hsv_cl_mods); + break; + default: //layer 0 + // + break; + break; + } + + HSV bad_hsv = hsv_cl_bad; + bad_hsv.v = rgb_matrix_get_val(); + RGB bad_rgb = hsv_to_rgb(bad_hsv); + led_t led_state = host_keyboard_led_state(); + + if (!led_state.num_lock) { // on if NUM lock is OFF + rgb_matrix_set_color(LED_R1, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_R2, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_R3, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_R4, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_R5, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_R6, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_R7, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_R8, bad_rgb.r, bad_rgb.g, bad_rgb.b); + } + if (led_state.caps_lock) { + rgb_matrix_set_color(LED_L1, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_L2, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_L3, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_L4, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_L5, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_L6, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_L7, bad_rgb.r, bad_rgb.g, bad_rgb.b); + rgb_matrix_set_color(LED_L8, bad_rgb.r, bad_rgb.g, bad_rgb.b); + loop_colorset(LED_REGION_CAPS, (sizeof(LED_REGION_CAPS) / sizeof(LED_REGION_CAPS[0])), hsv_cl_bad); + } + } +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/rgb_matrix_map.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/rgb_matrix_map.h new file mode 100644 index 000000000000..484f64b74c7d --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/rgb_matrix_map.h @@ -0,0 +1,185 @@ +/* Copyright 2021 Cedrik Lussier @cedrikl +.* Directly inspired from the work of jonavin https://github.com/qmk/qmk_firmware/tree/master/keyboards/gmmk/pro/ansi/keymaps/jonavin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifdef RGB_MATRIX_ENABLE + + // Custom RGB Colours + const HSV hsv_cl_blue = {150, 255, 255}; + const HSV hsv_cl_purple = {188, 255, 255}; + const HSV hsv_cl_numpad = {85, 255, 255}; + const HSV hsv_cl_mods = {42, 255, 255}; + const HSV hsv_cl_bad = {0, 255, 255}; + + // RGB LED locations + enum led_location_map { + LED_ESC, // 0, ESC, k13 + LED_GRV, // 1, ~, k16 + LED_TAB, // 2, Tab, k11 + LED_CAPS, // 3, Caps, k21 + LED_LSFT, // 4, Sh_L, k00 + LED_LCTL, // 5, Ct_L, k06 + LED_F1, // 6, F1, k26 + LED_1, // 7, 1, k17 + LED_Q, // 8, Q, k10 + LED_A, // 9, A, k12 + LED_Z, // 10, Z, k14 + LED_LWIN, // 11, Win_L, k90 + LED_F2, // 12, F2, k36 + LED_2, // 13, 2, k27 + LED_W, // 14, W, k20 + LED_S, // 15, S, k22 + LED_X, // 16, X, k24 + LED_LALT, // 17, Alt_L, k93 + LED_F3, // 18, F3, k31 + LED_3, // 19, 3, k37 + LED_E, // 20, E, k30 + LED_D, // 21, D, k32 + LED_C, // 22, C, k34 + LED_F4, // 23, F4, k33 + LED_4, // 24, 4, k47 + LED_R, // 25, R, k40 + LED_F, // 26, F, k42 + LED_V, // 27, V, k44 + LED_F5, // 28, F5, k07 + LED_5, // 29, 5, k46 + LED_T, // 30, T, k41 + LED_G, // 31, G, k43 + LED_B, // 32, B, k45 + LED_SPC, // 33, SPACE, k94 + LED_F6, // 34, F6, k63 + LED_6, // 35, 6, k56 + LED_Y, // 36, Y, k51 + LED_H, // 37, H, k53 + LED_N, // 38, N, k55 + LED_F7, // 39, F7, k71 + LED_7, // 40, 7, k57 + LED_U, // 41, U, k50 + LED_J, // 42, J, k52 + LED_M, // 43, M, k54 + LED_F8, // 44, F8, k76 + LED_8, // 45, 8, k67 + LED_I, // 46, I, k60 + LED_K, // 47, K, k62 + LED_COMM, // 48, ,, k64 + LED_RALT, // 49, Alt_R, k95 + LED_F9, // 50, F9, ka6 + LED_9, // 51, 9, k77 + LED_O, // 52, O, k70 + LED_L, // 53, L, k72 + LED_DOT, // 54, ., k74 + LED_FN, // 55, FN, k92 + LED_F10, // 56, F10, ka7 + LED_0, // 57, 0, k87 + LED_P, // 58, P, k80 + LED_SCLN, // 59, ;, k82 + LED_SLSH, // 60, ?, k85 + LED_F11, // 61, F11, ka3 + LED_MINS, // 62, -, k86 + LED_LBRC, // 63, [, k81 + LED_QUOT, // 64, ", k83 + LED_RCTL, // 65, Ct_R, k04 + LED_F12, // 66, F12, ka5 + LED_L1, // 67, LED, l01 + LED_R1, // 68, LED, l11 + LED_DEL, // 69, Prt, k97 -- remapped to DEL + LED_L2, // 70, LED, l02 + LED_R2, // 71, LED, l12 + LED_HOME, // 72, Del, k65 + LED_L3, // 73, LED, l03 + LED_R3, // 74, LED, l13 + LED_PGUP, // 75, PgUp, k15 + LED_L4, // 76, LED, l04 + LED_R4, // 77, LED, l14 + LED_EQL, // 78, =, k66 + LED_RGHT, // 79, Right, k05 + LED_L5, // 80, LED, l05 + LED_R5, // 81, LED, l15 + LED_END, // 82, End, k75 + LED_L6, // 83, LED, l06 + LED_R6, // 84, LED, l16 + LED_BSPC, // 85, BSpc, ka1 + LED_PGDN, // 86, PgDn, k25 + LED_L7, // 87, LED, l07 + LED_R7, // 88, LED, l17 + LED_RBRC, // 89, ], k61 + LED_RSFT, // 90, Sh_R, k91 + LED_L8, // 91, LED, l08 + LED_R8, // 92, LED, l18 + LED_BSLS, // 93, \, ka2 + LED_UP, // 94, Up, k35 + LED_LEFT, // 95, Left, k03 + LED_ENT, // 96, Enter, ka4 + LED_DOWN // 97, Down, k73 + }; + +const uint8_t LED_REGION_L_SIDE[] = {LED_L1, LED_L2, LED_L3, LED_L4, LED_L5, LED_L6, LED_L7,LED_L8}; +const uint8_t LED_REGION_R_SIDE[] = {LED_R1, LED_R2, LED_R3, LED_R4, LED_R5, LED_R6, LED_R7,LED_R8}; + + //const uint8_t LED_MATRIX[] = { + // LED_ESC, LED_F1, LED_F2, LED_F3, LED_F4, LED_F5, LED_F6, LED_F7, LED_F8, LED_F9, LED_F10, LED_F11, LED_F12, LED_DEL, + // LED_GRV, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, LED_BSPC, LED_HOME, + // LED_TAB, LED_Q, LED_W, LED_E, LED_R, LED_T, LED_Y, LED_U, LED_I, LED_O, LED_P, LED_LBRC, LED_RBRC, LED_BSLS, LED_PGUP, + // LED_CAPS, LED_A, LED_S, LED_D, LED_F, LED_G, LED_H, LED_J, LED_K, LED_L, LED_SCLN, LED_QUOT, LED_ENT, LED_PGDN, + // LED_LSFT, LED_Z, LED_X, LED_C, LED_V, LED_B, LED_N, LED_M, LED_COMM, LED_DOT, LED_SLSH, LED_RSFT, LED_UP, LED_END, + // LED_LCTL, LED_LWIN, LED_LALT, LED_SPC, LED_RALT, LED_FN, LED_RCTL, LED_LEFT, LED_DOWN, LED_RGHT + //}; + + const uint8_t LED_REGION_A[] = { + LED_ESC, LED_F9, LED_F10, LED_F11, LED_F12, LED_DEL, + LED_GRV, LED_1, LED_0, LED_MINS, LED_EQL, LED_BSPC, LED_HOME, + LED_TAB, LED_Q, LED_P, LED_LBRC, LED_RBRC, LED_BSLS, LED_PGUP, + LED_CAPS, LED_A, LED_SCLN, LED_QUOT, LED_ENT, LED_PGDN, + LED_LSFT, LED_Z, LED_SLSH, LED_RSFT, LED_UP, LED_END, + LED_LCTL, LED_LWIN, LED_LALT, LED_RCTL, LED_LEFT, LED_DOWN, LED_RGHT + }; + const uint8_t LED_REGION_B[] = { + LED_F1, LED_F2, LED_F3, LED_F4, LED_F5, LED_F6, LED_F7, LED_F8, + LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, + LED_W, LED_E, LED_R, LED_T, LED_Y, LED_U, LED_I, LED_O, + LED_S, LED_D, LED_F, LED_G, LED_H, LED_J, LED_K, LED_L, + LED_X, LED_C, LED_V, LED_B, LED_N, LED_M, LED_COMM, LED_DOT, + LED_SPC, LED_RALT, LED_FN + }; + + const uint8_t LED_REGION_NUMPAD[] = { + + LED_GRV, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, + LED_LBRC, LED_RBRC, + LED_ENT, + LED_DOT + + }; + + const uint8_t LED_REGION_OTHER[] = { + LED_ESC, LED_DEL, + LED_HOME, + + LED_A, LED_S, LED_D, + LED_END, + LED_LWIN + }; + + const uint8_t LED_REGION_CAPS[] = { + + LED_GRV, LED_1, + LED_TAB, LED_Q, + LED_CAPS, LED_A, + LED_LSFT, + LED_LCTL + }; + +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/rules.mk new file mode 100644 index 000000000000..4b7ed8bf0b9b --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/rules.mk @@ -0,0 +1,2 @@ +IDLE_TIMEOUT_ENABLE = yes +STARTUP_NUMLOCK_ON = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/config.h new file mode 100644 index 000000000000..6b06448f71fc --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/config.h @@ -0,0 +1,24 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 Cory Ginsberg (@coryginsberg) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +// #define TAPPING_TOGGLE 2 +// TT set to two taps + +#define TAPPING_TERM 250 +#define RGBLIGHT_DEFAULT_MODE SOLID_WHITE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c new file mode 100644 index 000000000000..41278868dbd6 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c @@ -0,0 +1,111 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 Cory Ginsberg (@coryginsberg) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +void dance_media(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + tap_code(KC_MPLY); + } else if (state->count == 2) { + tap_code(KC_MNXT); + } else if (state->count == 3) { + tap_code(KC_MPRV); + } else { + reset_tap_dance(state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for shift, twice for Caps Lock + [0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), + [1] = ACTION_TAP_DANCE_FN(dance_media)}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Alt_L Win_L SPACE Ct_R Alt_R FN Left Down Right + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, TO(1), + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(4), TO(2), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TD(1), TO(0), + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(4), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [2] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TD(1), TO(0), + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(4), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [3] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PPLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, KC_PENT, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_0, KC_DOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + [4] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TD(1), _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, XXXXXXX, XXXXXXX, RESET, RGB_MODE_FORWARD, + XXXXXXX, XXXXXXX, RGB_SAI, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MODE_REVERSE, + _______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, RGB_TOG, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK + ), + [5] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } + else { + tap_code(KC_VOLD); + } + return true; +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/readme.md new file mode 100644 index 000000000000..e4485215725e --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/readme.md @@ -0,0 +1,15 @@ +# Description +Mac and Windows profiles with special touches for the Mac profile. + +## Windows Profile +Should be nearly identical to the default profile for GMMK Pro. Only major difference is the button next to F12 is now PrintScreen and clicking the rotary dial switches profiles instead of muting. + +## Mac Profile +Besides the usual swapping of the alt and windows/cmd placement also changes the following: +* Double press shift to activate caps lock +* Capslock is escape +* Button next to F12: + * 1 press: play/pause + * 2 presses: skip + * 3 presses: previous +* Clicking Rotary Dial switches profiles diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/rules.mk new file mode 100644 index 000000000000..1dd6809223de --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +UNICODE_ENABLE = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/config.h new file mode 100644 index 000000000000..9ba8a7b1b791 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/config.h @@ -0,0 +1,6 @@ +// Copyright 2021 Jasper Chan (@Gigahawk) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_MATRIX_STARTUP_SPD 0 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c new file mode 100644 index 000000000000..8eedeb6e0053 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c @@ -0,0 +1,74 @@ +// Copyright 2021 Jasper Chan (@Gigahawk) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _GAME, + _TRAN, +}; + +#define _BASE_COLOR_RGB 156, 123, 85 +#define _GAME_COLOR_RGB 147, 21, 21 +#define _TRAN_COLOR_RGB 45, 89, 24 +#define _CAPS_COLOR_RGB 146, 140, 16 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_GAME] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_TRAN] = LAYOUT( + KC_CAPS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MPLY, _______, _______, _______, KC_MPRV, _______, KC_MNXT + ), + +}; +// clang-format on + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} + +void rgb_matrix_indicators_user(void) { + if (IS_LAYER_ON(_TRAN)) { + rgb_matrix_set_color_all(_TRAN_COLOR_RGB); + } else if (IS_LAYER_ON(_GAME)) { + rgb_matrix_set_color_all(_GAME_COLOR_RGB); + } else if (IS_LAYER_ON(_BASE)) { + rgb_matrix_set_color_all(_BASE_COLOR_RGB); + } + + if (host_keyboard_led_state().caps_lock) { + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; ++i) { + if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { + rgb_matrix_set_color(i, _CAPS_COLOR_RGB); + } + } + } +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/config.h new file mode 100644 index 000000000000..1438d317fbd2 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Andre Brait + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef RGB_MATRIX_ENABLE + #define RGB_DISABLE_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) + #define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c new file mode 100644 index 000000000000..19694d54c13f --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c @@ -0,0 +1,307 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 Andre Brait + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +#ifdef RGB_MATRIX_ENABLE + #ifndef RGB_CONFIRMATION_BLINKING_TIME + #define RGB_CONFIRMATION_BLINKING_TIME 2000 // 2 seconds + #endif +#endif // RGB_MATRIX_ENABLE + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Play/Pause) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_INS, _______, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + +}; +// clang-format on + +const key_override_t up_key_override = ko_make_basic(MOD_MASK_CTRL, KC_UP, KC_PGUP); +const key_override_t dn_key_override = ko_make_basic(MOD_MASK_CTRL, KC_DOWN, KC_PGDN); + +// This globally defines all key overrides to be used +const key_override_t **key_overrides = (const key_override_t *[]){ + &up_key_override, + &dn_key_override, + NULL // Null terminate the array of overrides! +}; +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif // ENCODER_ENABLE + +#ifdef RGB_MATRIX_ENABLE + +/* Renaming those to make the purpose on this keymap clearer */ +#define LED_FLAG_CAPS LED_FLAG_NONE +#define LED_FLAG_EFFECTS LED_FLAG_INDICATOR + +static void set_rgb_caps_leds(void); + +#if RGB_CONFIRMATION_BLINKING_TIME > 0 +static uint16_t effect_started_time = 0; +static uint8_t r_effect = 0x0, g_effect = 0x0, b_effect = 0x0; +static void start_effects(void); + +/* The higher this is, the slower the blinking will be */ +#ifndef TIME_SELECTED_BIT + #define TIME_SELECTED_BIT 8 +#endif +#if TIME_SELECTED_BIT < 0 || TIME_SELECTED_BIT >= 16 + #error "TIME_SELECTED_BIT must be a positive integer smaller than 16" +#endif +#define effect_red() r_effect = 0xFF, g_effect = 0x0, b_effect = 0x0 +#define effect_green() r_effect = 0x0, g_effect = 0xFF, b_effect = 0x0 +#endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + if (!rgb_matrix_is_enabled()) { + /* Turn ON the RGB Matrix for CAPS LOCK */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + rgb_matrix_enable(); + } + } else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + /* RGB Matrix was only ON because of CAPS LOCK. Turn it OFF. */ + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_disable(); + } + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + #ifdef NKRO_ENABLE + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + case NK_TOGG: + if (record->event.pressed) { + if (keymap_config.nkro) { + /* Turning NKRO OFF */ + effect_red(); + } else { + /* Turning NKRO ON */ + effect_green(); + } + start_effects(); + } + break; + case NK_ON: + if (record->event.pressed) { + if (!keymap_config.nkro) { + /* Turning NKRO ON */ + effect_green(); + start_effects(); + } + } + break; + case NK_OFF: + if (record->event.pressed) { + if (keymap_config.nkro) { + /* Turning NKRO OFF */ + effect_red(); + start_effects(); + } + } + break; + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + #endif // NKRO_ENABLE + case RGB_MOD: + case RGB_RMOD: + case RGB_HUI: + case RGB_HUD: + case RGB_SAI: + case RGB_SAD: + case RGB_VAI: + case RGB_VAD: + case RGB_SPI: + case RGB_SPD: + if (record->event.pressed) { + if (rgb_matrix_get_flags() != LED_FLAG_ALL) { + /* Ignore changes to RGB settings while only it's supposed to be OFF */ + return false; + } + } + break; + case RGB_TOG: + if (record->event.pressed) { + if (rgb_matrix_is_enabled()) { + switch (rgb_matrix_get_flags()) { + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + case LED_FLAG_EFFECTS: + #endif + case LED_FLAG_CAPS: + /* Turned ON because of EFFECTS or CAPS, is actually OFF */ + /* Change to LED_FLAG_ALL to signal it's really ON */ + rgb_matrix_set_flags(LED_FLAG_ALL); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + break; + case LED_FLAG_ALL: + /* Is actually ON */ + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + if (effect_started_time > 0) { + /* Signal EFFECTS */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + } else + #endif + if (host_keyboard_led_state().caps_lock) { + /* Signal CAPS */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + } + break; + } + } + } + break; + } + return true; +} + + +void rgb_matrix_indicators_user() { + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + if (effect_started_time > 0) { + /* Render blinking EFFECTS */ + const uint16_t deltaTime = sync_timer_elapsed(effect_started_time); + if (deltaTime <= RGB_CONFIRMATION_BLINKING_TIME) { + const uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01; + const uint8_t val_r = led_state * r_effect; + const uint8_t val_g = led_state * g_effect; + const uint8_t val_b = led_state * b_effect; + rgb_matrix_set_color_all(val_r, val_g, val_b); + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds(); + } + return; + } else { + /* EFFECTS duration is finished */ + effect_started_time = 0; + if (rgb_matrix_get_flags() == LED_FLAG_EFFECTS) { + /* It was turned ON because of EFFECTS */ + if (host_keyboard_led_state().caps_lock) { + /* CAPS is still ON. Demote to CAPS */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + } else { + /* There is nothing else keeping RGB enabled. Reset flags and turn if off. */ + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_disable_noeeprom(); + } + } + } + } + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + rgb_matrix_set_color_all(0x0, 0x0, 0x0); + } + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds(); + } +} + +#if RGB_CONFIRMATION_BLINKING_TIME > 0 +static void start_effects() { + effect_started_time = sync_timer_read(); + if (!rgb_matrix_is_enabled()) { + /* Turn it ON, signal the cause (EFFECTS) */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + rgb_matrix_enable_noeeprom(); + } else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + /* It's already ON, promote the cause from CAPS to EFFECTS */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + } +} +#endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + +// RGB led number layout, function of the key + +// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12 +// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13 +// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14 +// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15 +// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16 +// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17 +// 87, led 07 88, led 18 +// 91, led 08 92, led 19 + +static void set_rgb_caps_leds() { + rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1 + rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1 + rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2 + rgb_matrix_set_color(71, 0xFF, 0x0, 0x0); // Right side LED 2 + rgb_matrix_set_color(73, 0xFF, 0x0, 0x0); // Left side LED 3 + rgb_matrix_set_color(74, 0xFF, 0x0, 0x0); // Right side LED 3 + rgb_matrix_set_color(76, 0xFF, 0x0, 0x0); // Left side LED 4 + rgb_matrix_set_color(77, 0xFF, 0x0, 0x0); // Right side LED 4 + rgb_matrix_set_color(80, 0xFF, 0x0, 0x0); // Left side LED 5 + rgb_matrix_set_color(81, 0xFF, 0x0, 0x0); // Right side LED 5 + rgb_matrix_set_color(83, 0xFF, 0x0, 0x0); // Left side LED 6 + rgb_matrix_set_color(84, 0xFF, 0x0, 0x0); // Right side LED 6 + rgb_matrix_set_color(87, 0xFF, 0x0, 0x0); // Left side LED 7 + rgb_matrix_set_color(88, 0xFF, 0x0, 0x0); // Right side LED 7 + rgb_matrix_set_color(91, 0xFF, 0x0, 0x0); // Left side LED 8 + rgb_matrix_set_color(92, 0xFF, 0x0, 0x0); // Right side LED 8 + rgb_matrix_set_color(3, 0xFF, 0x0, 0x0); // CAPS LED +} + +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/readme.md new file mode 100644 index 000000000000..bc8c580dbb87 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/readme.md @@ -0,0 +1,26 @@ +# hachetmans's GMMK Pro layout + +This is pretty much the stock layout with a few things moved around. +It basically reflects my needs for both Delete and Insert being readily available for coding, as well as a full Home/PgUp/PgDwn/End column. + +The differences are as follows: + +- Disabled Mouse Keys (to fix issues with KVM switches and also because they're not used here anyway) +- Short DEBOUNCE time (5 ms) +- Per-key debounce algorithm (sym_defer_pk) +- RGB turns off after 20 minutes of inactivity +- RGB turns off when USB is suspended +- Layer 0: + - Print Screen (default) -> Delete + - Delete (default) -> Home +- Layer 1 (accessed by pressing Fn): + - Fn + Delete -> Insert + - Fn + Home -> Print Screen +- override CTRL + UP -> PGUP +- override CTRL + DOWN -> PGDN + +This keymap also includes CAPS LOCK ON indicator.\ +All left and right side LEDs, and the Caps key LED will turn solid red while CAPS LOCK is ON. + +No other changes have been made. \ +The other keys on each layer have been kept intact. diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/rules.mk new file mode 100644 index 000000000000..9995f3f4d230 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/rules.mk @@ -0,0 +1,5 @@ +# Enable additional features. + +DEBOUNCE_TYPE = sym_defer_pk +MOUSEKEY_ENABLE = no +KEY_OVERRIDE_ENABLE = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c new file mode 100644 index 000000000000..cfca7960ca41 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) + // ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del + // Tab Q W E R T Y U I O P [ ] \ PgUp + // Caps A S D F G H J K L ; " Enter PgDn + // Sh_L Z X C V B N M , . ? Sh_R Up End + // Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RESET, KC_RGUI, _______, _______, _______, _______, _______ + ), + + +}; + + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } + else { + tap_code(KC_VOLD); + } + return true; +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/config.h new file mode 100644 index 000000000000..ed78f99eca3f --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/config.h @@ -0,0 +1,39 @@ +/* Copyright 2021 Jonavin Eng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define TAPPING_TOGGLE 2 +// TT set to two taps + +/* Handle GRAVESC combo keys */ +#define GRAVE_ESC_ALT_OVERRIDE + //Always send Escape if Alt is pressed +#define GRAVE_ESC_CTRL_OVERRIDE + //Always send Escape if Control is pressed + +#define TAPPING_TERM 180 + +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR + #define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif + +// add fifth layer for colemak -- set "COLEMAK_LAYER_ENABLE = yes" in rules.mk to enable +#if defined COLEMAK_LAYER_ENABLE + #define DYNAMIC_KEYMAP_LAYER_COUNT 5 + #define _COLEMAK 4 +#endif // COLEMAK_LAYER_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c new file mode 100644 index 000000000000..0d318885f482 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c @@ -0,0 +1,209 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 Jonavin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "rgb_matrix_map.h" +#include "jonavin.h" + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Ins Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + [_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + TT(_LOWER), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFTCAPSWIN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT( + _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_CALC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, + _______, _______, RGB_VAI, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RESET, KC_HOME, + KC_CAPS, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, RGB_NITE,RGB_HUI, _______, _______, _______, KC_NLCK, _______, RGB_TOD, RGB_TOI, _______, _______, RGB_MOD, _______, + _______, KC_WINLCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + [_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, _______, _______, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PDOT, _______, _______, _______, KC_HOME, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_P1, KC_P2, KC_P3, KC_NO, KC_PAST, KC_PENT, KC_END, + _______, KC_NO, KC_DEL, KC_INS, KC_NO, KC_NO, KC_NO, KC_P0, KC_00, KC_PDOT, KC_PSLS, _______, RCTL(KC_PGUP), _______, + _______, _______, _______, KC_BSPC, _______, _______, _______, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT) + ), + + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +#ifdef COLEMAK_LAYER_ENABLE + [_COLEMAK] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + TT(_LOWER), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFTCAPSWIN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +#endif // COLEMAK_LAYER_ENABLE +}; + +#if defined(ENCODER_ENABLE) && !defined(ENCODER_DEFAULTACTIONS_ENABLE) // Encoder Functionality when not using userspace defaults + void encoder_action_rgbhue(bool clockwise) { + if (clockwise) + rgblight_increase_hue_noeeprom(); + else + rgblight_decrease_hue_noeeprom(); + } + + bool encoder_update_user(uint8_t index, bool clockwise) { + uint8_t mods_state = get_mods(); + if (mods_state & MOD_BIT(KC_LSFT) ) { // If you are holding L shift, encoder changes layers + encoder_action_layerchange(clockwise); + } else if (mods_state & MOD_BIT(KC_RSFT) ) { // If you are holding R shift, Page up/dn + unregister_mods(MOD_BIT(KC_RSFT)); + encoder_action_navpage(clockwise); + register_mods(MOD_BIT(KC_RSFT)); + } else if (mods_state & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate next/prev word + encoder_action_navword(clockwise); + } else if (mods_state & MOD_BIT(KC_RCTL)) { // if holding Right Ctrl, change rgb hue/colour + encoder_action_rgbhue(clockwise); + } else if (mods_state & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media next/prev track + encoder_action_mediatrack(clockwise); + } else { + switch(get_highest_layer(layer_state)) { + case _FN1: + #ifdef IDLE_TIMEOUT_ENABLE + timeout_update_threshold(clockwise); + #endif + break; + default: + encoder_action_volume(clockwise); // Otherwise it just changes volume + break; + } + } + return true; + } +#endif // ENCODER_ENABLE && !ENCODER_DEFAULTACTIONS_ENABLE + +#ifdef RGB_MATRIX_ENABLE + // Capslock, Scroll lock and Numlock indicator on Left side lights. + void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); + if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) { + rgb_matrix_set_color(LED_L1, RGB_GREEN); + rgb_matrix_set_color(LED_L2, RGB_GREEN); + } + + #ifdef INVERT_NUMLOCK_INDICATOR + if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF + rgb_matrix_set_color(LED_L3, RGB_MAGENTA); + rgb_matrix_set_color(LED_L4, RGB_MAGENTA); + } + #else + if (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // Normal, on if NUM lock is ON + rgb_matrix_set_color(LED_L3, RGB_MAGENTA); + rgb_matrix_set_color(LED_L4, RGB_MAGENTA); + } + #endif // INVERT_NUMLOCK_INDICATOR + + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(LED_L5, RGB_RED); + rgb_matrix_set_color(LED_L6, RGB_RED); + rgb_matrix_set_color(LED_L7, RGB_RED); + } + if (keymap_config.no_gui) { + rgb_matrix_set_color(LED_LWIN, RGB_RED); //light up Win key when disabled + } + switch(get_highest_layer(layer_state)){ // special handling per layer + case _FN1: // on Fn layer select what the encoder does when pressed + rgb_matrix_set_color(LED_R2, RGB_RED); + rgb_matrix_set_color(LED_R3, RGB_RED); + rgb_matrix_set_color(LED_R4, RGB_RED); + rgb_matrix_set_color(LED_FN, RGB_RED); //FN key + + // Add RGB Timeout Indicator -- shows 0 to 139 using F row and num row; larger numbers using 16bit code + uint16_t timeout_threshold = get_timeout_threshold(); + if (timeout_threshold <= 10) rgb_matrix_set_color(LED_LIST_FUNCROW[timeout_threshold], RGB_RED); + else if (timeout_threshold < 140) { + rgb_matrix_set_color(LED_LIST_FUNCROW[(timeout_threshold / 10)], RGB_RED); + rgb_matrix_set_color(LED_LIST_NUMROW[(timeout_threshold % 10)], RGB_RED); + } else { // >= 140 minutes, just show these 3 lights + rgb_matrix_set_color(LED_LIST_NUMROW[10], RGB_RED); + rgb_matrix_set_color(LED_LIST_NUMROW[11], RGB_RED); + rgb_matrix_set_color(LED_LIST_NUMROW[12], RGB_RED); + } + break; + case _LOWER: + for (uint8_t i=0; i or encoder + - setting to zero disables timeout + - indicators in FN layer using RGB in FN and number rows to show the timeout in minutes + - LED address location map as enum definition in rgb_matrix_map.h + - LED group lists for arrows, numpad, F row, num row, left and right side LEDs + - default startup in single mode with default colour + - Capslock, Scroll Lock, and Num Lock (not set) indicator on left side LED + - Layer indicator on right side LED + - Fn key light up red when Fn layer activate + - Win Key light up red when Win Lock mode enabled + - Layer 2 activation lights up Numpad area + - Fn + Z to turn off all RGB lights except rgb indicators; press again to toggle + +rules.mk OPTIONS - Active features from userspace +STARTUP_NUMLOCK_ON = yes + - turns on NUMLOCK by default + +ENCODER_DEFAULTACTIONS_ENABLE = yes + - Enabled default encoder funtions + +TD_LSFT_CAPSLOCK_ENABLE = yes + - This will enable double tap on Left Shift to toggle CAPSLOCK when using KC_LSFTCAPS + +IDLE_TIMEOUT_ENABLE = yes + - Enables Timer functionality; for RGB idle timeouts that can be changed dynamically + +INVERT_NUMLOCK_INDICATOR + - inverts the Num lock indicator, LED is on when num lokc is off + +COLEMAK_LAYER_ENABLE = yes + - Enabled optional 5th layer for COLEMAK layout + - Use Shift and encoder to enter 5th layer, right led indicator lights up BLUE + +## All layers diagram +Default layer +![image](https://user-images.githubusercontent.com/71780717/124177658-82324880-da7e-11eb-9421-b69100131062.png) + +Fn Layer +![image](https://user-images.githubusercontent.com/71780717/131255937-06c9691b-835f-4c94-93e6-6d1dc3de272b.png) + +Layer 2 (Caps Lock Mod) +![image](https://user-images.githubusercontent.com/71780717/124177683-8b231a00-da7e-11eb-9434-e2475f679a54.png) + +Optional COLEMAK layer +![image](https://user-images.githubusercontent.com/71780717/131235050-980d2f54-2d23-4ae8-a83f-9fcdbe60d6cb.png) diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/rgb_matrix_map.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/rgb_matrix_map.h new file mode 100644 index 000000000000..1ee53889054e --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/rgb_matrix_map.h @@ -0,0 +1,144 @@ +/* Copyright 2021 Jonavin Eng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifdef RGB_MATRIX_ENABLE + + // Custom RGB Colours + #define RGB_GODSPEED 0x00, 0xE4, 0xFF // colour for matching keycaps + #define RGB_NAUTILUS 0x00, 0xA4, 0xA9 // Naurilus Font colours + + // RGB LED locations + enum led_location_map { + LED_ESC, // 0, ESC, k13 + LED_GRV, // 1, ~, k16 + LEB_TAB, // 2, Tab, k11 + LED_CAPS, // 3, Caps, k21 + LED_LSFT, // 4, Sh_L, k00 + LED_LCTL, // 5, Ct_L, k06 + LED_F1, // 6, F1, k26 + LED_1, // 7, 1, k17 + LED_Q, // 8, Q, k10 + LED_A, // 9, A, k12 + LED_Z, // 10, Z, k14 + LED_LWIN, // 11, Win_L, k90 + LED_F2, // 12, F2, k36 + LED_2, // 13, 2, k27 + LED_W, // 14, W, k20 + LED_S, // 15, S, k22 + LED_X, // 16, X, k24 + LED_LALT, // 17, Alt_L, k93 + LED_F3, // 18, F3, k31 + LED_3, // 19, 3, k37 + LED_E, // 20, E, k30 + LED_D, // 21, D, k32 + LED_C, // 22, C, k34 + LED_F4, // 23, F4, k33 + LED_4, // 24, 4, k47 + LED_R, // 25, R, k40 + LED_F, // 26, F, k42 + LED_V, // 27, V, k44 + LED_F5, // 28, F5, k07 + LED_5, // 29, 5, k46 + LED_T, // 30, T, k41 + LED_G, // 31, G, k43 + LED_B, // 32, B, k45 + LED_SPC, // 33, SPACE, k94 + LED_F6, // 34, F6, k63 + LED_6, // 35, 6, k56 + LED_Y, // 36, Y, k51 + LED_H, // 37, H, k53 + LED_N, // 38, N, k55 + LED_F7, // 39, F7, k71 + LED_7, // 40, 7, k57 + LED_U, // 41, U, k50 + LED_J, // 42, J, k52 + LED_M, // 43, M, k54 + LED_F8, // 44, F8, k76 + LED_8, // 45, 8, k67 + LED_I, // 46, I, k60 + LED_K, // 47, K, k62 + LED_COMM, // 48, ,, k64 + LED_RALT, // 49, Alt_R, k95 + LED_F9, // 50, F9, ka6 + LED_9, // 51, 9, k77 + LED_O, // 52, O, k70 + LED_L, // 53, L, k72 + LED_DOT, // 54, ., k74 + LED_FN, // 55, FN, k92 + LED_F10, // 56, F10, ka7 + LED_0, // 57, 0, k87 + LED_P, // 58, P, k80 + LED_SCLN, // 59, ;, k82 + LED_SLSH, // 60, ?, k85 + LED_F11, // 61, F11, ka3 + LED_MINS, // 62, -, k86 + LED_LBRC, // 63, [, k81 + LED_QUOT, // 64, ", k83 + LED_RCTL, // 65, Ct_R, k04 + LED_F12, // 66, F12, ka5 + LED_L1, // 67, LED, l01 + LED_R1, // 68, LED, l11 + LED_INS, // 69, Prt, k97 -- remapped to INS + LED_L2, // 70, LED, l02 + LED_R2, // 71, LED, l12 + LED_DEL, // 72, Del, k65 + LED_L3, // 73, LED, l03 + LED_R3, // 74, LED, l13 + LED_PGUP, // 75, PgUp, k15 + LED_L4, // 76, LED, l04 + LED_R4, // 77, LED, l14 + LED_EQL, // 78, =, k66 + LED_RIGHT, // 79, Right, k05 + LED_L5, // 80, LED, l05 + LED_R5, // 81, LED, l15 + LED_END, // 82, End, k75 + LED_L6, // 83, LED, l06 + LED_R6, // 84, LED, l16 + LED_BSPC, // 85, BSpc, ka1 + LED_PGDN, // 86, PgDn, k25 + LED_L7, // 87, LED, l07 + LED_R7, // 88, LED, l17 + LED_RBRC, // 89, ], k61 + LED_RSFT, // 90, Sh_R, k91 + LED_L8, // 91, LED, l08 + LED_R8, // 92, LED, l18 + LED_BSLS, // 93, \, ka2 + LED_UP, // 94, Up, k35 + LED_LEFT, // 95, Left, k03 + LED_ENT, // 96, Enter, ka4 + LED_DOWN // 97, Down, k73 + }; + + const uint8_t LED_LIST_WASD[] = { LED_W, LED_A, LED_S, LED_D }; + + const uint8_t LED_LIST_ARROWS[] = { LED_LEFT, LED_RIGHT, LED_UP, LED_DOWN }; + + const uint8_t LED_LIST_FUNCROW[] = { LED_ESC, LED_F1, LED_F2, LED_F3, LED_F4, LED_F5, LED_F6, LED_F7, LED_F8, LED_F9, LED_F10, LED_F11, LED_F12, LED_INS}; + + const uint8_t LED_LIST_NUMROW[] = { LED_GRV, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, LED_BSPC, LED_DEL}; + + const uint8_t LED_LIST_NUMPAD[] = { + LED_7, LED_8, LED_9, + LED_U, LED_I, LED_O, + LED_J, LED_K, LED_L, + LED_M, LED_COMM, LED_DOT + }; + + const uint8_t LED_SIDE_LEFT[] = { LED_L1, LED_L2, LED_L3, LED_L4, LED_L5, LED_L6, LED_L7, LED_L8}; + + const uint8_t LED_SIDE_RIGHT[] = { LED_R1, LED_R2, LED_R3, LED_R4, LED_R5, LED_R6, LED_R7, LED_R8}; + +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/rules.mk new file mode 100644 index 000000000000..1ffc2058a262 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/rules.mk @@ -0,0 +1,12 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite + +TD_LSFT_CAPSLOCK_ENABLE = yes +IDLE_TIMEOUT_ENABLE = yes +STARTUP_NUMLOCK_ON = yes +ENCODER_DEFAULTACTIONS_ENABLE = no + +COLEMAK_LAYER_ENABLE = yes #Enable Colemak layer / set to no to disable +INVERT_NUMLOCK_INDICATOR = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/config.h new file mode 100644 index 000000000000..74c018f7f146 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Lalit Maganti + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define RGB_DISABLE_WHEN_USB_SUSPENDED \ No newline at end of file diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c new file mode 100644 index 000000000000..7bedf059877c --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c @@ -0,0 +1,91 @@ +/* Copyright 2021 Lalit Maganti + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +#ifdef PROGRAMMABLE_BUTTON_ENABLE +#define L1_NUM1 PROGRAMMABLE_BUTTON_1 +#define L1_NUM2 PROGRAMMABLE_BUTTON_2 +#define L1_NUM3 PROGRAMMABLE_BUTTON_3 +#define L1_NUM4 PROGRAMMABLE_BUTTON_4 +#define L1_NUM5 PROGRAMMABLE_BUTTON_5 +#define L1_NUM6 PROGRAMMABLE_BUTTON_6 +#define L1_NUM7 PROGRAMMABLE_BUTTON_7 +#define L1_NUM8 PROGRAMMABLE_BUTTON_8 +#define L1_NUM9 PROGRAMMABLE_BUTTON_9 +#else +#define L1_NUM1 _______ +#define L1_NUM2 _______ +#define L1_NUM3 _______ +#define L1_NUM4 _______ +#define L1_NUM5 _______ +#define L1_NUM6 _______ +#define L1_NUM7 _______ +#define L1_NUM8 _______ +#define L1_NUM9 _______ +#endif + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, RGB_TOG, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + return false; +} + + +#ifdef RGB_MATRIX_ENABLE + +static void set_rgb_side_leds(void); + +static void set_rgb_side_leds() { + rgb_matrix_set_color(67, RGB_WHITE); // Left side LED 1 + rgb_matrix_set_color(68, RGB_WHITE); // Right side LED 1 + rgb_matrix_set_color(91, RGB_WHITE); // Left side LED 8 + rgb_matrix_set_color(92, RGB_WHITE); // Right side LED 8 +} + +void rgb_matrix_indicators_user() { + rgb_matrix_set_color_all(0x0, 0x0, 0x0); + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(3, RGB_WHITE); // CAPS + } + set_rgb_side_leds(); +} + +#endif \ No newline at end of file diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/rules.mk new file mode 100644 index 000000000000..0a5b666e8557 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = no diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/leviport/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/leviport/keymap.c new file mode 100644 index 000000000000..a61a4dbc7fa5 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/leviport/keymap.c @@ -0,0 +1,106 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + + /* Layer 0, Dvorak + ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute) + ~ 1 2 3 4 5 6 7 8 9 0 [ ] BackSpc Home + Tab " , . P Y F G C R L ? = \ PgUp + LCTL A O E U I D H T N S - Enter PgDn + LSFT ; Q J K X B M W V Z Sh_R Up End + MO(2) LALT LGUI SPACE RCTL MENU MO(2) Left Down Right + */ + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGUP, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGDN, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_END, + MO(2), KC_LALT, KC_LGUI, KC_SPC, KC_RCTL, KC_MENU, MO(2), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1, QWERTY + ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute) + ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del + Tab Q W E R T Y U I O P [ ] \ PgUp + LCTL A S D F G H J K L ; " Enter PgDn + LSFT Z X C V B N M , . ? Sh_R Up End + MO(2) LALT LGUI SPACE RCTL MENU MO(2) Left Down Right + */ + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + MO(2), KC_LALT, KC_LGUI, KC_SPC, KC_RCTL, KC_MENU, MO(2), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 2, misc + ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) + ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del + Tab Q W E R T Y U I O P [ ] \ PgUp + Caps A S D F G H J K L ; " Enter PgDn + Sh_L Z X C V B N M , . ? Sh_R Up End + Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + */ + [2] = LAYOUT( + _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_MPLY, + _______, RGB_TOG, RGB_VAI, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, KC_MPRV, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; +// clang-format on + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif // ENCODER_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/leviport/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/leviport/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/leviport/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/config.h new file mode 100644 index 000000000000..799c5d95932c --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/config.h @@ -0,0 +1,80 @@ +/* Copyright 2021 zvuc + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// At the time of this, there are 41 effects! That may be a bit too many to cycle through - keeping what I believe is the best. +#ifdef RGB_MATRIX_ENABLE + #define RGB_DISABLE_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) + +// #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR + +// Below added per: https://beta.docs.qmk.fm/using-qmk/hardware-features/lighting/feature_rgb_matrix#suspended-state-id-suspended-state + #define RGB_DISABLE_WHEN_USB_SUSPENDED + +// Effects + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap, Rain + #define RGB_MATRIX_KEYPRESSES // REACTIVE, SPLASH modes + + // Disable effects you don't like. + // Soon, you'll have to explicitly enable effects you want: https://github.com/qmk/qmk_firmware/pull/13758 + // #define DISABLE_RGB_MATRIX_SOLID_COLOR, // Static single hue, no speed support + // #define DISABLE_RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue + // #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes + // #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT, // Static gradient left to right, speed controls how much gradient changes + // #define DISABLE_RGB_MATRIX_BREATHING, // Single hue brightness cycling animation + // #define DISABLE_RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right + // #define DISABLE_RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right + // #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT, // Single hue 3 blade spinning pinwheel fades saturation + // #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL, // Single hue 3 blade spinning pinwheel fades brightness + // #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT, // Single hue spinning spiral fades saturation + // #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL, // Single hue spinning spiral fades brightness + // #define DISABLE_RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient + // #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right + // #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom + // #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in + // #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in + // #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right + // #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL, // Full gradient spinning pinwheel around center of keyboard + // #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard + // #define DISABLE_RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard + // #define DISABLE_RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard + // #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard + // #define DISABLE_RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue + // #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation + // #define DISABLE_RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back + // #define DISABLE_RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight ammount in a wave to the right, then back to the left + // #define DISABLE_RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right + + // Framebuffer effects + // #define DISABLE_RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM! + // #define DISABLE_RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation + + // Reactive effects + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out + // #define DISABLE_RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out + // #define DISABLE_RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out + // #define DISABLE_RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out + // #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH, // Hue & value pulse away from multiple key hits then fades value out + +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c new file mode 100644 index 000000000000..1f8c47306ad2 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c @@ -0,0 +1,448 @@ +/* Copyright 2021 Glorious, LLC + + GMMK Pro Standard keymap for macOS + by zvuc + + with code snippets from + Andre Brait , stickandgum + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +enum my_keycodes { + KC_MSCTRL = SAFE_RANGE, + KC_LNPD, + LED_TLDE, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0, + LED_MINS, + LED_EQL +}; + +#ifdef RGB_MATRIX_ENABLE + #ifndef RGB_CONFIRMATION_BLINKING_TIME + #define RGB_CONFIRMATION_BLINKING_TIME 2000 // 2 seconds + #endif +#endif // RGB_MATRIX_ENABLE + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Eject Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up F13 +// Ct_L Opt_L Cmd_L SPACE Cmd_R Opt_R FN Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + [0] = LAYOUT( + KC_ESC, KC_BRID, KC_BRIU, KC_MSCTRL, KC_LNPD, RGB_VAD, RGB_VAI, KC_F7, KC_F8, KC_MRWD, KC_MPLY, KC_MFFD, KC_F12, KC_EJCT, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_F13, + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, KC_ROPT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_TOG, + LED_TLDE, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, _______, KC_PSCR, + _______, RGB_HUI, RGB_VAI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, RGB_HUD, RGB_VAD, RGB_SAD, TG(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + // This is an alternative togglable layer to change default function row to standard F keys + [2] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F24, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + +}; +// clang-format on + +#ifdef ENCODER_ENABLE + bool encoder_update_user(uint8_t index, bool clockwise) { + // https://beta.docs.qmk.fm/using-qmk/simple-keycodes/feature_advanced_keycodes#alt-escape-for-alt-tab-id-alt-escape-for-alt-tab + if (get_mods() & MOD_MASK_CTRL) { // If CTRL is held + uint8_t mod_state = get_mods(); // Store all modifiers that are held + unregister_mods(MOD_MASK_CTRL); // Immediately unregister the CRTL key (don't send CTRL-PgDn) - del_mods doesn't work here (not immediate) + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + set_mods(mod_state); // Add back in the CTRL key - so ctrl-key will work if ctrl was never released after paging. + } else if (get_mods() & MOD_MASK_ALT) { + uint8_t mod_state = get_mods(); + unregister_mods(MOD_MASK_ALT); + if (clockwise) { + rgblight_increase_sat(); + } else { + rgblight_decrease_sat(); + } + set_mods(mod_state); + } else if (get_mods() & MOD_MASK_GUI) { + uint8_t mod_state = get_mods(); + unregister_mods(MOD_MASK_GUI); + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + set_mods(mod_state); + } else if (get_mods() & MOD_MASK_SHIFT) { + uint8_t mod_state = get_mods(); + unregister_mods(MOD_MASK_SHIFT); + if (clockwise) { + rgblight_increase_speed(); + } else { + rgblight_decrease_speed(); + } + set_mods(mod_state); + } else if (clockwise) { // All else volume. + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; + } +#endif //ENCODER_ENABLE + +#ifdef RGB_MATRIX_ENABLE + + // Called on powerup and is the last _init that is run. + void keyboard_post_init_user(void) { + + int mods[35] = {0,2,3,4,5,11,17,33,49,55,65,95,97,79,94,85,93,96,90,69,92,67,76,80,91,75,86,68,77,81,92,28,34,39,44}; + int j; + + /* output each array element's value */ + for (j = 0; j < 35; j++ ) { + g_led_config.flags[mods[j]] = LED_FLAG_MODIFIER; + } + + if (!rgb_matrix_is_enabled()) { + rgb_matrix_enable(); + #ifdef CONSOLE_ENABLE + uprintf("ERROR! RGB Matrix Enabled and wrote to EEPROM! -How was the RGB Matrix Disabled?"); + #endif + } + } + + /* Renaming those to make the purpose on this keymap clearer */ + #define LED_FLAG_CAPS LED_FLAG_NONE + #define LED_FLAG_EFFECTS LED_FLAG_INDICATOR + + static void set_rgb_caps_leds(void); + + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + static uint16_t effect_started_time = 0; + static uint8_t r_effect = 0x0, g_effect = 0x0, b_effect = 0x0; + static void start_effects(void); + + /* The higher this is, the slower the blinking will be */ + #ifndef TIME_SELECTED_BIT + #define TIME_SELECTED_BIT 8 + #endif + #if TIME_SELECTED_BIT < 0 || TIME_SELECTED_BIT >= 16 + #error "TIME_SELECTED_BIT must be a positive integer smaller than 16" + #endif + #define effect_red() r_effect = 0xFF, g_effect = 0x0, b_effect = 0x0 + #define effect_green() r_effect = 0x0, g_effect = 0xFF, b_effect = 0x0 + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + + bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + if (!rgb_matrix_is_enabled()) { + /* Turn ON the RGB Matrix for CAPS LOCK */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + rgb_matrix_enable(); + } + } else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + /* RGB Matrix was only ON because of CAPS LOCK. Turn it OFF. */ + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_disable(); + } + return true; + } + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // https://github.com/qmk/qmk_firmware/issues/10111 + case KC_MSCTRL: + if (record->event.pressed) { + host_consumer_send(0x29F); + } else { + host_consumer_send(0); + } + return false; /* Skip all further processing of this key */ + + case KC_LNPD: + if (record->event.pressed) { + host_consumer_send(0x2A0); + } else { + host_consumer_send(0); + } + return false; /* Skip all further processing of this key */ + + #ifdef NKRO_ENABLE + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + case NK_TOGG: + if (record->event.pressed) { + if (keymap_config.nkro) { + /* Turning NKRO OFF */ + effect_red(); + } else { + /* Turning NKRO ON */ + effect_green(); + } + start_effects(); + } + break; + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + #endif // NKRO_ENABLE + + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + case TG(2): + if (record->event.pressed) { + if (IS_LAYER_OFF(2)) { + effect_red(); + } else { + effect_green(); + } + start_effects(); + } + break; + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + + /* LED quick preset keys assignments */ + case LED_TLDE: + rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); // Can use RGB_M_P built-in keycode instead. + break; + case LED_1: + rgb_matrix_mode(RGB_MATRIX_ALPHAS_MODS); + break; + case LED_2: + rgb_matrix_mode(RGB_MATRIX_GRADIENT_UP_DOWN); + break; + case LED_3: + rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS); + break; + case LED_4: + rgb_matrix_mode(RGB_MATRIX_BAND_SAT); + break; + case LED_5: + rgb_matrix_mode(RGB_MATRIX_BAND_VAL); + break; + case LED_6: + rgb_matrix_mode(RGB_MATRIX_BAND_SPIRAL_VAL); + break; + case LED_7: + rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); // Can use RGB_M_R built-in keycode instead. + break; + case LED_8: + rgb_matrix_mode(RGB_MATRIX_CYCLE_PINWHEEL); // Can use RGB_M_SW built-in keycode instead. + break; + case LED_9: + rgb_matrix_mode(RGB_MATRIX_BREATHING); // Can use RGB_M_B built-in keycode instead. + break; + + #ifdef RGB_MATRIX_KEYPRESSES // Reactive effects require RGB_MATRIX_KEYPRESSES in config.h + case LED_0: + rgb_matrix_mode(RGB_MATRIX_SOLID_REACTIVE_WIDE); + break; + #endif //RGB_MATRIX_KEYPRESSES + + #ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap and Rain require #define RGB_MATRIX_FRAMEBUFFER_EFFECTS in config.h + case LED_MINS: + rgb_matrix_mode(RGB_MATRIX_DIGITAL_RAIN); + break; + case LED_EQL: + rgb_matrix_mode(RGB_MATRIX_TYPING_HEATMAP); + break; + #endif //RGB_MATRIX_FRAMEBUFFER_EFFECTS + + + // case RGB_MOD: + // case RGB_RMOD: + // case RGB_HUI: + // case RGB_HUD: + // case RGB_SAI: + // case RGB_SAD: + // case RGB_VAI: + // case RGB_VAD: + // case RGB_SPI: + case RGB_SPD: + if (record->event.pressed) { + if (rgb_matrix_get_flags() != LED_FLAG_ALL) { + /* Ignore changes to RGB settings while only it's supposed to be OFF */ + return false; + } + } + break; + + case RGB_TOG: + // if (record->event.pressed) { + // if (rgb_matrix_get_flags() == LED_FLAG_ALL) { + // rgb_matrix_set_flags(LED_FLAG_NONE); + // rgb_matrix_set_color_all(0, 0, 0); + // } else { + // rgb_matrix_set_flags(LED_FLAG_ALL); + // } + // } + // return false; + if (record->event.pressed) { + if (rgb_matrix_is_enabled()) { + switch (rgb_matrix_get_flags()) { + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + case LED_FLAG_EFFECTS: + #endif + case LED_FLAG_CAPS: + /* Turned ON because of EFFECTS or CAPS, is actually OFF */ + /* Change to LED_FLAG_ALL to signal it's really ON */ + rgb_matrix_set_flags(LED_FLAG_ALL); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + break; + case LED_FLAG_ALL: + /* Is actually ON */ + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + if (effect_started_time > 0) { + /* Signal EFFECTS */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + } else + #endif + if (host_keyboard_led_state().caps_lock) { + /* Signal CAPS */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + } + break; + } + } + } + break; + + } + return true; + } + + + void rgb_matrix_indicators_user() { + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + if (effect_started_time > 0) { + /* Render blinking EFFECTS */ + uint16_t deltaTime = sync_timer_elapsed(effect_started_time); + if (deltaTime <= RGB_CONFIRMATION_BLINKING_TIME) { + uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01; + uint8_t val_r = led_state * r_effect; + uint8_t val_g = led_state * g_effect; + uint8_t val_b = led_state * b_effect; + rgb_matrix_set_color_all(val_r, val_g, val_b); + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds(); + } + return; + } else { + /* EFFECTS duration is finished */ + effect_started_time = 0; + if (rgb_matrix_get_flags() == LED_FLAG_EFFECTS) { + /* It was turned ON because of EFFECTS */ + if (host_keyboard_led_state().caps_lock) { + /* CAPS is still ON. Demote to CAPS */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + } else { + /* There is nothing else keeping RGB enabled. Reset flags and turn if off. */ + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_disable_noeeprom(); + } + } + } + } + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + rgb_matrix_set_color_all(0x0, 0x0, 0x0); + } + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds(); + } + } + + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + static void start_effects() { + effect_started_time = sync_timer_read(); + if (!rgb_matrix_is_enabled()) { + /* Turn it ON, signal the cause (EFFECTS) */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + rgb_matrix_enable_noeeprom(); + } else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + /* It's already ON, promote the cause from CAPS to EFFECTS */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + } + } + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + + static void set_rgb_caps_leds() { + rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1 + rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1 + rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2 + rgb_matrix_set_color(71, 0xFF, 0x0, 0x0); // Right side LED 2 + rgb_matrix_set_color(73, 0xFF, 0x0, 0x0); // Left side LED 3 + rgb_matrix_set_color(74, 0xFF, 0x0, 0x0); // Right side LED 3 + rgb_matrix_set_color(76, 0xFF, 0x0, 0x0); // Left side LED 4 + rgb_matrix_set_color(77, 0xFF, 0x0, 0x0); // Right side LED 4 + rgb_matrix_set_color(80, 0xFF, 0x0, 0x0); // Left side LED 5 + rgb_matrix_set_color(81, 0xFF, 0x0, 0x0); // Right side LED 5 + rgb_matrix_set_color(83, 0xFF, 0x0, 0x0); // Left side LED 6 + rgb_matrix_set_color(84, 0xFF, 0x0, 0x0); // Right side LED 6 + rgb_matrix_set_color(87, 0xFF, 0x0, 0x0); // Left side LED 7 + rgb_matrix_set_color(88, 0xFF, 0x0, 0x0); // Right side LED 7 + rgb_matrix_set_color(91, 0xFF, 0x0, 0x0); // Left side LED 8 + rgb_matrix_set_color(92, 0xFF, 0x0, 0x0); // Right side LED 8 + rgb_matrix_set_color(3, 0xFF, 0x0, 0x0); // CAPS LED + } + +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/readme.md new file mode 100644 index 000000000000..8024e77cc104 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/readme.md @@ -0,0 +1,85 @@ +# GMMK Pro Standard Layout for macOS by zvuc + +As you may know, Glorious does not (yet) provide their Glorious Core software for macOS; so with stock firmware, there aren't any ways to customize layouts on the hardware level unless you turn to software-based override solutions such as [Karabiner Elements](https://karabiner-elements.pqrs.org/). This is my attempt to try to create the most macOS-like experience on the GMMK Pro, taking close notes from Apple's Magic Keyboard, also referencing code from other community keymaps. + +## Keymap +Layer 0 +Layer0 + +Layer 1 (Hold Fn) +Layer1 + +Layer 2 (Togglable alternative function row layout by pressing Fn+F) +Layer2 + + +## Notable differences from stock key layout for Windows: +- Delete key placed right next to backspace (under rotary encoder) +- F13 key for the bottommost row (Assign it to a shortcut you like in macOS preferences! [For example: "Emoji & Symbols" to bring up the emoji input popup instantly](https://user-images.githubusercontent.com/2870726/132237211-7e13c156-96a8-4a91-b215-28d310228feb.png)) +- Eject key for the last key in function row: Needed for macOS native global "Sleep" hotkey (Eject) + +## Notable Features +- VIA support +- Rotary Encoder support (Defaults to stock behavior Volume Up/Down) +- Standard order for macOS modifier keys: + * Left: ⌃ Control⌥ Option⌘ Command + * Right: ⌘ Command⌥ OptionFn +- Apple Magic Keyboard-like Function Row Mode (Toggle with Fn+F) + * F1: Decrease display brightness + * F2: Increase display brightness + * F3: Mission Control + * F4: Launchpad + * F5: Decrease keyboard backlight brightness + * F6: Increase keyboard backlight brightness + * F7: (none) + * F8: (none) + * F9: Media Rewind + * F10: Media Play/Pause + * F11: Media Fast Forward + * F12: (none) + +> #### NOTE +> - Media key mappings follow Apple Magic Keyboard except F8 thru F12, where keys have been shifted by one to the right. It's because I wanted to get over the awkward gap between F8 and F9 that the GMMK Pro has—and also because we don't need dedicated keys for volume control when we have the more convenient rotary knob. +> - To access standard F1 - F12 keys, press the Function keys while holding Fn. +> - If you're planning to use Karabiner Elements, use the standard Function row mode (F1 - F12) because Karabiner Elements always overrides function keys even if you want to just use simple or complex modifications, and it doesn't catch custom keys like Mission Control, Launchpad or Eject. (Eject is mapped as F24 so you can replace it with 'Eject' within Karabiner.) + +## RGB Lighting +- Retains Glorious stock firmware key mappings for control + * FnUp / FnDown: Cycle presets + * FnLeft / FnRight: Adjust speed + * FnW / FnS: Adjust brightness +- Quickly switch to popular presets: + * Fn` : Solid color (no animation) + * Fn1 : Solid duotone (no animation) - ShiftKnob to change secondary color. + * Fn2 : Vertical gradient - ShiftKnob to change secondary color. + * Fn3 : "Jellybean Raindrops" + * Fn4 : Horizontal wipe with white backlight + * Fn5 : Horizontal wipe + * Fn6 : Single color pinwheel + * Fn7 : Horizontal rainbow + * Fn8 : Rainbow pinwheel + * Fn9 : Breathing + * Fn0 : Reactive (light up on keypress) + * Fn- : "Digital Rain" + * Fn= : "Heatmap" +- RGB turns off after 20 minutes of inactivity +- RGB turns off when USB is suspended / enters sleep +- Caps Lock toggle indicator (Caps Lock key and side lights will turn red) +- Easy RGB control using Rotary Encoder + - Control+Rotate Knob: Adjust hue + - Option+Rotate Knob: Adjust saturation + - Command+Rotate Knob: Adjust brightness + +> All latest QMK effects [(41 as of now)](https://beta.docs.qmk.fm/using-qmk/hardware-features/lighting/feature_rgb_matrix#rgb-matrix-effects-id-rgb-matrix-effects) are enabled by default and will apply in order when cycling through using FnUp / FnDown. You can disable specific effects by uncommenting (remove the `//` at the beginning of line) respective lines (ex: `#define DISABLE_RGB_MATRIX_BREATHING`) in `qmk_firmware/keyboards/gmmk/pro/ansi/keymaps/zvuc/config.h` then recompiling the firmware. + +## Other Features +- 1000hz polling rate +- Short DEBOUNCE time (5 ms) +- Per-key debounce algorithm (`sym_defer_pk`) +- NKRO toggle (Fn+N) + +## Warning regarding VIA support +When observing this keyboard firmware in VIA, some custom-implemented keys such as Mission Control/Launchpad and RGB preset shortcuts appear as keycodes such as `0x5d62`. **These must not be modified!** There is no way to get their default functionality back unless you re-flash the firmware through QMK Toolbox. + +## Download pre-compiled firmware binary file +[Download BIN file from here](https://github.com/zvuc/qmk_firmware/releases/tag/zvuc-1.0.1) diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/rules.mk new file mode 100644 index 000000000000..e9073d44a02b --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/rules.mk @@ -0,0 +1,4 @@ +# Enable additional features. + +DEBOUNCE_TYPE = sym_defer_pk +VIA_ENABLE = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c new file mode 100644 index 000000000000..52c9dfdf9913 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c @@ -0,0 +1,241 @@ +/* Copyright 2021 Gigahawk + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// clang-format off +#include "ansi.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t PROGMEM g_led_config = {{ + { 4, NO_LED, NO_LED, 95, 65, 79, 5, 28 }, + { 8, 2, 9, 0, 10, 75, 1, 7 }, + { 14, 3, 15, NO_LED, 16, 86, 6, 13 }, + { 20, 18, 21, 23, 22, 94, 12, 19 }, + { 25, 30, 26, 31, 27, 32, 29, 24 }, + { 41, 36, 42, 37, 43, 38, 35, 40 }, + { 46, 89, 47, 34, 48, 72, 78, 45 }, + { 52, 39, 53, 97, 54, 82, 44, 51 }, + { 58, 63, 59, 64, NO_LED, 60, 62, 57 }, + { 11, 90, 55, 17, 33, 49, NO_LED, 69 }, + { NO_LED, 85, 93, 61, 96, 66, 50, 56 } +}, { + {0, 0}, // 0, ESC, k13 + {0, 15}, // 1, ~, k16 + {4, 26}, // 2, Tab, k11 + {5, 38}, // 3, Caps, k21 + {9, 49}, // 4, Sh_L, k00 + {2, 61}, // 5, Ct_L, k06 + {18, 0}, // 6, F1, k26 + {14, 15}, // 7, 1, k17 + {22, 26}, // 8, Q, k10 + {25, 38}, // 9, A, k12 + {33, 49}, // 10, Z, k14 + {20, 61}, // 11, Win_L, k90 + {33, 0}, // 12, F2, k36 + {29, 15}, // 13, 2, k27 + {36, 26}, // 14, W, k20 + {40, 38}, // 15, S, k22 + {47, 49}, // 16, X, k24 + {38, 61}, // 17, Alt_L, k93 + {47, 0}, // 18, F3, k31 + {43, 15}, // 19, 3, k37 + {51, 26}, // 20, E, k30 + {54, 38}, // 21, D, k32 + {61, 49}, // 22, C, k34 + {61, 0}, // 23, F4, k33 + {58, 15}, // 24, 4, k47 + {65, 26}, // 25, R, k40 + {69, 38}, // 26, F, k42 + {76, 49}, // 27, V, k44 + {79, 0}, // 28, F5, k07 + {72, 15}, // 29, 5, k46 + {79, 26}, // 30, T, k41 + {83, 38}, // 31, G, k43 + {90, 49}, // 32, B, k45 + {92, 61}, // 33, SPACE, k94 + {94, 0}, // 34, F6, k63 + {87, 15}, // 35, 6, k56 + {94, 26}, // 36, Y, k51 + {98, 38}, // 37, H, k53 + {105, 49}, // 38, N, k55 + {108, 0}, // 39, F7, k71 + {101, 15}, // 40, 7, k57 + {108, 26}, // 41, U, k50 + {112, 38}, // 42, J, k52 + {119, 49}, // 43, M, k54 + {123, 0}, // 44, F8, k76 + {116, 15}, // 45, 8, k67 + {123, 26}, // 46, I, k60 + {126, 38}, // 47, K, k62 + {134, 49}, // 48, ,, k64 + {145, 61}, // 49, Alt_R, k95 + {141, 0}, // 50, F9, ka6 + {130, 15}, // 51, 9, k77 + {137, 26}, // 52, O, k70 + {141, 38}, // 53, L, k72 + {148, 49}, // 54, ., k74 + {159, 61}, // 55, FN, k92 + {155, 0}, // 56, F10, ka7 + {145, 15}, // 57, 0, k87 + {152, 26}, // 58, P, k80 + {155, 38}, // 59, ;, k82 + {163, 49}, // 60, ?, k85 + {170, 0}, // 61, F11, ka3 + {159, 15}, // 62, -, k86 + {166, 26}, // 63, [, k81 + {170, 38}, // 64, ", k83 + {173, 61}, // 65, Ct_R, k04 + {184, 0}, // 66, F12, ka5 + {0, 8}, // 67, LED, l01 + {224, 8}, // 68, LED, l11 + {202, 0}, // 69, Prt, k97 + {0, 15}, // 70, LED, l02 + {224, 15}, // 71, LED, l12 + {224, 15}, // 72, Del, k65 + {0, 21}, // 73, LED, l03 + {224, 21}, // 74, LED, l13 + {224, 26}, // 75, PgUp, k15 + {0, 28}, // 76, LED, l04 + {224, 28}, // 77, LED, l14 + {173, 15}, // 78, =, k66 + {220, 64}, // 79, Right, k05 + {0, 35}, // 80, LED, l05 + {224, 35}, // 81, LED, l15 + {224, 49}, // 82, End, k75 + {0, 42}, // 83, LED, l06 + {224, 42}, // 84, LED, l16 + {195, 15}, // 85, BSpc, ka1 + {224, 38}, // 86, PgDn, k25 + {0, 48}, // 87, LED, l07 + {224, 48}, // 88, LED, l17 + {181, 26}, // 89, ], k61 + {182, 49}, // 90, Sh_R, k91 + {0, 55}, // 91, LED, l08 + {224, 55}, // 92, LED, l18 + {199, 26}, // 93, \, ka2 + {206, 52}, // 94, Up, k35 + {191, 64}, // 95, Left, k03 + {193, 38}, // 96, Enter, ka4 + {206, 64} // 97, Down, k73 +}, { + 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 2, 2, + 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 +}}; + +const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { + {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13 + {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16 + {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11 + {0, CS10_SW1, CS11_SW1, CS12_SW1}, // 3, Caps, k21 + {0, CS13_SW1, CS14_SW1, CS15_SW1}, // 4, Sh_L, k00 + {0, CS16_SW1, CS17_SW1, CS18_SW1}, // 5, Ct_L, k06 + {0, CS1_SW2, CS2_SW2, CS3_SW2}, // 6, F1, k26 + {0, CS4_SW2, CS5_SW2, CS6_SW2}, // 7, 1, k17 + {0, CS7_SW2, CS8_SW2, CS9_SW2}, // 8, Q, k10 + {0, CS10_SW2, CS11_SW2, CS12_SW2}, // 9, A, k12 + {0, CS13_SW2, CS14_SW2, CS15_SW2}, // 10, Z, k14 + {0, CS16_SW2, CS17_SW2, CS18_SW2}, // 11, Win_L, k90 + {0, CS1_SW3, CS2_SW3, CS3_SW3}, // 12, F2, k36 + {0, CS4_SW3, CS5_SW3, CS6_SW3}, // 13, 2, k27 + {0, CS7_SW3, CS8_SW3, CS9_SW3}, // 14, W, k20 + {0, CS10_SW3, CS11_SW3, CS12_SW3}, // 15, S, k22 + {0, CS13_SW3, CS14_SW3, CS15_SW3}, // 16, X, k24 + {0, CS16_SW3, CS17_SW3, CS18_SW3}, // 17, Alt_L, k93 + {0, CS1_SW4, CS2_SW4, CS3_SW4}, // 18, F3, k31 + {0, CS4_SW4, CS5_SW4, CS6_SW4}, // 19, 3, k37 + {0, CS7_SW4, CS8_SW4, CS9_SW4}, // 20, E, k30 + {0, CS10_SW4, CS11_SW4, CS12_SW4}, // 21, D, k32 + {0, CS13_SW4, CS14_SW4, CS15_SW4}, // 22, C, k34 + {0, CS1_SW5, CS2_SW5, CS3_SW5}, // 23, F4, k33 + {0, CS4_SW5, CS5_SW5, CS6_SW5}, // 24, 4, k47 + {0, CS7_SW5, CS8_SW5, CS9_SW5}, // 25, R, k40 + {0, CS10_SW5, CS11_SW5, CS12_SW5}, // 26, F, k42 + {0, CS13_SW5, CS14_SW5, CS15_SW5}, // 27, V, k44 + {0, CS1_SW6, CS2_SW6, CS3_SW6}, // 28, F5, k07 + {0, CS4_SW6, CS5_SW6, CS6_SW6}, // 29, 5, k46 + {0, CS7_SW6, CS8_SW6, CS9_SW6}, // 30, T, k41 + {0, CS10_SW6, CS11_SW6, CS12_SW6}, // 31, G, k43 + {0, CS13_SW6, CS14_SW6, CS15_SW6}, // 32, B, k45 + {0, CS16_SW6, CS17_SW6, CS18_SW6}, // 33, SPACE, k94 + {0, CS1_SW7, CS2_SW7, CS3_SW7}, // 34, F6, k63 + {0, CS4_SW7, CS5_SW7, CS6_SW7}, // 35, 6, k56 + {0, CS7_SW7, CS8_SW7, CS9_SW7}, // 36, Y, k51 + {0, CS10_SW7, CS11_SW7, CS12_SW7}, // 37, H, k53 + {0, CS13_SW7, CS14_SW7, CS15_SW7}, // 38, N, k55 + {0, CS1_SW8, CS2_SW8, CS3_SW8}, // 39, F7, k71 + {0, CS4_SW8, CS5_SW8, CS6_SW8}, // 40, 7, k57 + {0, CS7_SW8, CS8_SW8, CS9_SW8}, // 41, U, k50 + {0, CS10_SW8, CS11_SW8, CS12_SW8}, // 42, J, k52 + {0, CS13_SW8, CS14_SW8, CS15_SW8}, // 43, M, k54 + {0, CS1_SW9, CS2_SW9, CS3_SW9}, // 44, F8, k76 + {0, CS4_SW9, CS5_SW9, CS6_SW9}, // 45, 8, k67 + {0, CS7_SW9, CS8_SW9, CS9_SW9}, // 46, I, k60 + {0, CS10_SW9, CS11_SW9, CS12_SW9}, // 47, K, k62 + {0, CS13_SW9, CS14_SW9, CS15_SW9}, // 48, ,, k64 + {0, CS16_SW9, CS17_SW9, CS18_SW9}, // 49, Alt_R, k95 + {0, CS1_SW10, CS2_SW10, CS3_SW10}, // 50, F9, ka6 + {0, CS4_SW10, CS5_SW10, CS6_SW10}, // 51, 9, k77 + {0, CS7_SW10, CS8_SW10, CS9_SW10}, // 52, O, k70 + {0, CS10_SW10, CS11_SW10, CS12_SW10}, // 53, L, k72 + {0, CS13_SW10, CS14_SW10, CS15_SW10}, // 54, ., k74 + {0, CS16_SW10, CS17_SW10, CS18_SW10}, // 55, FN, k92 + {0, CS1_SW11, CS2_SW11, CS3_SW11}, // 56, F10, ka7 + {0, CS4_SW11, CS5_SW11, CS6_SW11}, // 57, 0, k87 + {0, CS7_SW11, CS8_SW11, CS9_SW11}, // 58, P, k80 + {0, CS10_SW11, CS11_SW11, CS12_SW11}, // 59, ;, k82 + {0, CS13_SW11, CS14_SW11, CS15_SW11}, // 60, ?, k85 + {0, CS1_SW12, CS2_SW12, CS3_SW12}, // 61, F11, ka3 + {0, CS4_SW12, CS5_SW12, CS6_SW12}, // 62, -, k86 + {0, CS7_SW12, CS8_SW12, CS9_SW12}, // 63, [, k81 + {0, CS10_SW12, CS11_SW12, CS12_SW12}, // 64, ", k83 + {0, CS16_SW12, CS17_SW12, CS18_SW12}, // 65, Ct_R, k04 + + {1, CS1_SW1, CS2_SW1, CS3_SW1}, // 66, F12, ka5 + {1, CS13_SW1, CS14_SW1, CS15_SW1}, // 67, LED, l01 + {1, CS16_SW1, CS17_SW1, CS18_SW1}, // 68, LED, l11 + {1, CS4_SW2, CS5_SW2, CS6_SW2}, // 69, Prt, k97 + {1, CS13_SW2, CS14_SW2, CS15_SW2}, // 70, LED, l02 + {1, CS16_SW2, CS17_SW2, CS18_SW2}, // 71, LED, l12 + {1, CS4_SW3, CS5_SW3, CS6_SW3}, // 72, Del, k65 + {1, CS13_SW3, CS14_SW3, CS15_SW3}, // 73, LED, l03 + {1, CS16_SW3, CS17_SW3, CS18_SW3}, // 74, LED, l13 + {1, CS4_SW4, CS5_SW4, CS6_SW4}, // 75, PgUp, k15 + {1, CS13_SW4, CS14_SW4, CS15_SW4}, // 76, LED, l04 + {1, CS16_SW4, CS17_SW4, CS18_SW4}, // 77, LED, l14 + {1, CS1_SW5, CS2_SW5, CS3_SW5}, // 78, =, k66 + {1, CS10_SW5, CS11_SW5, CS12_SW5}, // 79, Right, k05 + {1, CS13_SW5, CS14_SW5, CS15_SW5}, // 80, LED, l05 + {1, CS16_SW5, CS17_SW5, CS18_SW5}, // 81, LED, l15 + {1, CS4_SW6, CS5_SW6, CS6_SW6}, // 82, End, k75 + {1, CS13_SW6, CS14_SW6, CS15_SW6}, // 83, LED, l06 + {1, CS16_SW6, CS17_SW6, CS18_SW6}, // 84, LED, l16 + {1, CS1_SW7, CS2_SW7, CS3_SW7}, // 85, BSpc, ka1 + {1, CS4_SW7, CS5_SW7, CS6_SW7}, // 86, PgDn, k25 + {1, CS13_SW7, CS14_SW7, CS15_SW7}, // 87, LED, l07 + {1, CS16_SW7, CS17_SW7, CS18_SW7}, // 88, LED, l17 + {1, CS1_SW8, CS2_SW8, CS3_SW8}, // 89, ], k61 + {1, CS4_SW8, CS5_SW8, CS6_SW8}, // 90, Sh_R, k91 + {1, CS13_SW8, CS14_SW8, CS15_SW8}, // 91, LED, l08 + {1, CS16_SW8, CS17_SW8, CS18_SW8}, // 92, LED, l18 + {1, CS1_SW9, CS2_SW9, CS3_SW9}, // 93, \, ka2 + {1, CS4_SW9, CS5_SW9, CS6_SW9}, // 94, Up, k35 + {1, CS4_SW10, CS5_SW10, CS6_SW10}, // 95, Left, k03 + {1, CS1_SW11, CS2_SW11, CS3_SW11}, // 96, Enter, ka4 + {1, CS4_SW11, CS5_SW11, CS6_SW11}, // 97, Down, k73 +}; +// clang-format on +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/config.h new file mode 100644 index 000000000000..26417b8234a0 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/config.h @@ -0,0 +1,63 @@ +/* Copyright 2021 Matt Gauf + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// clang-format off +#pragma once + +/* Defaults */ +#define RAW_USAGE_PAGE 0x200 +#define RAW_USAGE_ID 0x40 + +/* Board Features */ +#define DYNAMIC_MACRO_SIZE 512 + +/* RGB Matrix Features */ +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_DISABLE_WHEN_USB_SUSPENDED true + +/* RGB Matrix Framebuffer Config */ +// #define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// #define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 25 + +/* RGB Matrix Disabled Effects */ +#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +#define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +#define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right + +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + #define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +#endif + +#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out + #define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out + #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#endif + +#define DISABLE_RGB_MATRIX_EFFECT_MAX +// clang-format on diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c new file mode 100644 index 000000000000..f3f443cedb46 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c @@ -0,0 +1,25 @@ +/* Copyright 2021 Matt Gauf + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rgb_matrix.h" + +void rgb_matrix_set_color_flags(uint8_t red, uint8_t green, uint8_t blue, uint8_t flags) { + for (uint8_t ii = 0; ii < DRIVER_LED_TOTAL; ii++) { + if (g_led_config.flags[ii] & flags) { + rgb_matrix_set_color(ii, red, green, blue); + } + } +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c new file mode 100644 index 000000000000..f96be6ffe94b --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c @@ -0,0 +1,220 @@ +/* Copyright 2021 Matt Gauf + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// clang-format off +#include QMK_KEYBOARD_H +#include "keymap_helpers.h" + + +enum custom_codes { + SET_MP = RGB_M_P, + SET_MB = RGB_M_B, + SET_MR = RGB_M_R, + + MG_F17 = SAFE_RANGE, + MG_F18, + MG_F19 +}; + + +enum layer_names { + _DEFAULT = 0, + _EFFECTS, + _UTILITY, + _DFUMODE +}; + + +// static uint8_t rgb_pin_fn_column[] = {PIN_DEL,PIN_PGUP,PIN_PGDN,PIN_END}; +// static uint8_t rgb_pin_left_underglow[] = {PIN_LED_L01,PIN_LED_L02,PIN_LED_L03,PIN_LED_L04,PIN_LED_L05,PIN_LED_L06,PIN_LED_L07,PIN_LED_L08}; +// static uint8_t rgb_pin_right_underglow[] = {PIN_LED_L11,PIN_LED_L12,PIN_LED_L13,PIN_LED_L14,PIN_LED_L15,PIN_LED_L16,PIN_LED_L17,PIN_LED_L18}; + + +#define MODS_SHIFT ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) +#define MODS_CTRL ((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL) +#define MODS_ALT ((get_mods() | get_oneshot_mods()) & MOD_MASK_ALT) +#define MODS_GUI ((get_mods() | get_oneshot_mods()) & MOD_MASK_GUI) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT] = LAYOUT(KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MG_F17, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(_EFFECTS), KC_LEFT, KC_DOWN, KC_RGHT), + + [_EFFECTS] = LAYOUT(_______, KC_F13, KC_F14, KC_F15, KC_F16, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, MG_F18, _______, + _______, SET_MP, SET_MB, SET_MR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, RGB_SAI, RGB_SPD, + _______, _______, _______, _______, TG(_UTILITY), MO(_DFUMODE), _______, RGB_HUD, RGB_SAD, RGB_HUI), + + [_UTILITY] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_REC1, DM_REC2, DM_RSTP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_DFUMODE] = LAYOUT(RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MG_F19, DEBUG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; +// Runs constantly in the background, in a loop. +void rgb_matrix_indicators_user(void) { + if (rgb_matrix_get_flags() & (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER)) { + + if (IS_LAYER_ON(_UTILITY)) { + rgb_matrix_set_color(PIN_F9, LEDGREE); + rgb_matrix_set_color(PIN_F10, LEDGREE); + rgb_matrix_set_color(PIN_F11, LED_RED); + rgb_matrix_set_color(PIN_F12, LED_RED); + rgb_matrix_set_color(PIN_PRINT, LEDTEAL); + } + + switch (get_highest_layer(layer_state)) { + case _DFUMODE: + rgb_matrix_set_color_all(LED_OFF); + rgb_matrix_set_color(PIN_ESC, LED_RED); + rgb_matrix_set_color(PIN_PRINT, LEDORAN); + return; + case _EFFECTS: + rgb_matrix_set_color(PIN_PRINT, LEDGREE); + break; + default: + break; + } + + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(PIN_CAPS, RGB_WHITE); + } + + } +} + + +// Called on start +void dynamic_macro_record_start_user(void) { + dprint("-- Recording Started\n"); + layer_on(_UTILITY); +} + + +// Called on end +void dynamic_macro_record_end_user(int8_t direction) { + dprint("-- Recording Ended\n"); +} + + +// Called on playback +void dynamic_macro_play_user(int8_t direction) { + dprint("-- Recording Playing\n"); +} + + +// Runs on encoder event +bool encoder_update_user(uint8_t index, bool clockwise) { + uint8_t curr_mod = get_mods(); + + if (IS_LAYER_ON(_EFFECTS)) { + if (clockwise) { + rgb_matrix_increase_val(); + } else { + rgb_matrix_decrease_val(); + } + } else { + if (MODS_GUI) { + if (MODS_GUI && MODS_SHIFT) { + clear_mods(); + if (clockwise) { + tap_code16(LSG(KC_Z)); + } else { + tap_code16(LGUI(KC_Z)); + } + set_mods(curr_mod); + } else if (MODS_GUI && MODS_ALT) { + clear_mods(); + if (clockwise) { + tap_code(KC_RIGHT); + } else { + tap_code(KC_LEFT); + } + set_mods(curr_mod); + } else { + if (clockwise) { + tap_code16(LGUI(KC_TAB)); + } else { + tap_code16(LSG(KC_TAB)); + } + } + } else { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + } + return true; +} + + +// Runs on key event +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MG_F17: + if (record->event.pressed) { + tap_code16(HYPR(KC_F17)); + } + return false; + case MG_F18: + if (record->event.pressed) { + tap_code16(HYPR(KC_F18)); + } + return false; + case MG_F19: + if (record->event.pressed) { + tap_code16(HYPR(KC_F19)); + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: + rgb_matrix_set_flags(LED_FLAG_NONE); + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: + rgb_matrix_set_flags(LED_FLAG_ALL); + break; + case LED_FLAG_UNDERGLOW: + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + break; + default: + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + break; + } + } + return false; + default: + return true; // Process all other keycodes normally + } +} +// clang-format on diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap_helpers.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap_helpers.h new file mode 100644 index 000000000000..2a6e8dae7b75 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap_helpers.h @@ -0,0 +1,165 @@ +/* Copyright 2021 Matt Gauf + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// clang-format off +#include +#include "rgb_matrix_types.h" + +/* Color Codes */ +#define LEDWHIT 0xff, 0xff, 0xff +#define LED_RED 0xff, 0x00, 0x00 +#define LEDORAN 0xff, 0x29, 0x00 +#define LEDGOLD 0xff, 0x80, 0x00 +#define LEDYELL 0xff, 0xff, 0x00 +#define LEDCHAR 0x80, 0xff, 0x00 +#define LEDGREE 0x00, 0xff, 0x00 +#define LEDFOAM 0x00, 0xff, 0x40 +#define LEDTEAL 0x00, 0x80, 0xff +#define LEDBLUE 0x00, 0x00, 0xff +#define LEDPURP 0x80, 0x00, 0xff +#define LEDMAGE 0xff, 0x00, 0xff +#define LEDPINK 0xff, 0x00, 0x80 +#define LEDBLAC 0x00, 0x00, 0x00 +#define LED_OFF 0x00, 0x00, 0x00 + +/* Color Functions */ +void rgb_matrix_set_color_flags(uint8_t red, uint8_t green, uint8_t blue, uint8_t flags); + +/* Function Row */ +#define PIN_ESC 0 +#define PIN_F1 6 +#define PIN_F2 12 +#define PIN_F3 18 +#define PIN_F4 23 +#define PIN_F5 28 +#define PIN_F6 34 +#define PIN_F7 39 +#define PIN_F8 44 +#define PIN_F9 50 +#define PIN_F10 56 +#define PIN_F11 61 +#define PIN_F12 66 +#define PIN_PRINT 69 + +/* Number Row */ +#define PIN_0 57 +#define PIN_1 7 +#define PIN_2 13 +#define PIN_3 19 +#define PIN_4 24 +#define PIN_5 29 +#define PIN_6 35 +#define PIN_7 40 +#define PIN_8 45 +#define PIN_9 51 + +/* QWERTY */ +#define PIN_A 9 +#define PIN_B 32 +#define PIN_C 22 +#define PIN_D 21 +#define PIN_E 20 +#define PIN_F 26 +#define PIN_G 31 +#define PIN_H 37 +#define PIN_I 46 +#define PIN_J 42 +#define PIN_K 47 +#define PIN_L 53 +#define PIN_M 43 +#define PIN_N 38 +#define PIN_O 52 +#define PIN_P 58 +#define PIN_Q 8 +#define PIN_R 25 +#define PIN_S 15 +#define PIN_T 30 +#define PIN_U 41 +#define PIN_V 27 +#define PIN_W 14 +#define PIN_X 16 +#define PIN_Y 36 +#define PIN_Z 10 + +/* Symbols */ +#define PIN_MINUS 62 +#define PIN_EQUAL 78 +#define PIN_RBRACKET 89 +#define PIN_LBRACKET 63 +#define PIN_BSLASH 93 +#define PIN_SLASH 60 +#define PIN_SCOLON 59 +#define PIN_QUOTE 64 +#define PIN_COMMA 48 +#define PIN_DOT 54 +#define PIN_GRAVE 1 + +/* Indentation */ +#define PIN_TAB 2 +#define PIN_SPACE 33 + +/* Line Control */ +#define PIN_BSPACE 85 +#define PIN_ENTER 96 + +/* Indicator */ +#define PIN_CAPS 3 + +/* Left Modifiers */ +#define PIN_LSHIFT 4 +#define PIN_LCTRL 5 +#define PIN_LALT 17 +#define PIN_LGUI 11 + +/* Right Modifiers */ +#define PIN_RSHIFT 90 +#define PIN_RCTRL 65 +#define PIN_RALT 49 +#define PIN_FN 55 + +/* Arrow Keys */ +#define PIN_UP 94 +#define PIN_DOWN 97 +#define PIN_LEFT 95 +#define PIN_RIGHT 79 + +/* Fn Column */ +#define PIN_DEL 72 // ┳ TOP +#define PIN_PGUP 75 // ┃ +#define PIN_PGDN 86 // ┃ +#define PIN_END 82 // ┻ BOTTOM + +/* Left Side Underglow */ +#define PIN_LED_L01 67 // ┳ TOP +#define PIN_LED_L02 70 // ┃ +#define PIN_LED_L03 73 // ┃ +#define PIN_LED_L04 76 // ┃ +#define PIN_LED_L05 80 // ┃ +#define PIN_LED_L06 83 // ┃ +#define PIN_LED_L07 87 // ┃ +#define PIN_LED_L08 91 // ┻ BOTTOM + +/* Right Side Underglow */ +#define PIN_LED_L11 68 // ┳ TOP +#define PIN_LED_L12 71 // ┃ +#define PIN_LED_L13 74 // ┃ +#define PIN_LED_L14 77 // ┃ +#define PIN_LED_L15 81 // ┃ +#define PIN_LED_L16 84 // ┃ +#define PIN_LED_L17 88 // ┃ +#define PIN_LED_L18 92 // ┻ BOTTOM + +// clang-format on diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md new file mode 100644 index 000000000000..f388a3fbf1d7 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md @@ -0,0 +1,52 @@ +# @mattgauf's GMMK Pro layout + +### `_DEFAULT` +> *Based on the default ansi layout, this keymap contains the following changes to the default layer.* + - Screensaver: `HYPER(F17)` + - `KC_PSCR` → `MG_F17` + - `KC_DEL` → `KC_HOME` + +> *Additionally the encoder will follow new rules when holding a key.* + - `KC_GUI` will cycle through applications (macOS variant) + - `KC_GUI + KC_ALT` will tap the left and right arrows. + - `KC_GUI + KC_SHIFT` will tap Undo and Redo (macOS variant) + +### `_EFFECTS` +> *The function layer is now used for additional layer access, effect keys, and media keys (following the Macbook Pro fn key layout).* + +> *Additionally while effects is active, the encoder will only adjust the brightness of the RGB matrix.* + - The RGB matrix effect and speed keys are located on the right hand vertical nav column. + - `KC_HOME` → `RGB_MOD` + - `KC_PGUP` → `RGB_RMOD` + - `KC_PGDN` → `RGB_SPI` + - `KC_END` → `RGB_SPD` + - The RGB matrix Hue, Saturation keys are mapped to the arrow keys. + - `KC_UP` → `RGB_SAI` + - `KC_DN` → `RGB_SAD` + - `KC_LEFT` → `RGB_HUD` + - `KC_RIGHT` → `RGB_HUI` + - The RGB matrix toggle is intercepted in process_record_user() cycling through the `LED_FLAG` modifiers. (`NONE`, `UNDERGLOW`, `KEYLIGHT`, `ALL`) + - `KC_SLSH` → `RGB_TOG` + - Hibernate: `HYPER(F18)` + - `MG_F17` → `MG_F18` + + +### `_UTILITY` +*The utility layer is currently used for remapping* `KF_F9` *to* `KC_F12` *&* `MG_F17` *to the dynamic macro keys.* + - Playback + - `KC_F9` → `DM_PLY1` + - `KC_F10` → `DM_PLY2` + - Record + - `KC_F11` → `DM_REC1` + - `KC_F12` → `DM_REC2` + - Stop Recording + - `MG_F17` → `DM_RSTP` + +### `_DFUMODE` +> *The final layer is used for resetting the board or triggering an immediate shutdown.* + - DFU Mode + - `KC_ESC` → `RESET` + - Shutdown: `HYPER(F19)` + - `MG_F17` → `MG_F19` + - Encoder press, triggers debug output. + - `KC_MUTE` → `DEBUG` diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/rules.mk new file mode 100644 index 000000000000..76e1674d5848 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/rules.mk @@ -0,0 +1,6 @@ +# Build rules +LIB_SRC += ansi.c +LIB_SRC += helpers.c + +# Overrides +MOUSEKEY_ENABLE = no # Mouse keys diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/.gitignore b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/.gitignore new file mode 100644 index 000000000000..03b2b466681f --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/.gitignore @@ -0,0 +1 @@ +secrets.h diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/README.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/README.md new file mode 100644 index 000000000000..cb17239882b6 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/README.md @@ -0,0 +1,19 @@ +QMK layout for gmmk/pro +======================= + +## Secrets +The format is the same as [drashna's](../../../../users/drashna/readme_secrets.md) secrets implementation. Create a `secret.h` and define your secrets like this: + +```c +static const char* secrets[] = {"secret1", "secret2", "secret3", "secret4", "secret5"}; +``` + +## Rotary encoder knob +You can hookup your encoder functions by defining new encoder states in [encoder.h](./encoder.h), then in [encoder.c](./encoder.c) assign static variable `state` your new state depending on your desired condition and add callbacks to `encoder_mapping` array. + +## RGB Matrix Ledmaps +RGB Matrix ledmaps is the future allowing you assign colors to individual keys on every keymap layer. + +You can see some examples of my usage in the bottom of [keymap.c](./keymap.c). + +Color defines are just HSV colors wrapped in curly braces, like `#define RED { HSV_RED }`. diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h new file mode 100644 index 000000000000..46719e3a781b --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h @@ -0,0 +1,31 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#define COMBO_COUNT 1 +#define COMBO_TERM 100 + +#define RGB_MATRIX_KEYPRESSES +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define RGB_DISABLE_TIMEOUT 90000 + +#define MACRO_TIMER 5 + +#define TAPPING_TOGGLE 3 + +#define WPM_SMOOTHING 0.1 + +// this is for macOS so keyboard can work after sleep +#define NO_USB_STARTUP_CHECK diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c new file mode 100644 index 000000000000..049f4df7e4a7 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c @@ -0,0 +1,111 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "encoder.h" +#include "mike1808.h" +#include "print.h" +#include "utils.h" +#include "process_record.h" +#include "rgb_matrix_ledmaps.h" + +static uint8_t state = ENCODER_DEFAULT; + +// clang-format off +const encoder_callback encoder_mapping[][2] = { + [ENCODER_VOLUME] = {&volume_up, &volume_down}, +#ifdef RGB_MATRIX_ENABLE + [ENCODER_RGB_HUE] = {&rgb_matrix_increase_hue_noeeprom, &rgb_matrix_decrease_hue_noeeprom}, + [ENCODER_RGB_SAT] = {&rgb_matrix_increase_sat_noeeprom, &rgb_matrix_decrease_sat_noeeprom}, + [ENCODER_RGB_VAL] = {&rgb_matrix_increase_val_noeeprom, &rgb_matrix_decrease_val_noeeprom}, + [ENCODER_RGB_EFFECT] = {&rgb_matrix_step_noeeprom, &rgb_matrix_step_reverse_noeeprom}, + [ENCODER_RGB_EFFECT_SPEED] = {&rgb_matrix_increase_speed_noeeprom, &rgb_matrix_decrease_speed_noeeprom}, +#endif // RGB_MATRIX_ENABLE +}; + +// clang-format on + +void volume_up() { tap_code(KC_VOLU); } + +void volume_down() { tap_code(KC_VOLD); } + +bool encoder_update_user(uint8_t index, bool clockwise) { + dprintf("current encoder state is: %d\n", state); + + if (clockwise) { + (*encoder_mapping[state][0])(); + } else { + (*encoder_mapping[state][1])(); + } + + return true; +} + +void handle_rgb_key(bool pressed) { + dprintf("handle_rgb_key %d\f", pressed); + + if (pressed) { + rgb_matrix_layers_disable(); + } else { + rgb_matrix_layers_enable(); + } +} + +static KeyPressState *rgb_state; + +void keyboard_post_init_encoder() { + rgb_state = NewKeyPressState(handle_rgb_key); +} + +bool process_record_encoder(uint16_t keycode, keyrecord_t *record) { +#ifdef RGB_MATRIX_ENABLE + switch (keycode) { + case KC_RGB_ENC_HUE ... KC_RGB_ENC_EFFECT: + if (record->event.pressed) { +# ifdef RGB_MATRIX_LEDMAPS_ENABLED + // disable layers so we can adjust RGB effects + rgb_state->press(rgb_state); +# endif // RGB_MATRIX_LEDMAPS_ENABLED + + switch (keycode) { + case KC_RGB_ENC_HUE: + state = ENCODER_RGB_HUE; + break; + case KC_RGB_ENC_SAT: + state = ENCODER_RGB_SAT; + break; + case KC_RGB_ENC_VAL: + state = ENCODER_RGB_VAL; + break; + case KC_RGB_ENC_EFFECT_SPEED: + state = ENCODER_RGB_EFFECT_SPEED; + break; + case KC_RGB_ENC_EFFECT: + state = ENCODER_RGB_EFFECT; + break; + } + } else { +# ifdef RGB_MATRIX_LEDMAPS_ENABLED + rgb_state->release(rgb_state); +# endif // RGB_MATRIX_LEDMAPS_ENABLED + state = ENCODER_DEFAULT; + store_rgb_state_to_eeprom(); + } + + return false; + } +#endif // RGB_MATRIX_ENABLE + + return true; +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.h new file mode 100644 index 000000000000..204922730ec8 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.h @@ -0,0 +1,35 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// To add a new functionality define a new state here and then assign +// the handler to the `encoder_callback` +#include "quantum.h" + +enum encoder_state { + ENCODER_VOLUME = 0, + ENCODER_RGB_HUE, + ENCODER_RGB_SAT, + ENCODER_RGB_VAL, + ENCODER_RGB_EFFECT_SPEED, + ENCODER_RGB_EFFECT, +}; + +typedef void (*encoder_callback)(void); + +#define ENCODER_DEFAULT ENCODER_VOLUME + +void volume_up(void); +void volume_down(void); diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c new file mode 100644 index 000000000000..f553874eb0c8 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c @@ -0,0 +1,49 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mike1808.h" +#include "print.h" + +static bool wpm_rgb_enabled = false; +static uint8_t rgb_mode; + +void rgb_matrix_indicators_keymap(void) { + if (wpm_rgb_enabled && rgb_matrix_is_enabled()) { + uint8_t wpm = get_current_wpm(); + dprintf("WPM = %d\n", wpm); + HSV hsv = rgb_matrix_get_hsv(); + hsv.h = wpm; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b); + } +} + +bool process_record_fun(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed && keycode == KC_WPM_RGB) { + if (wpm_rgb_enabled) { + wpm_rgb_enabled = false; + rgb_matrix_mode(rgb_mode); + } else { + wpm_rgb_enabled = true; + rgb_mode = rgb_matrix_get_mode(); + rgb_matrix_enable(); + rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); + } + + return false; + } + + return true; +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c new file mode 100644 index 000000000000..30c59e941dd2 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c @@ -0,0 +1,127 @@ +/* Copyright 2021 Glorious, LLC , Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mike1808.h" + +const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [JK_ESC] = COMBO(jk_combo, KC_ESC), +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + [LINUX] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TT_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [WINDOWS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [MACOS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______, _______ + ), + + [FUNCTIONS] = LAYOUT( + _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_PSCR, _______, + _______, KC_LINX, KC_MAC, KC_WIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, _______, + KC_CAPS, _______, _______, _______, _______, OS_GIT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_RGBH, KC_RGBS, KC_RGBV, KC_RGBE, KC_RGBP, KC_WRGB, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, RGB_TOG, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [GIT] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, G_DIFF, _______, _______, _______, _______, _______, _______, G_PULL, G_PUSH, _______, _______, _______, + _______, G_ADD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, G_CHECK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + +#define ______ {0, 0, 0} + +const ledmap PROGMEM ledmaps[] = { + // LU = Left Underglow, RU = Right Underglow + // LU_1 ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) RU_1 + // LU_2 ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del RU_2 + // LU_3 Tab Q W E R T Y U I O P [ ] \ PgUp RU_3 + // LU_4 Caps A S D F G H J K L ; " Enter PgDn RU_4 + // LU_5 Sh_L Z X C V B N M , . ? Sh_R Up End RU_5 + // LU_6 Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right RU_6 + [LINUX] = RGB_MATRIX_LAYOUT_LEDMAP( + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, RED, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE + ), + [WINDOWS] = RGB_MATRIX_LAYOUT_LEDMAP( + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, RED, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE + ), + [MACOS] = RGB_MATRIX_LAYOUT_LEDMAP( + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, RED, ______, ______, ______, ______, ______, ______, ______, PURPLE + ), + + [FUNCTIONS] = RGB_MATRIX_LAYOUT_LEDMAP( + CYAN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, ______, ______, ______, ______, GREEN, GREEN, GREEN, GREEN, ______, PURPLE, + CYAN, ______, GOLD, GOLD, GOLD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, GOLD, PURPLE, + CYAN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, TEAL, ______, PURPLE, + CYAN, TURQ, ______, ______, ______, ______, TURQ, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + CYAN, ______, RED, RED, RED, RED, RED, RED, ______, ______, ______, ______, ______, RED, ______, PURPLE, + CYAN, ______, ______, BLUE, ______, ______, ______, ______, ______, ______, ______, PURPLE + ), +}; + +#endif // RGB_MATRIX_LEDMAPS_ENABLED +// clang-format on diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c new file mode 100644 index 000000000000..dda68fda2f8d --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c @@ -0,0 +1,68 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mike1808.h" + +#if (__has_include("secrets.h") && !defined(NO_SECRETS)) +# include "secrets.h" +#else +// `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware +// And I'm not familiar enough to know which is better or why... +static const char *const secrets[] = {"test1", "test2", "test3", "test4", "test5"}; +#endif + +// userspace_config_t userspace_config; + +bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_SECRET_1 ... KC_SECRET_5: // Secrets! Externally defined strings, not stored in repo + if (!record->event.pressed) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + send_string_with_delay(secrets[keycode - KC_SECRET_1], MACRO_TIMER); + } + return false; + break; + } + return true; +} + +void suspend_power_down_user(void) { +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_suspend_state(true); +#endif // RGB_MATRIX_ENABLE +} + +void suspend_wakeup_init_user(void) { +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_suspend_state(false); +#endif // RGB_MATRIX_ENABLE +} + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { + // Turn on sideglow when CAPS LOCK is activated + if (host_keyboard_led_state().caps_lock) { + HSV hsv = {CAPS_LOCK_COLOR}; + hsv.v = rgb_matrix_get_val(); + RGB rgb = hsv_to_rgb(hsv); + + for (uint8_t i = led_min; i < led_max; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { + RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + } + } + } +} +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.h new file mode 100644 index 000000000000..bc010108fb28 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.h @@ -0,0 +1,111 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include QMK_KEYBOARD_H +#include "rgb_matrix_ledmaps.h" + +enum layout_names { + LINUX = 0, // Base Layout: The main keyboard layout that has all the characters + WINDOWS, // Base ayout for Windows + MACOS, // Base Layout for MacOS + FUNCTIONS, // Function Layout: The function key activated layout with default functions and + // some added ones + GIT, // GIT Layout: GIT shortcuts and macros + SECRETS, // Layer with secrets +}; + +enum custom_keycodes { + KC_CCCV = SAFE_RANGE, // Hold to copy, tap to paste + KC_LINUX, + KC_MAC, + KC_WIN, + + KC_SECRET_1, + KC_SECRET_2, + KC_SECRET_3, + KC_SECRET_4, + KC_SECRET_5, + + KC_RGB_ENC_HUE, + KC_RGB_ENC_SAT, + KC_RGB_ENC_VAL, + KC_RGB_ENC_EFFECT_SPEED, + KC_RGB_ENC_EFFECT, + + KC_WPM_RGB, +}; + +enum git_macros { + // The start of this enum should always be equal to end of ctrl_keycodes + 1 + G_INIT = KC_WPM_RGB + 1, // git init + G_CLONE, // git clone + G_CONF, // git config --global + G_ADD, // git add + G_DIFF, // git diff + G_RESET, // git reset + G_REBAS, // git rebase + G_BRANH, // git branch + G_CHECK, // git checkout + G_MERGE, // git merge + G_REMTE, // git remote add + G_FETCH, // git fetch + G_PULL, // git pull + G_PUSH, // git push + G_COMM, // git commit + G_STAT, // git status + G_LOG, // git log + NEW_SAFE_RANGE, +}; + +enum combos { + JK_ESC, // jk to ESC for Vim +}; + +#define KC_SEC1 KC_SECRET_1 +#define KC_SEC2 KC_SECRET_2 +#define KC_SEC3 KC_SECRET_3 +#define KC_SEC4 KC_SECRET_4 +#define KC_SEC5 KC_SECRET_5 + +#define KC_RGBH KC_RGB_ENC_HUE +#define KC_RGBS KC_RGB_ENC_SAT +#define KC_RGBV KC_RGB_ENC_VAL +#define KC_RGBE KC_RGB_ENC_EFFECT +#define KC_RGBP KC_RGB_ENC_EFFECT_SPEED + +#define KC_WRGB KC_WPM_RGB + +#define KC_LINX KC_LINUX + +#define KC_RESET RESET +#define KC_RST KC_RESET + +#define OS_GIT OSL(GIT) +#define TT_FN TT(FUNCTIONS) + +#define OS_LGUI OSM(MOD_LGUI) +#define OS_RGUI OSM(MOD_RGUI) +#define OS_LSFT OSM(MOD_LSFT) +#define OS_RSFT OSM(MOD_RSFT) +#define OS_LCTL OSM(MOD_LCTL) +#define OS_RCTL OSM(MOD_RCTL) +#define OS_LALT OSM(MOD_LALT) +#define OS_RALT OSM(MOD_RALT) +#define OS_MEH OSM(MOD_MEH) +#define OS_HYPR OSM(MOD_HYPR) + +#define CAPS_LOCK_COLOR HSV_RED + diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.c new file mode 100644 index 000000000000..ac0164e73f9b --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.c @@ -0,0 +1,119 @@ +/* Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) , + Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mike1808.h" +#include "print.h" +#include "process_record.h" + +uint16_t copy_paste_timer; + +__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { + return true; +} +__attribute__((weak)) bool process_record_encoder(uint16_t keycode, keyrecord_t *record) { + return true; +} +__attribute__((weak)) bool process_record_fun(uint16_t keycode, keyrecord_t *record) { + return true; +} + +__attribute__((weak)) void keyboard_post_init_encoder(void) { return; } + +static const char *git_commands[] = { + "git init ", "git clone ", "git config --global ", "git add ", + "git diff ", "git reset ", "git rebase ", "git branch -b \"", + "git checkout ", "git merge ", "git remote add ", "git fetch ", + "git pull ", "git push ", "git commit ", "git status ", + "git log ", +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef KEYLOGGER_ENABLE + uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", + keycode, record->event.key.col, record->event.key.row, record->event.pressed, + record->event.time, record->tap.interrupted, record->tap.count); +#endif // KEYLOGGER_ENABLE + switch (keycode) { + case KC_LINUX ... KC_WIN: + if (record->event.pressed) { + dprintf("set_single_persistent_default_layer %d\n", keycode - KC_LINUX + LINUX); + set_single_persistent_default_layer(keycode - KC_LINUX + LINUX); + return false; + } + + break; + + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + if (layer_state_is(MACOS)) { + tap_code16(LGUI(KC_C)); + } else { + tap_code16(LCTL(KC_C)); + } + } else { // Tap, paste + if (layer_state_is(MACOS)) { + tap_code16(LGUI(KC_V)); + } else { + tap_code16(LCTL(KC_V)); + } + } + } + break; + + case G_INIT ... G_LOG: + if (record->event.pressed) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + send_string_with_delay(git_commands[keycode - G_INIT], MACRO_TIMER); + return false; + } + break; +#ifdef RGB_MATRIX_ENABLE + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } break; + case LED_FLAG_UNDERGLOW: { + // This line is for LED idle timer. It disables the toggle so you can turn + // off LED completely if you like + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable(); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable(); + } break; + } + } + return false; +#endif // RGB_MATRIX_ENABLE + } + + return process_record_encoder(keycode, record) && process_record_secrets(keycode, record) && + process_record_fun(keycode, record); +} + +void keyboard_post_init_user() { keyboard_post_init_encoder(); } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.h new file mode 100644 index 000000000000..10217516551b --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.h @@ -0,0 +1,26 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include "mike1808.h" + + +bool process_record_secrets(uint16_t keycode, keyrecord_t *record); + +bool process_record_encoder(uint16_t keycode, keyrecord_t *record); + +bool process_record_fun(uint16_t keycode, keyrecord_t *record); + +void keyboard_post_init_encoder(void); diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c new file mode 100644 index 000000000000..6f4d333ede3a --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c @@ -0,0 +1,71 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rgb_matrix_ledmaps.h" + +__attribute__((weak)) void rgb_matrix_indicators_keymap(void) { return; } +__attribute__((weak)) void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { + return; +} + +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + +static bool enabled = true; + +#endif // RGB_MATRIX_LEDMAPS_ENABLED + +void rgb_matrix_indicators_user(void) { rgb_matrix_indicators_keymap(); } +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + if (rgb_matrix_is_enabled() && enabled) { + set_layer_rgb(led_min, led_max, get_highest_layer(layer_state | default_layer_state)); + } + +#endif // RGB_MATRIX_LEDMAPS_ENABLED + rgb_matrix_indicators_advanced_keymap(led_min, led_max); +} + +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + +void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer) { + const ledmap *l = &(ledmaps[layer]); + + uint8_t val = rgb_matrix_get_val(); + + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + HSV hsv = { + .h = (*l)[i][0], + .s = (*l)[i][1], + .v = val, + }; + + if (hsv.h || hsv.s) { + RGB rgb = hsv_to_rgb(hsv); + RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + } + } +} + +void rgb_matrix_layers_enable() { + dprintf("ledmaps are enabled\n"); + enabled = true; +} + +void rgb_matrix_layers_disable() { + dprintf("ledmaps are disabled\n"); + enabled = false; +} + +#endif // RGB_MATRIX_LEDMAPS_ENABLED diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h new file mode 100644 index 000000000000..eace217d1876 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h @@ -0,0 +1,100 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + +// no association keycode +# define XXX \ + { 0, 0, 0 } + +// clang-format off +# define RGB_MATRIX_LAYOUT_LEDMAP( \ + ul1, k13, k26, k36, k31, k33, k07, k63, k71, k76, ka6, ka7, ka3, ka5, k97, k01, ur1, \ + ul2, k16, k17, k27, k37, k47, k46, k56, k57, k67, k77, k87, k86, k66, ka1, k65, ur2, \ + ul3, k11, k10, k20, k30, k40, k41, k51, k50, k60, k70, k80, k81, k61, ka2, k15, ur3, \ + ul4, k21, k12, k22, k32, k42, k43, k53, k52, k62, k72, k82, k83, ka4, k25, ur4, \ + ul5, k00, k14, k24, k34, k44, k45, k55, k54, k64, k74, k85, k91, k35, k75, ur5, \ + ul6, k06, k90, k93, k94, k95, k92, k04, k03, k73, k05, ur6 \ + ) \ + { \ + k13, k16, k11, k21, k00, k06, k26, k17, \ + k10, k12, k14, k90, k36, k27, k20, k22, \ + k24, k93, k31, k37, k30, k32, k34, k33, \ + k47, k40, k42, k44, k07, k46, k41, k43, \ + k45, k94, k63, k56, k51, k53, k55, k71, \ + k57, k50, k52, k54, k76, k67, k60, k62, \ + k64, k95, ka6, k77, k70, k72, k74, k92, \ + ka7, k87, k80, k82, k85, ka3, k86, k81, \ + k83, k04, ka5, ul1, ur1, k97, ul2, ur2, \ + k65, ul2, ur2, k15, ul3, ur3, k66, k05, \ + ul3, ur3, k75, ul4, ur4, ka1, k25, ul5, \ + ur5, k61, k91, ul6, ur6, ka2, k35, k03, \ + ka4, k73 \ + } +// clang-format on +typedef uint8_t ledmap[DRIVER_LED_TOTAL][3]; +extern const ledmap ledmaps[]; + +void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer); + +void rgb_matrix_layers_enable(void); +void rgb_matrix_layers_disable(void); + +// Just a handy defines to make our ledmaps look better +# define RED \ + { HSV_RED } +# define CORAL \ + { HSV_CORAL } +# define ORANGE \ + { HSV_ORANGE } +# define GOLDEN \ + { HSV_GOLDENROD } +# define GOLD \ + { HSV_GOLD } +# define YELLOW \ + { HSV_YELLOW } +# define CHART \ + { HSV_CHARTREUSE } +# define GREEN \ + { HSV_GREEN } +# define SPRING \ + { HSV_SPRINGGREEN } +# define TURQ \ + { HSV_TURQUOISE } +# define TEAL \ + { HSV_TEAL } +# define CYAN \ + { HSV_CYAN } +# define AZURE \ + { HSV_AZURE } +# define BLUE \ + { HSV_BLUE } +# define PURPLE \ + { HSV_PURPLE } +# define MAGENT \ + { HSV_MAGENTA } +# define PINK \ + { HSV_PINK } +# define BLACK \ + { HSV_BLACK } + +#endif // RGB_MATRIX_LEDMAPS_ENABLED + +void rgb_matrix_indicators_keymap(void); +void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max); diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rules.mk new file mode 100644 index 000000000000..a6d4e6259c52 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rules.mk @@ -0,0 +1,25 @@ +VIA_ENABLE = no + +COMBO_ENABLE = yes +COMMAND_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RAW_ENABLE = no +CONSOLE_ENABLE = yes + +WPM_ENABLE = no + +RGB_MATRIX_LEDMAPS = yes + +SRC += utils.c +SRC += mike1808.c +SRC += process_record.c +SRC += encoder.c + +ifeq ($(strip $(WPM_ENABLE)), yes) + SRC += fun.c +endif + +ifeq ($(strip $(RGB_MATRIX_LEDMAPS)), yes) + SRC += rgb_matrix_ledmaps.c + OPT_DEFS += -DRGB_MATRIX_LEDMAPS_ENABLED +endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.c new file mode 100644 index 000000000000..35ae20b126c5 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.c @@ -0,0 +1,64 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "utils.h" + +void store_rgb_state_to_eeprom() { + uint8_t mode = rgb_matrix_get_mode(); + uint8_t speed = rgb_matrix_get_speed(); + HSV color = rgb_matrix_get_hsv(); + + rgb_matrix_mode(mode); + rgb_matrix_set_speed(speed); + rgb_matrix_sethsv(color.h, color.s, color.v); +} + +void press(KeyPressState *self) { + self->_count++; + + dprintf("KPS: press: %d\n", self->_count); + + // pressed the first time + if (self->_count == 1) { + self->hander(true); + } +} + +void release(KeyPressState *self) { + self->_count--; + + dprintf("KPS: release: %d\n", self->_count); + + // all keys are relased + if (self->_count == 0) { + self->hander(false); + } +} + +void reset(KeyPressState *self) { + self->_count = 0; +} + +KeyPressState *NewKeyPressState(key_press_handler handler) { + KeyPressState *kps = (KeyPressState *)(malloc(sizeof(KeyPressState))); + + kps->_count = 0; + kps->press = press; + kps->release = release; + kps->reset = reset; + kps->hander = handler; + + return kps; +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.h new file mode 100644 index 000000000000..49d0745cf87b --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.h @@ -0,0 +1,32 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include "quantum.h" + +void store_rgb_state_to_eeprom(void); + +typedef void (*key_press_handler)(bool); + +typedef struct KeyPressState KeyPressState; +struct KeyPressState { + int _count; + void (*press)(KeyPressState *self); + void (*release)(KeyPressState *self); + void (*reset)(KeyPressState *self); + key_press_handler hander; +}; + +KeyPressState *NewKeyPressState(key_press_handler); diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/config.h new file mode 100644 index 000000000000..4f83c6af1f35 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/config.h @@ -0,0 +1,24 @@ +/* Copyright 2021 Tomas Guinan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +# define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif + +#define FORCE_NKRO diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c new file mode 100644 index 000000000000..5c702b168678 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c @@ -0,0 +1,471 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 Tomas Guinan + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "rgb_matrix_map.h" +#include "paddlegame.h" +#include + +enum custom_layers { + _BASE, + _FN1, + _MO2, + _MO3, +}; + +enum custom_keycodes { + KC_00 = SAFE_RANGE, + KC_WINLK, //Toggles Win key on and off +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_00: + if (record->event.pressed) { + // when keycode KC_00 is pressed + SEND_STRING("00"); + } else { + // when keycode KC_00 is released + } + break; + + case KC_WINLK: + if (record->event.pressed) { + if(!keymap_config.no_gui) { + process_magic(GUI_OFF, record); + } else { + process_magic(GUI_ON, record); + } + } else unregister_code16(keycode); + break; + } + return true; +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + [_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT( + KC_SLEP, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_INS, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_M_P, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_MO2), RGB_SAD, RGB_SAI, RESET, RGB_M_B, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_MOD, _______, RGB_M_R, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_M_SW, + _______, KC_WINLK, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI + ), + + [_MO2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TG(_MO2), _______, _______, _______, _______ + ), + + [_MO3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +#ifdef ENCODER_ENABLE // Encoder Functionality + + bool encoder_update_user(uint8_t index, bool clockwise) { + + switch(get_highest_layer(layer_state)) { + case _FN1: + if ( clockwise ) { + tap_code16(KC_PGDN); + } else { + tap_code16(KC_PGUP); + } + break; + + case _MO2: + // Game: Paddle movement + if (damage_count == 0) { + if ( clockwise ) { + if (paddle_pos_full < 15) ++paddle_pos_full; + } else { + if (paddle_pos_full > 0) --paddle_pos_full; + } + } + break; + + case _BASE: + default: + if ( clockwise ) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + return true; + } +#endif + +#ifdef RGB_MATRIX_ENABLE + void init_ball(uint8_t i) { + i &= 1; + ball[i].on = true; + ball[i].up = false; + ball[i].y = 0; + ball[i].x = rand() % 16; + + // Set initial ball state + if (ball[i].x < 8) { + ball[i].left = false; + } else { + ball[i].x -= 4; + ball[i].left = true; + } + + // 1/4 chance of being an enemy ball after level 6 + if (level_number > 3) { + ball[i].enemy = ((rand() % 4) == 0); + } else { + ball[i].enemy = false; + } + } + + void hurt_paddle(void) { + if (paddle_lives > 0) { + --paddle_lives; + } + damage_timer = timer_read(); + damage_count = 10; + + // Reset board + init_ball(0); + ball[1].on = false; + } + + // Capslock, Scroll lock and Numlock indicator on Left side lights. + void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + switch(get_highest_layer(layer_state)) { + case _FN1: + // Light up FN layer keys + if (!fn_active) { + fn_active = true; + rgb_value.r = 0xff; + rgb_value.g = 0x00; + rgb_value.b = 0x00; + } + + if (rgb_value.r == 0xff && rgb_value.g < 0xff) { + if (rgb_value.b > 0) { --rgb_value.b; } + else { ++rgb_value.g; } + } else if (rgb_value.g == 0xff && rgb_value.b < 0xff) { + if (rgb_value.r > 0) { --rgb_value.r; } + else { ++rgb_value.b; } + } else if (rgb_value.b == 0xff && rgb_value.r < 0xff) { + if (rgb_value.g > 0) { --rgb_value.g; } + else { ++rgb_value.r; } + } + + for (uint8_t i=0; i> 1; + + if (damage_count > 0) { + // Flash paddle when receiving damage + if (timer_elapsed(damage_timer) > 500) { + --damage_count; + damage_timer = timer_read(); + } + if ((damage_count & 1) == 0) { + for (uint8_t i=0; i < 3 ; i++) { + rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], RGB_RED); + } + } + if (damage_count == 0) { + ball_timer = timer_read(); + } + + + } else if (paddle_lives == 0) { + // Game over + for (uint8_t i=0; i= 12) { + // You win + if (rgb_value.r == 0xff && rgb_value.g < 0xff) { + if (rgb_value.b > 0) { --rgb_value.b; } + else { ++rgb_value.g; } + } else if (rgb_value.g == 0xff && rgb_value.b < 0xff) { + if (rgb_value.r > 0) { --rgb_value.r; } + else { ++rgb_value.b; } + } else if (rgb_value.b == 0xff && rgb_value.r < 0xff) { + if (rgb_value.g > 0) { --rgb_value.g; } + else { ++rgb_value.r; } + } + + for (uint8_t i=0; i < 3 ; i++) { + rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], rgb_value.r, rgb_value.g, rgb_value.b); + } + rgb_matrix_set_color(GAME_SMILE1[paddle_pos], rgb_value.r, rgb_value.g, rgb_value.b); + rgb_matrix_set_color(GAME_SMILE1[paddle_pos + 3], rgb_value.r, rgb_value.g, rgb_value.b); + rgb_matrix_set_color(GAME_SMILE2[paddle_pos], rgb_value.r, rgb_value.g, rgb_value.b); + rgb_matrix_set_color(GAME_SMILE2[paddle_pos + 3], rgb_value.r, rgb_value.g, rgb_value.b); + + } else { + // normal game loop + + // Set paddle position + for (uint8_t i=0; i < 3 ; i++) { + rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], RGB_GREEN); + } + + // Ball movement logic happens at intervals + if (timer_elapsed(ball_timer) > GAME_TIMER[level_number]) { + for (int i=0; i<2; ++i) { + if (ball[i].on) { + // Ball movement + if (ball[i].up) { + if (ball[i].y > 0) { + --ball[i].y; + if (!ball[i].left) ++ball[i].x; + } else { + // Count reflections. If > 10, increase level + ++bounce_count; + if (bounce_count >= 10) { + bounce_count = 0; + ++level_number; + } + ball[i].on = false; + } + } else { + ++ball[i].y; + if (ball[i].left) --ball[i].x; + if (ball[i].y > 4) { + // Remove a life if ball isn't returned and isn't enemy + if (!ball[i].enemy) { + hurt_paddle(); + i = 2; + } else { + ball[i].on = false; + } + } + } + } + } + if (ball[0].y == 4 && !ball[1].on) { + init_ball(1); + } + if (ball[1].y == 4 && !ball[0].on) { + init_ball(0); + } + if (!ball[0].on && !ball[1].on) { + init_ball(0); + } + ball_timer = timer_read(); + } + + // Other ball stuff + for (int i=0; i<2; ++i) { + if (ball[i].on) { + // Ball deflection logic + if (!ball[i].up && ball[i].y == 4 && (ball[i].x == paddle_pos || ball[i].x == paddle_pos - 1 || ball[i].x == paddle_pos + 1)) { + if (!ball[i].enemy) { + --ball[i].y; + if (!ball[i].left) { ++ball[i].x; } + ball[i].up = true; + } else { + hurt_paddle(); + i = 2; + } + } + + // Ball display + switch (ball[i].y) { + case 0: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R0[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R0[ball[i].x], RGB_WHITE); + } + break; + + case 1: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R1[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R1[ball[i].x], RGB_WHITE); + } + break; + + case 2: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R2[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R2[ball[i].x], RGB_WHITE); + } + break; + + case 3: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R3[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R3[ball[i].x], RGB_WHITE); + } + break; + + case 4: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R4[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R4[ball[i].x], RGB_WHITE); + } + break; + } + } + } + } + + + break; + + default: + fn_active = false; + if (game_start) { + // Reset lighting settings + game_start = false; + rgb_matrix_sethsv_noeeprom(last_hsv.h, last_hsv.s, last_hsv.v); + } + break; + } + + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + if (!caps_active) { + caps_active = true; + caps_flash_on = true; + caps_flasher = timer_read(); + } + if (timer_elapsed(caps_flasher) > 500) { + caps_flasher = timer_read(); + caps_flash_on = !caps_flash_on; + } + + rgb_matrix_set_color(LED_CAPS, RGB_WHITE); + if (caps_flash_on) { + for (uint8_t i=0; i + Copyright 2021 Tomas Guinan + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + + +const uint16_t GAME_TIMER[] = { + 400, 350, 300, 250, 400, 350, 300, 250, 225, 200, 175, 150 +}; + +bool game_start = false; +HSV last_hsv; +static uint8_t paddle_pos_full; +static uint8_t paddle_lives; +static uint8_t level_number; +static uint8_t bounce_count; +static uint8_t damage_count; +static uint16_t damage_timer; +static uint16_t ball_timer; + +struct BallStruct +{ + uint8_t x; + uint8_t y; + bool on; + bool up; + bool left; + bool enemy; +}; + +struct BallStruct ball[2]; + +void init_ball(uint8_t i); +void hurt_paddle(void); \ No newline at end of file diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/readme.md new file mode 100644 index 000000000000..c6da7f5f47f6 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/readme.md @@ -0,0 +1,18 @@ +![GMMK Pro Paddle Game zLayout Image](https://i.imgur.com/RYcKyOj.png) + +# Paddle Game GMMK Pro layout by Tomas Guinan + +- Add Print Screen, Scroll Lock, Pause/Break, Insert to Fn layer +- Toggle backlight using Fn+` + - If you don't like using a backlight but wnat to play the paddle game or + use other RGB features, turn RGB on and set brightness to 0 +- Usable Fn layer keys are backlit +- Implement Win key lock using Fn+Win like in Glorious Core firmware +- Caps Lock and Scroll Lock keys light up white when active +- Caps Lock has red flashing side lights like in Glorious Core firmware +- Layer 2 includes Paddle Game, playable by pressing Fn+P + - Use rotary encoder to control paddle + - Contains 12 levels, indicated by blue LED on F row + - Player has 4 lives, indicated by nav cluster + - Deflect white balls while avoiding red ones + - Press Fn to quit game diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/rgb_matrix_map.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/rgb_matrix_map.h new file mode 100644 index 000000000000..06d34ba6cb17 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/rgb_matrix_map.h @@ -0,0 +1,181 @@ +/* Copyright 2021 Tomas Guinan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#ifdef RGB_MATRIX_ENABLE + + bool fn_active = false; + bool caps_active = false; + bool caps_flash_on = false; + + static uint16_t caps_flasher = 0; + RGB rgb_value; + + // RGB LED locations + enum led_location_map { + LED_ESC, // 0, ESC, k13 + LED_GRV, // 1, ~, k16 + LEB_TAB, // 2, Tab, k11 + LED_CAPS, // 3, Caps, k21 + LED_LSFT, // 4, Sh_L, k00 + LED_LCTL, // 5, Ct_L, k06 + LED_F1, // 6, F1, k26 + LED_1, // 7, 1, k17 + LED_Q, // 8, Q, k10 + LED_A, // 9, A, k12 + LED_Z, // 10, Z, k14 + LED_LWIN, // 11, Win_L, k90 + LED_F2, // 12, F2, k36 + LED_2, // 13, 2, k27 + LED_W, // 14, W, k20 + LED_S, // 15, S, k22 + LED_X, // 16, X, k24 + LED_LALT, // 17, Alt_L, k93 + LED_F3, // 18, F3, k31 + LED_3, // 19, 3, k37 + LED_E, // 20, E, k30 + LED_D, // 21, D, k32 + LED_C, // 22, C, k34 + LED_F4, // 23, F4, k33 + LED_4, // 24, 4, k47 + LED_R, // 25, R, k40 + LED_F, // 26, F, k42 + LED_V, // 27, V, k44 + LED_F5, // 28, F5, k07 + LED_5, // 29, 5, k46 + LED_T, // 30, T, k41 + LED_G, // 31, G, k43 + LED_B, // 32, B, k45 + LED_SPC, // 33, SPACE, k94 + LED_F6, // 34, F6, k63 + LED_6, // 35, 6, k56 + LED_Y, // 36, Y, k51 + LED_H, // 37, H, k53 + LED_N, // 38, N, k55 + LED_F7, // 39, F7, k71 + LED_7, // 40, 7, k57 + LED_U, // 41, U, k50 + LED_J, // 42, J, k52 + LED_M, // 43, M, k54 + LED_F8, // 44, F8, k76 + LED_8, // 45, 8, k67 + LED_I, // 46, I, k60 + LED_K, // 47, K, k62 + LED_COMM, // 48, ,, k64 + LED_RALT, // 49, Alt_R, k95 + LED_F9, // 50, F9, ka6 + LED_9, // 51, 9, k77 + LED_O, // 52, O, k70 + LED_L, // 53, L, k72 + LED_DOT, // 54, ., k74 + LED_FN, // 55, FN, k92 + LED_F10, // 56, F10, ka7 + LED_0, // 57, 0, k87 + LED_P, // 58, P, k80 + LED_SCLN, // 59, ;, k82 + LED_SLSH, // 60, ?, k85 + LED_F11, // 61, F11, ka3 + LED_MINS, // 62, -, k86 + LED_LBRC, // 63, [, k81 + LED_QUOT, // 64, ", k83 + LED_RCTL, // 65, Ct_R, k04 + LED_F12, // 66, F12, ka5 + LED_L1, // 67, LED, l01 + LED_R1, // 68, LED, l11 + LED_DEL, // 69, Del, k97 + LED_L2, // 70, LED, l02 + LED_R2, // 71, LED, l12 + LED_HOME, // 72, Home, k65 + LED_L3, // 73, LED, l03 + LED_R3, // 74, LED, l13 + LED_PGUP, // 75, PgUp, k15 + LED_L4, // 76, LED, l04 + LED_R4, // 77, LED, l14 + LED_EQL, // 78, =, k66 + LED_RIGHT, // 79, Right, k05 + LED_L5, // 80, LED, l05 + LED_R5, // 81, LED, l15 + LED_END, // 82, End, k75 + LED_L6, // 83, LED, l06 + LED_R6, // 84, LED, l16 + LED_BSPC, // 85, BSpc, ka1 + LED_PGDN, // 86, PgDn, k25 + LED_L7, // 87, LED, l07 + LED_R7, // 88, LED, l17 + LED_RBRC, // 89, ], k61 + LED_RSFT, // 90, Sh_R, k91 + LED_L8, // 91, LED, l08 + LED_R8, // 92, LED, l18 + LED_BSLS, // 93, \, ka2 + LED_UP, // 94, Up, k35 + LED_LEFT, // 95, Left, k03 + LED_ENT, // 96, Enter, ka4 + LED_DOWN // 97, Down, k73 + }; + + const uint8_t LED_RGB[] = { + LED_MINS, LED_EQL, + LED_LBRC, LED_RBRC, + LED_SCLN, LED_QUOT, + LED_HOME, LED_PGUP, LED_PGDN, LED_END, + LED_UP, LED_DOWN, LED_LEFT, LED_RIGHT + }; + + const uint8_t LED_GREEN[] = { + LED_F1, LED_F2, LED_F3, LED_F4, + LED_F5, LED_F6, LED_F7, LED_F8 + }; + + const uint8_t LED_WHITE[] = { + LED_F9, LED_F10, LED_F11, LED_DEL + }; + + const uint8_t LED_SIDE_LEFT[] = { LED_L1, LED_L2, LED_L3, LED_L4, LED_L5, LED_L6, LED_L7, LED_L8}; + + const uint8_t LED_SIDE_RIGHT[] = { LED_R1, LED_R2, LED_R3, LED_R4, LED_R5, LED_R6, LED_R7, LED_R8}; + + // Breakout LED rules + + const uint8_t GAME_LIVES[] = { LED_HOME, LED_PGUP, LED_PGDN, LED_END }; + const uint8_t GAME_PADDLE[] = { + LED_Z, LED_X, LED_C, LED_V, LED_B, LED_N, LED_M, LED_COMM, LED_DOT, LED_SLSH + }; + const uint8_t GAME_SMILE1[] = { + LED_A, LED_S, LED_D, LED_F, LED_G, LED_H, LED_J, LED_K, LED_L, LED_SCLN, LED_QUOT + }; + const uint8_t GAME_SMILE2[] = { + LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL + }; + const uint8_t GAME_R4[] = { + LED_X, LED_C, LED_V, LED_B, LED_N, LED_M, LED_COMM, LED_DOT + }; + const uint8_t GAME_R3[] = { + LED_S, LED_D, LED_F, LED_G, LED_H, LED_J, LED_K, LED_L, LED_SCLN + }; + const uint8_t GAME_R2[] = { + LED_W, LED_E, LED_R, LED_T, LED_Y, LED_U, LED_I, LED_O, LED_P, LED_LBRC + }; + const uint8_t GAME_R1[] = { + LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL + }; + const uint8_t GAME_R0[] = { + LED_F1, LED_F2, LED_F3, LED_F4, LED_F5, LED_F6, LED_F7, LED_F8, LED_F9, LED_F10, LED_F11, LED_F12 + }; + + const uint8_t LED_GAME_OVER[] = { LED_5, LED_8, LED_F, LED_G, LED_H, LED_J, LED_C, LED_M }; + + +#endif \ No newline at end of file diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/rules.mk new file mode 100644 index 000000000000..a3f5bfd35c0e --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = no +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +RGB_MATRIX_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/config.h new file mode 100644 index 000000000000..78ff96f8b70e --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/config.h @@ -0,0 +1,75 @@ +/* Copyright 2021 stickandgum + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// I like NKRO.. but let's not force it. @drashna pointed out some older hardware has issues - Toggle it via keycode if you like. +// #define FORCE_NKRO + +// At the time of this, there are 41 effects! That may be a bit too many to cycle through - keeping what I believe is the best. +#ifdef RGB_MATRIX_ENABLE + +// #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR + +// Below added per: https://beta.docs.qmk.fm/using-qmk/hardware-features/lighting/feature_rgb_matrix#suspended-state-id-suspended-state + #define RGB_DISABLE_WHEN_USB_SUSPENDED + + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap, Rain + #define RGB_MATRIX_KEYPRESSES // REACTIVE, SPLASH modes + +// Soon we need to ENABLE modes by DEFAULT soon as per: https://github.com/qmk/qmk_firmware/pull/13758 Thanks @noroadsleft +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // BUILT IN (MAPPED!) Static single color. +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Accenting various keys on the keyboard. +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Top down rainbow! +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Left Right Rainbow (the top-down is better imho). + // #undef ENABLE_RGB_MATRIX_BREATHING // Built in (MAPPED!) + // #undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right (with white) + // #undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right (with black) +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades sat (RGB_MATRIX_CYCLE_PINWHEEL) +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // See above +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // See above + // #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness (with black) +# undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard cycling through rainbow + // #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // BUILT IN (MAPPED!) Full Rainbow Left to Right +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Rainbow circles coming to center. +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Two Rainbow circles coming to 1/3 and 2/3 points. +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right + // #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // BUILT IN (MAPPED!) - Consider disabling this - my poor eyes. +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# undef ENABLE_RGB_MATRIX_DUAL_BEACON // Two rainbows spinning around keyboards +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Similar to above. +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enough of the spinning rainbows - we get it! :-) +# undef ENABLE_RGB_MATRIX_RAINDROPS // Jellybeans are better. + // #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation - better than above. +# undef ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +# undef ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right + // #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // Hot keys! + // #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // The Matrix! +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Key hits shown in current hue - all other keys black: wide slightly better imo +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Key hits shown in current hue - all other keys shifted hue + // #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse around a single key hit then fades value out (black otherwise) +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // same as above but a bit too intense imo. +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Column and Row single color fade. +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Column and Row single color fade. (Multi-keys) +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of key hit then fades +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multi-key hit then fades +# undef ENABLE_RGB_MATRIX_SPLASH // Full rainbow pulses from key hit. All else black. +# undef ENABLE_RGB_MATRIX_MULTISPLASH // Full rainbow pulses from multi-keys. All else black. +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Single color pulses from key hit. All else black. (Using solid_reactive_wide instead). +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Single color pulses from muli-keys. All else black. (Using solid_reactive_wide instead). +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c new file mode 100644 index 000000000000..762fe00df23f --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c @@ -0,0 +1,300 @@ +/* Copyright 2021 stickandgum GMMK Pro ANSI Enhanced Keymap File + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum my_keycodes { + LED_TILDE = SAFE_RANGE, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0, + LED_MINS, + LED_EQL, + QMKBEST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_CALC, KC_MYCM, KC_MSEL, KC_MAIL, KC_WHOM, _______, _______, _______, _______, _______, KC_WAKE, KC_SLEP, KC_PAUS, _______, + LED_TILDE, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, KC_INS, KC_SLCK, + _______, RGB_SAI, RGB_VAI, RGB_HUI, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_BRIU, + _______, RGB_RMOD, RGB_VAD, RGB_MOD, RGB_SPI, _______, _______, _______, _______, QMKBEST, _______, _______, _______, KC_BRID, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_MPLY, KC_PWR, + _______, _______, _______, _______, KC_RALT, _______, KC_APP, KC_MPRV, KC_MSTP, KC_MNXT + ), + +}; + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + // https://beta.docs.qmk.fm/using-qmk/simple-keycodes/feature_advanced_keycodes#alt-escape-for-alt-tab-id-alt-escape-for-alt-tab + if (get_mods() & MOD_MASK_CTRL) { // If CTRL is held + uint8_t mod_state = get_mods(); // Store all modifiers that are held + unregister_mods(MOD_MASK_CTRL); // Immediately unregister the CRTL key (don't send CTRL-PgDn) - del_mods doesn't work here (not immediate) + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + set_mods(mod_state); // Add back in the CTRL key - so ctrl-key will work if ctrl was never released after paging. + } else if (get_mods() & MOD_MASK_SHIFT) { + uint8_t mod_state = get_mods(); + unregister_mods(MOD_MASK_SHIFT); + if (clockwise) { + #ifdef MOUSEKEY_ENABLE // If using the mouse scroll - make sure MOUSEKEY is enabled + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_VOLU); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_VOLD); + #endif + } + set_mods(mod_state); + } else if (clockwise) { // All else volume. + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif //ENCODER_ENABLE + +#ifdef RGB_MATRIX_ENABLE +static void set_rgb_caps_leds_on(void); +static void set_rgb_scroll_leds_on(void); +static void set_rgb_caps_leds_off(void); +static void set_rgb_scroll_leds_off(void); + +// Called on powerup and is the last _init that is run. +void keyboard_post_init_user(void) { + + int mods[35] = {0,2,3,4,5,11,17,33,49,55,65,95,97,79,94,85,93,96,90,69,92,67,76,80,91,75,86,68,77,81,92,28,34,39,44}; + int j; + + /* output each array element's value */ + for (j = 0; j < 35; j++ ) { + g_led_config.flags[mods[j]] = LED_FLAG_MODIFIER; + } + + if (!rgb_matrix_is_enabled()) { + rgb_matrix_enable(); +#ifdef CONSOLE_ENABLE + uprintf("ERROR! RGB Matrix Enabled and wrote to EEPROM! -How was the RGB Matrix Disabled?"); +#endif + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef CONSOLE_ENABLE + switch(rgb_matrix_get_flags()) { + case 0x08: + uprintf("FLAG: LED_FLAG_INDICATOR "); + break; + case 0x04: + uprintf("FLAG: LED_FLAG_KEYLIGHT "); + break; + case 0x02: + uprintf("FLAG: LED_FLAG_UNDERGLOW "); + break; + case 0x01: + uprintf("FLAG: LED_FLAG_MODIFIER "); + break; + case 0xFF: + uprintf("FLAG: LED_FLAG_ALL "); + break; + case 0x00: + uprintf("FLAG: LED_FLAG_NONE "); + break; + default: + uprintf("FLAG Other: %u ", rgb_matrix_get_flags()); + } + uprintf("Caps? %d Scroll? %d - MATRIX: %d\n", host_keyboard_led_state().caps_lock, host_keyboard_led_state().scroll_lock, rgb_matrix_is_enabled()); +#endif //CONSOLE_ENABLE + + switch (keycode) { + case RGB_TOG: + if (record->event.pressed) { + if (rgb_matrix_get_flags() == LED_FLAG_ALL) { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + } else { + rgb_matrix_set_flags(LED_FLAG_ALL); + } + } + return false; + case LED_TILDE: + rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); // Can use RGB_M_P built-in keycode instead. + break; + case LED_1: + rgb_matrix_mode(RGB_MATRIX_ALPHAS_MODS); + break; + case LED_2: + rgb_matrix_mode(RGB_MATRIX_GRADIENT_UP_DOWN); + break; + case LED_3: + rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS); + break; + case LED_4: + rgb_matrix_mode(RGB_MATRIX_BAND_SAT); + break; + case LED_5: + rgb_matrix_mode(RGB_MATRIX_BAND_VAL); + break; + case LED_6: + rgb_matrix_mode(RGB_MATRIX_BAND_SPIRAL_VAL); + break; + case LED_7: + rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); // Can use RGB_M_R built-in keycode instead. + break; + case LED_8: + rgb_matrix_mode(RGB_MATRIX_CYCLE_PINWHEEL); // Can use RGB_M_SW built-in keycode instead. + break; + case LED_9: + rgb_matrix_mode(RGB_MATRIX_BREATHING); // Can use RGB_M_B built-in keycode instead. + break; + #ifdef RGB_MATRIX_KEYPRESSES // Reactive effects require RGB_MATRIX_KEYPRESSES in config.h + case LED_0: + rgb_matrix_mode(RGB_MATRIX_SOLID_REACTIVE_WIDE); + break; + #endif //RGB_MATRIX_KEYPRESSES + #ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap and Rain require #define RGB_MATRIX_FRAMEBUFFER_EFFECTS in config.h + case LED_MINS: + rgb_matrix_mode(RGB_MATRIX_DIGITAL_RAIN); + break; + case LED_EQL: + rgb_matrix_mode(RGB_MATRIX_TYPING_HEATMAP); + break; + #endif //RGB_MATRIX_FRAMEBUFFER_EFFECTS + case QMKBEST: + if (record->event.pressed) { // when keycode QMKBEST is pressed + SEND_STRING("QMK rocks"); + } else { // when keycode QMKBEST key is released + SEND_STRING("!!"); + } + break; + } + return true; +} + +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds_on(); + } else { + if (rgb_matrix_get_flags() == LED_FLAG_NONE){ + set_rgb_caps_leds_off(); + } + } + if (host_keyboard_led_state().scroll_lock) { + set_rgb_scroll_leds_on(); + } else { + if (rgb_matrix_get_flags() == LED_FLAG_NONE){ + set_rgb_scroll_leds_off(); + } + } +} + +// RGB led number layout, function of the key + +// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12 +// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13 +// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14 +// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15 +// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16 +// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17 +// 87, led 07 88, led 18 +// 91, led 08 92, led 19 + +static void set_rgb_caps_leds_on() { + rgb_matrix_set_color(0, 255, 0, 0); //Escape Key + rgb_matrix_set_color(3, 255, 0, 0); //capslock key + rgb_matrix_set_color(5, 255, 0, 0); //Left CTRL key + rgb_matrix_set_color(67, 255, 0, 0); //Left LED 01 + rgb_matrix_set_color(68, 255, 0, 0); //Right LED 12 + rgb_matrix_set_color(70, 255, 127, 0); //Left LED 02 + rgb_matrix_set_color(71, 255, 127, 0); //Right LED 13 + rgb_matrix_set_color(73, 255, 255, 0); //Left LED 03 + rgb_matrix_set_color(74, 255, 255, 0); //Right LED 14 + rgb_matrix_set_color(76, 0, 255, 0); //Left LED 04 + rgb_matrix_set_color(77, 0, 255, 0); //Right LED 15 + rgb_matrix_set_color(80, 0, 0, 255); //Left LED 05 + rgb_matrix_set_color(81, 0, 0, 255); //Right LED 16 + rgb_matrix_set_color(83, 46, 43, 95); //Left LED 06 + rgb_matrix_set_color(84, 46, 43, 95); //Right LED 17 + rgb_matrix_set_color(87, 139, 0, 255); //Left LED 07 + rgb_matrix_set_color(88, 139, 0, 255); //Right LED 18 + rgb_matrix_set_color(91, 255, 255, 255); //Left LED 08 + rgb_matrix_set_color(92, 255, 255, 255); //Right LED 19 +} + +static void set_rgb_caps_leds_off() { + rgb_matrix_set_color(0, 0, 0, 0); //Escape Key + rgb_matrix_set_color(3, 0, 0, 0); //capslock key + rgb_matrix_set_color(5, 0, 0, 0); //Left CTRL key + rgb_matrix_set_color(67, 0, 0, 0); //Left LED 01 + rgb_matrix_set_color(68, 0, 0, 0); //Right LED 12 + rgb_matrix_set_color(70, 0, 0, 0); //Left LED 02 + rgb_matrix_set_color(71, 0, 0, 0); //Right LED 13 + rgb_matrix_set_color(73, 0, 0, 0); //Left LED 03 + rgb_matrix_set_color(74, 0, 0, 0); //Right LED 14 + rgb_matrix_set_color(76, 0, 0, 0); //Left LED 04 + rgb_matrix_set_color(77, 0, 0, 0); //Right LED 15 + rgb_matrix_set_color(80, 0, 0, 0); //Left LED 05 + rgb_matrix_set_color(81, 0, 0, 0); //Right LED 16 + rgb_matrix_set_color(83, 0, 0, 0); //Left LED 06 + rgb_matrix_set_color(84, 0, 0, 0); //Right LED 17 + rgb_matrix_set_color(87, 0, 0, 0); //Left LED 07 + rgb_matrix_set_color(88, 0, 0, 0); //Right LED 18 + rgb_matrix_set_color(91, 0, 0, 0); //Left LED 08 + rgb_matrix_set_color(92, 0, 0, 0); //Right LED 19 +} + +static void set_rgb_scroll_leds_on() { + rgb_matrix_set_color(72, 255, 255, 255); // Under Rotary (HOME) +} + +static void set_rgb_scroll_leds_off() { + rgb_matrix_set_color(72, 0, 0, 0); // Under Rotary (HOME) +} + +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/readme.md new file mode 100644 index 000000000000..c4e2225433ec --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/readme.md @@ -0,0 +1,63 @@ +# Glorious GMMK Pro / ANSI - Enhanced Keyboard + +Tried to incorporate full featured GMMK Pro keyboard functionality without adding unnecessary features. Included Scroll Lock and Caps LEDs. NKRO can be toggled (Fn + N). +SHIFT and Ctrl keys for scrolling with the rotary, Fn-keys also used for screen brightness, media, PowerOff, Suspend, App Shortcuts, and RGB Toggle/Modifications. Trimmed down the amazing (currently 41) built-in RGB effects down to about 13 or so reasonable effects that feel are just enough for your entertainment without being too excessive. + +BIG thank you to [AndreBrait](https://github.com/andrebrait), And of course, @drashna and @filterpaper, @noroadsleft and the entire discord community. + +* Keymap Creator: [StickAndGum](https://github.com/StickAndGum) +* Keyboard: [More info on GMMK Pro](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black) +* Controller [STM32F303CCT6](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) + +* Layout: + ![keyboard-layout](https://user-images.githubusercontent.com/22257588/130371838-875ba65b-88ea-4f81-a44a-bb24194c4989.png) + +Features are as follows: + +Rotary: + - Default: Volume Up/Down + - Shift: Mouse Wheel Down/Up + - Ctrl: Page Down/Up + +Top/Default Layer: + - Print Screen -> Print Screen (Left of rotary) + - Delete -> Home (Under Rotary) + - Right Alt -> Delete (Right of Spacebar) + - All other keys defaults. + +Fn Layer: + - Fn + \ -> Bootloader Mode (Can also hold ESC while powering up) - If hit by mistake, just unplug and replug in. + - Fn + Backspace -> Insert + - Fn + Print -> Pause/Break + - Fn + Home -> Scroll Lock (Lights up white!) + - Fn + Del (right of space) -> Right-Alt key. + - Fn + RCtrl (right of Fn) -> Menu/App key. + - Fn + N -> Toggle NKRO + - Fn + End -> Power Off Computer + - Fn + F12 -> Suspend Computer + - Fn + F11 -> Wake Computer (Necessary on MAC OS?) + - Fn + Page Up / Down -> Laptop Screen Brightness Up/Down + - Fn + F1 - F5 -> Launch Calc, My Comp (Explorer), Media Player, Mail Client, Web Browser. + - Fn + Up, Down, Left, Right Arrows -> Media Play, Stop, Previous, Next respectively. + +- RGB Information: + - Toggle for RGB via Fn-r (CAPS & ScrlLock still Light/Indicate) + - CAPS: Side Light Rainbow Indicators and Left-side RED Indicators + - Scroll-Lock: Fn-Home (Under Rotary) white indicator. + - Modifiers identified around most of the edge of keyboard / Side lights also accented (Fn-1 looks GREAT IMHO) + +- RGB Modifing (all via Function key) all via wasdqerf (common gaming keys) - easy to remember. + - Fn + r -> Toggle RGB + - Fn + w,s -> Brightness Up, Down + - Fn + a,d -> Cycle Forward/Backward through rgb effects + - Fn + q -> Increase or Decrease Saturation (use SHIFT key to lower) + - Fn + e -> Increase or Decrease Hue/Color (use SHIFT key to lower) + - Fn + f -> Increase or Decrease Speed (Using "F" for Fast!) (Use SHIFT for slower) + - Fn + ~, 0-9, - = keys (2nd row keys) -> 13 RGB different effects arranged to my liking. Fn-1 is my favorite. + - Fn + L -> My easter egg... "QMK rocks!" + +- Known issues: + - The Heatmap and Matrix FrameBuffer effects (Fn - and =) are a bit buggy - F-keys light up when they shouldn't and the Caps/Scroll lights don't turn off properly when using. Just change the effect to something else to fix this. + - If you find a fix for this, please let me know. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/rules.mk new file mode 100644 index 000000000000..6440dc6d4123 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/rules.mk @@ -0,0 +1,2 @@ +CONSOLE_ENABLE = no +MOUSEKEY_ENABLE = yes diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/wholesomeducky/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/wholesomeducky/keymap.c new file mode 100644 index 000000000000..fded5325621e --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/wholesomeducky/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Ct_L A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up Win_R +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MEDIA_PLAY_PAUSE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_RGUI, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, RESET, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END + ), + +}; + + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_MS_WH_RIGHT); + } else { + tap_code(KC_MS_WH_LEFT); + } + return true; +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.c new file mode 100644 index 000000000000..a32fef1041ee --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute) + // ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home + // Tab Q W E R T Y U I O P [ ] \ PgUp + // Caps A S D F G H J K L ; " Enter PgDn + // Sh_L Z X C V B N M , . ? Sh_R Up End + // Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; +// clang-format on + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.json b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.json new file mode 100644 index 000000000000..d2325d2c13bd --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.json @@ -0,0 +1,181 @@ +{ + "version": 1, + "notes": "", + "documentation": "\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", + "keyboard": "gmmk/pro", + "keymap": "willwm", + "layout": "LAYOUT", + "layers": [ + [ + "KC_ESC", + "KC_F1", + "KC_F2", + "KC_F3", + "KC_F4", + "KC_F5", + "KC_F6", + "KC_F7", + "KC_F8", + "KC_F9", + "KC_F10", + "KC_F11", + "KC_F12", + "KC_DEL", + "KC_MUTE", + "KC_GRV", + "KC_1", + "KC_2", + "KC_3", + "KC_4", + "KC_5", + "KC_6", + "KC_7", + "KC_8", + "KC_9", + "KC_0", + "KC_MINS", + "KC_EQL", + "KC_BSPC", + "KC_HOME", + "KC_TAB", + "KC_Q", + "KC_W", + "KC_E", + "KC_R", + "KC_T", + "KC_Y", + "KC_U", + "KC_I", + "KC_O", + "KC_P", + "KC_LBRC", + "KC_RBRC", + "KC_BSLS", + "KC_PGUP", + "MO(1)", + "KC_A", + "KC_S", + "KC_D", + "KC_F", + "KC_G", + "KC_H", + "KC_J", + "KC_K", + "KC_L", + "KC_SCLN", + "KC_QUOT", + "KC_ENT", + "KC_PGDN", + "KC_LSFT", + "KC_Z", + "KC_X", + "KC_C", + "KC_V", + "KC_B", + "KC_N", + "KC_M", + "KC_COMM", + "KC_DOT", + "KC_SLSH", + "KC_RSFT", + "KC_UP", + "KC_END", + "KC_LCTL", + "KC_LGUI", + "KC_LALT", + "KC_SPC", + "KC_RALT", + "MO(1)", + "KC_RCTL", + "KC_LEFT", + "KC_DOWN", + "KC_RGHT" + ], + [ + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_INS", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_PSCR", + "KC_CAPS", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "RESET", + "KC_NO", + "KC_TRNS", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_PGUP", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_TRNS", + "KC_NO", + "KC_HOME", + "KC_PGDN", + "KC_END" + ] + ], + "author": "" +} \ No newline at end of file diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/readme.md new file mode 100644 index 000000000000..1c169faac6ef --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/readme.md @@ -0,0 +1,22 @@ +layer0 +layer1 + +# willwm GMMK Pro Layout + +Based on [gmmk/pro/keymaps/default](../default/keymap.c), with [VIA support](./rules.mk) + +Layer 0 + +* Delete between F12 and rotary encoder (replaces PrtSc) +* Home below rotary encoder (replaces Del) +* MO(1) in default location and Caps Lock location + +Layer 1 + +* Tab -> Caps Lock +* Del -> Insert +* Home -> PrtSc +* Left Arrow -> Home +* Right Arrow -> End +* Up Arrow -> PgUp +* Down Arrow -> PgDn diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/rules.mk new file mode 100644 index 000000000000..511b50e19ce1 --- /dev/null +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +UNICODE_ENABLE = yes diff --git a/keyboards/handwired/2x2keypad/2x2keypad.c b/keyboards/handwired/2x2keypad/2x2keypad.c new file mode 100644 index 000000000000..34bfc27d5abf --- /dev/null +++ b/keyboards/handwired/2x2keypad/2x2keypad.c @@ -0,0 +1,25 @@ +#include "2x2keypad.h" + + +void matrix_init_kb(void) +{ + matrix_init_user(); + + /* setPinOutput(RED_LED); */ + /* setPinOutput(BLUE_LED); */ + /* setPinOutput(GREEN_LED); */ +} + + + +/* void turn_off_leds(void) */ +/* { */ +/* writePinLow(RED_LED); */ +/* writePinLow(BLUE_LED); */ +/* writePinLow(GREEN_LED); */ +/* } */ + +/* void turn_on_led(pin_t pin) */ +/* { */ +/* writePinHigh(pin); */ +/* } */ diff --git a/keyboards/handwired/2x2keypad/2x2keypad.h b/keyboards/handwired/2x2keypad/2x2keypad.h new file mode 100644 index 000000000000..b28339e3a9bf --- /dev/null +++ b/keyboards/handwired/2x2keypad/2x2keypad.h @@ -0,0 +1,14 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, \ + K10, K11 \ +) { \ + { K00, K01 }, \ + { K10, K11 } \ +} + +void turn_off_leds(void); +void turn_on_led(pin_t pin); diff --git a/keyboards/handwired/2x2keypad/config.h b/keyboards/handwired/2x2keypad/config.h new file mode 100644 index 000000000000..fb2ff7ca0369 --- /dev/null +++ b/keyboards/handwired/2x2keypad/config.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0004 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 501 +#define PRODUCT 2x2keypad + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 2 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F7 } +#define MATRIX_COL_PINS { F6, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Tap dancing params */ +#define TAPPING_TERM 250 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/handwired/2x2keypad/keymaps/default/keymap.c b/keyboards/handwired/2x2keypad/keymaps/default/keymap.c new file mode 100644 index 000000000000..e3e09faa9d71 --- /dev/null +++ b/keyboards/handwired/2x2keypad/keymaps/default/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT(KC_0, KC_1, + KC_SPC, KC_BSPC + ), +}; diff --git a/keyboards/handwired/2x2keypad/keymaps/default/rules.mk b/keyboards/handwired/2x2keypad/keymaps/default/rules.mk new file mode 100644 index 000000000000..4730f1fe4eee --- /dev/null +++ b/keyboards/handwired/2x2keypad/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = no diff --git a/keyboards/handwired/2x2keypad/rules.mk b/keyboards/handwired/2x2keypad/rules.mk new file mode 100644 index 000000000000..6d0028f5f6d4 --- /dev/null +++ b/keyboards/handwired/2x2keypad/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + + +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE= no # Console for debug +EXTRAKEY_ENABLE = yes # Audio control and System control +MOUSEKEY_ENABLE = yes # Mouse keys +NKRO_ENABLE = yes # USB Nkey Rollover - + +RGBLIGHT_ENABLE = no +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/xd128/config.h b/keyboards/handwired/xd128/config.h new file mode 100644 index 000000000000..1f7ba8a6ec2e --- /dev/null +++ b/keyboards/handwired/xd128/config.h @@ -0,0 +1,127 @@ +/* +Copyright 2017 Benjamin Kesselring + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1351 +#define PRODUCT_ID 0x7373 +#define DEVICE_VER 0x0001 +#define MANUFACTURER cherry? +#define PRODUCT XD128 +#define DESCRIPTION XD128 16x8 ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { C5, C6, C7, F7, F6, F5, F4, F3 } +#define MATRIX_COL_PINS { C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2, D1, D0, B7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN F5 +// #define BACKLIGHT_LEVELS 6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +#endif diff --git a/keyboards/handwired/xd128/keymaps/levi_layout/keymap.c b/keyboards/handwired/xd128/keymaps/levi_layout/keymap.c new file mode 100644 index 000000000000..5b5b69344609 --- /dev/null +++ b/keyboards/handwired/xd128/keymaps/levi_layout/keymap.c @@ -0,0 +1,154 @@ +/* + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _DV 0 +#define _QW 1 +#define _FN 2 + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* DVORAK + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | | QWERTY | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * |PlyPause| MPrev | MNext | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | `~ | 1 | 2 | 3 | 4 | 5 | [ | PSCR | ] | ] | 6 | 7 | 8 | 9 | 0 | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | ' | , | . | P | Y | ESC | \ | ENT | ENT | F | G | C | R | L | / | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTL | A | O | E | U | I | HOME | UNDO | PG UP | PG UP | D | H | T | N | S | - | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------+--------| + * | LSHIFT | ; | Q | J | K | X | END | UP | PG DN | PG DN | B | M | W | V | Z | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------+--------| + * | LCTL | LGUI | Z | LALT | DEL | SPACE | LEFT | DOWN | RGHT | RGHT |MO(_FN) | BSPC | DEL | RALT | RGUI | RCTRL | + * '-----------------------------------------------*------------------------------------*----------------------------------------------------------' + */ + + [_DV] = LAYOUT( /* DVORAK */ + KC_NO, TO(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_PSCR, KC_RBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_ESC, KC_BSLS, KC_ENT, KC_ENT, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_HOME, KC_UNDO, KC_PGUP, KC_PGUP, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_END, KC_UP, KC_PGDN, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LGUI, KC_Z, KC_LALT, KC_DEL, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_RGHT, MO(_FN), KC_BSPC, KC_DEL, KC_RALT, KC_RGUI, KC_RCTL + ), +/* QWERTY + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | DVORAK | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * |PlyPause| MPrev | MNext | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | `~ | 1 | 2 | 3 | 4 | 5 | [ | PSCR | ] | ] | 6 | 7 | 8 | 9 | 0 | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | Q | W | E | R | T | ESC | \ | ENT | ENT | Y | U | I | O | P | / | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTL | A | S | D | F | G | HOME | UNDO | PG UP | PG UP | H | J | K | L | ; | - | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------+--------| + * | LSHIFT | Z | X | C | V | B | END | UP | PG DN | PG DN | N | M | , | . | ' | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------+--------| + * | LCTL | LGUI | Z | LALT | DEL | SPACE | LEFT | DOWN | RGHT | RGHT |MO(_FN) | BSPC | DEL | RALT | RGUI | RCTRL | + * '-----------------------------------------------*------------------------------------*-------------------------------------------------+--------' + */ + [_QW] = LAYOUT( /* QWERTY */ + TO(_DV), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_PSCR, KC_RBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSLS, KC_ENT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_UNDO, KC_PGUP, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_MINS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_Z, KC_LALT, KC_DEL, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_RGHT, MO(_FN), KC_BSPC, KC_DEL, KC_RALT, KC_RGUI, KC_RCTL + ), + /* FUNCTION LAYER + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | VolDn | VolUp | VolMute| | | | | | | QK_BOOT | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * |PlyPause| MPrev | MNext | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | HOME | UP | END | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | LEFT | DOWN | RIGHT | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------+--------| + * | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------+--------| + * | | | | | | | | | | | | | | | | | + * '-----------------------------------------------*-----------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT( /* FUNCTION LAYER */ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QK_BOOT, + KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + /* case QMKBEST: */ + /* if (record->event.pressed) { */ + /* // when keycode QMKBEST is pressed */ + /* SEND_STRING("QMK is the best thing ever!"); */ + /* } else { */ + /* // when keycode QMKBEST is released */ + /* } */ + /* break; */ + /* case QMKURL: */ + /* if (record->event.pressed) { */ + /* // when keycode QMKURL is pressed */ + /* SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); */ + /* } else { */ + /* // when keycode QMKURL is released */ + /* } */ + /* break; */ + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/xd128/rules.mk b/keyboards/handwired/xd128/rules.mk new file mode 100644 index 000000000000..11eacc4802f5 --- /dev/null +++ b/keyboards/handwired/xd128/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/xd128/xd128.c b/keyboards/handwired/xd128/xd128.c new file mode 100644 index 000000000000..c8dc7668a624 --- /dev/null +++ b/keyboards/handwired/xd128/xd128.c @@ -0,0 +1,41 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "xd128.h" + +// #define XD75_CAPSLOCK_LED 2 // B2 +// #define XD75_GP103_LED 4 // F4 +// #define XD75_KEYCAPS_LED 5 // F5 +// #define XD75_GP100_LED 7 // F7 + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + // capslock_led_init(); + // gp100_led_init(); + // gp103_led_init(); + // keycaps_led_init(); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + diff --git a/keyboards/handwired/xd128/xd128.h b/keyboards/handwired/xd128/xd128.h new file mode 100644 index 000000000000..24fd9d4a942e --- /dev/null +++ b/keyboards/handwired/xd128/xd128.h @@ -0,0 +1,54 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, \ + K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F, \ + K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F }, \ +} + +/* void capslock_led_init(void); */ +/* void capslock_led_off(void); */ +/* void capslock_led_on(void); */ + +/* void gp100_led_init(void); */ +/* void gp100_led_off(void); */ +/* void gp100_led_on(void); */ + +/* void gp103_led_init(void); */ +/* void gp103_led_off(void); */ +/* void gp103_led_on(void); */ + +/* void keycaps_led_init(void); */ +/* void keycaps_led_off(void); */ +/* void keycaps_led_on(void); */ diff --git a/keyboards/handwired/xd75/keymaps/levi_layout/config.h b/keyboards/handwired/xd75/keymaps/levi_layout/config.h new file mode 100644 index 000000000000..e6975da8a201 --- /dev/null +++ b/keyboards/handwired/xd75/keymaps/levi_layout/config.h @@ -0,0 +1,19 @@ +/* Copyright 2017 Benjamin Kesselring + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/xd75/keymaps/levi_layout/keymap.c b/keyboards/handwired/xd75/keymaps/levi_layout/keymap.c new file mode 100644 index 000000000000..babdbf5b7b3c --- /dev/null +++ b/keyboards/handwired/xd75/keymaps/levi_layout/keymap.c @@ -0,0 +1,133 @@ +/* + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Layout for my hand-wired xd75. Should be the same as the ones built + * with official xd75 PCB's. + */ +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _DV 0 +#define _QW 1 +#define _FN 2 + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* DVORAK + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | [ | PSCR | ] | 6 | 7 | 8 | 9 | 0 | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | ' | , | . | P | Y | ESC | \ | ENT | F | G | C | R | L | / | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | LCTL | A | O | E | U | I | HOME | UNDO | PG UP | D | H | T | N | S | - | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | ; | Q | J | K | X | END | UP | PG DN | B | M | W | V | Z | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTL | LGUI | Z | LALT | DEL | SPACE | LEFT | DOWN | RGHT |MO(_FN) | BSPC | DEL | RALT | RGUI | RCTRL | + * '-----------------------------------------------*------------------------------------*-------------------------------------------------' + */ + + [_DV] = LAYOUT_ortho_5x15( /* DVORAK */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_PSCR, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_ESC, KC_BSLS, KC_ENT, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_HOME, KC_UNDO, KC_PGUP, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_END, KC_UP, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LGUI, KC_Z, KC_LALT, KC_DEL, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, MO(_FN), KC_BSPC, KC_DEL, KC_RALT, KC_RGUI, KC_RCTL + ), + + /* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | [ | PSCR | ] | 6 | 7 | 8 | 9 | 0 | - | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | ESC | \ | ENT | Y | U | I | O | P | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | LCTL | A | S | D | F | G | HOME | L0 | PG UP | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | UP | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTL | LGUI | Z | LALT | DEL | SPACE | LEFT | DOWN | RGHT |MO(_FN) | BSPC | DEL | RALT | RGUI | RCTRL | + * '-----------------------------------------------*------------------------------------*-------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_PSCR, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSLS, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_UNDO, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_Z, KC_LALT, KC_DEL, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, MO(_FN), KC_BSPC, KC_DEL, KC_RALT, KC_RGUI, KC_RCTL + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | NUM LK | P/ | P* | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | | HOME | UP | END |VOL MUTE| P7 | P8 | P9 | - | HOME | UP | END | | PRSCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCTL | | LEFT | DOWN | RGHT | VOL UP | P4 | P5 | P6 | + | LEFT | DOWN | RGHT | | CAPS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LSFT | | | | | VOL DN | P1 | P2 | P3 | PENT |playpaus| prev | next | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCTL | LGUI | | | | | P0 | | P. | | | QWERTY | DVORAK | | | + * '------------------------------------------------*-----------------------------------*-------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TAB, KC_NO, KC_HOME, KC_UP, KC_END, KC_MUTE, KC_P7, KC_P8, KC_P9, KC_MINS, KC_HOME, KC_UP, KC_END, KC_NO, KC_PSCR, + KC_LCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLU, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_CAPS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_P1, KC_P2, KC_P3, KC_PENT, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, + KC_LCTL, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_P0, KC_NO, KC_PDOT, KC_NO, KC_NO, DF(_QW), DF(_DV), KC_NO, KC_NO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/xd75/keymaps/levi_layout/readme.md b/keyboards/handwired/xd75/keymaps/levi_layout/readme.md new file mode 100644 index 000000000000..a1c0236ed9cd --- /dev/null +++ b/keyboards/handwired/xd75/keymaps/levi_layout/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75, with led controls \ No newline at end of file diff --git a/keyboards/handwired/xd75/keymaps/levi_layout/rules.mk b/keyboards/handwired/xd75/keymaps/levi_layout/rules.mk new file mode 100644 index 000000000000..52a8f38d45ff --- /dev/null +++ b/keyboards/handwired/xd75/keymaps/levi_layout/rules.mk @@ -0,0 +1,15 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h new file mode 100644 index 000000000000..45e7e680c16f --- /dev/null +++ b/keyboards/melody96/config.h @@ -0,0 +1,55 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x594d // "YM" +#define PRODUCT_ID 0x4D96 // "M" + 96 +#define DEVICE_VER 0x0001 +#define MANUFACTURER YMDK +#define PRODUCT Melody96 + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_SCROLL_LOCK_PIN B5 +#define LED_PIN_ON_STATE 0 + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#endif + +/* Set location for BootMagic key*/ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 18 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/melody96/info.json b/keyboards/melody96/info.json new file mode 100644 index 000000000000..7db60fa7d448 --- /dev/null +++ b/keyboards/melody96/info.json @@ -0,0 +1,884 @@ +{ + "keyboard_name": "melody96", + "url": "", + "maintainer": "qmk", + "layout_aliases": { + "LAYOUT": "LAYOUT_all", + "LAYOUT_hotswap": "LAYOUT_96_ansi" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + {"x": 8.75, "y": 3}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3, "w": 2.25}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + {"x": 18, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.75}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4}, + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5}, + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + {"x": 15, "y": 5}, + {"x": 16, "y": 5}, + {"x": 17, "y": 5}, + {"x": 18, "y": 5} + ] + }, + "LAYOUT_96_ansi": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1, "w": 2}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2, "h": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + {"x": 8.75, "y": 3}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3, "w": 2.25}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + + {"x": 0, "y": 4, "w": 2.25}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.75}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4, "h": 2}, + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5}, + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + {"x": 15, "y": 5}, + {"x": 16, "y": 5}, + {"x": 17, "y": 5} + ] + }, + "LAYOUT_96_ansi_splitbs": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2, "h": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + {"x": 8.75, "y": 3}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3, "w": 2.25}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + + {"x": 0, "y": 4, "w": 2.25}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.75}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4, "h": 2}, + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5}, + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + {"x": 15, "y": 5}, + {"x": 16, "y": 5}, + {"x": 17, "y": 5} + ] + }, + "LAYOUT_96_iso": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1, "w": 2}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2, "h": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + {"x": 8.75, "y": 3}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3}, + {"x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.75}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4, "h": 2}, + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5}, + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + {"x": 15, "y": 5}, + {"x": 16, "y": 5}, + {"x": 17, "y": 5} + ] + }, + "LAYOUT_96_iso_splitbs": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2, "h": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + {"x": 8.75, "y": 3}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3}, + {"x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.75}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4, "h": 2}, + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5}, + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + {"x": 15, "y": 5}, + {"x": 16, "y": 5}, + {"x": 17, "y": 5} + ] + }, + "LAYOUT_96_with60": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1, "w": 2}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2, "h": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + {"x": 8.75, "y": 3}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3, "w": 2.25}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + + {"x": 0, "y": 4, "w": 2.25}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 2.75}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4, "h": 2} + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5, "w": 1.25}, + {"x": 11.25, "y": 5, "w": 1.25}, + {"x": 12.5, "y": 5, "w": 1.25}, + {"x": 13.75, "y": 5, "w": 1.25}, + {"x": 15, "y": 5, "w": 2}, + {"x": 17, "y": 5}, + ] + }, + "LAYOUT_96_with60_splitbs": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2, "h": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + {"x": 8.75, "y": 3}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3, "w": 2.25}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + + {"x": 0, "y": 4, "w": 2.25}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 2.75}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4, "h": 2} + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5, "w": 1.25}, + {"x": 11.25, "y": 5, "w": 1.25}, + {"x": 12.5, "y": 5, "w": 1.25}, + {"x": 13.75, "y": 5, "w": 1.25}, + {"x": 15, "y": 5, "w": 2}, + {"x": 17, "y": 5}, + ] + }, + "LAYOUT_96_with60_split_num0": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1, "w": 2}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2, "h": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + {"x": 8.75, "y": 3}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3, "w": 2.25}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + + {"x": 0, "y": 4, "w": 2.25}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 2.75}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4, "h": 2}, + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5, "w": 1.25}, + {"x": 11.25, "y": 5, "w": 1.25}, + {"x": 12.5, "y": 5, "w": 1.25}, + {"x": 13.75, "y": 5, "w": 1.25}, + {"x": 15, "y": 5}, + {"x": 16, "y": 5}, + {"x": 17, "y": 5} + ] + } + } +} diff --git a/keyboards/melody96/keymaps/crilith/keymap.c b/keyboards/melody96/keymaps/crilith/keymap.c new file mode 100644 index 000000000000..40ae6914353c --- /dev/null +++ b/keyboards/melody96/keymaps/crilith/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +#define KC_REC DYN_REC_START1 +#define KC_DONE DYN_REC_STOP +#define KC_PLAY DYN_MACRO_PLAY1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TT(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, KC_TAB, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TAB, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_PLAY, _______, KC_REC, KC_DONE, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + return true; +} diff --git a/keyboards/melody96/keymaps/default/keymap.c b/keyboards/melody96/keymaps/default/keymap.c new file mode 100644 index 000000000000..3ed6f3068b36 --- /dev/null +++ b/keyboards/melody96/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/melody96/keymaps/default_96_with60_split_num0/keymap.c b/keyboards/melody96/keymaps/default_96_with60_split_num0/keymap.c new file mode 100644 index 000000000000..5dc26b150d17 --- /dev/null +++ b/keyboards/melody96/keymaps/default_96_with60_split_num0/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + KC_P00 = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_96_with60_split_num0( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_P0, KC_P00, KC_PDOT + ), + [1] = LAYOUT_96_with60_split_num0( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_P00: + if (record->event.pressed) { + tap_code(KC_P0); + tap_code(KC_P0); + } + return false; + } + return true; +} diff --git a/keyboards/melody96/keymaps/dvz/config.h b/keyboards/melody96/keymaps/dvz/config.h new file mode 100644 index 000000000000..be786464bc7c --- /dev/null +++ b/keyboards/melody96/keymaps/dvz/config.h @@ -0,0 +1,34 @@ + /* Copyright 2021 Milan Düwel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define COMBO_COUNT 4 +#define COMBO_TERM 100 + +//#define UNICODE_SELECTED_MODES UC_WINC + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYER_BLINK + +#undef RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_TWINKLE + diff --git a/keyboards/melody96/keymaps/dvz/keymap.c b/keyboards/melody96/keymaps/dvz/keymap.c new file mode 100644 index 000000000000..cea3970e1889 --- /dev/null +++ b/keyboards/melody96/keymaps/dvz/keymap.c @@ -0,0 +1,161 @@ + /* Copyright 2021 Milan Düwel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + + /* This keymap is designed for use with a German keyboard layout. + * It is essentially the same as the default via keymap but adds combo functionality to type umlauts as well as lighting layers for various actions. + * Toggling the combo feature also disables KC_LGUI so both can be turned off for gaming. If you want to get rid of it without reflashing new firmware, use KC_RGUI instead. + * Layers 2 and 3 are currently unused but are configurable within via. + */ + +enum combos { + UML_AE, + UML_OE, + UML_UE, + UML_SZ +}; + +const uint16_t PROGMEM ae_combo[] = {KC_A, KC_E, COMBO_END}; +const uint16_t PROGMEM oe_combo[] = {KC_O, KC_E, COMBO_END}; +const uint16_t PROGMEM ue_combo[] = {KC_U, KC_E, COMBO_END}; +const uint16_t PROGMEM sz_combo[] = {KC_S, KC_Y, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [UML_AE] = COMBO(ae_combo, KC_QUOT), + [UML_OE] = COMBO(oe_combo, KC_SCLN), + [UML_UE] = COMBO(ue_combo, KC_LBRC), + [UML_SZ] = COMBO(sz_combo, KC_MINS) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, RGB_TOG, KC_TRNS, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CMB_TOG, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_MUTE), + + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +/* The lighting layers feature a caps indicator as well as layer blinks for mute and the function layer (blink only to allow unhindered adjustment of the RGB backlight settings). + Sadly these colours can not be customized within VIA. +*/ + +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_RED}, + {15, 17, HSV_RED} +); + +const rgblight_segment_t PROGMEM my_function_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {10, 12, HSV_YELLOW} +); + +const rgblight_segment_t PROGMEM my_f2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_CYAN} +); + +const rgblight_segment_t PROGMEM my_f3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_PURPLE} +); + +const rgblight_segment_t PROGMEM my_flash_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_RED} +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_capslock_layer, + my_function_layer, // Overrides caps lock layer + my_f2_layer, + my_f3_layer, + my_flash_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_rgb_layers; +}; + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(0, led_state.caps_lock); + return true; +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + //rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + return state; +}; + +// Note we user post_process_record_user because we want the state +// after the flag has been flipped... +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_CAPS: + case KC_MUTE: + case CMB_TOG: + if (record->event.pressed) { + rgblight_blink_layer(4, 250); + } + break; + case MO(1): + if (record->event.pressed) { + rgblight_blink_layer(1, 250); + } + break; + } +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LGUI: //use combo toggle to disable the win key while gaming + if (record->event.pressed) { + if (is_combo_enabled()==false) { + return false; + } + } + return true; // Let QMK send the enter press/release events + default: + return true; // Process all other keycodes normally + } +}; diff --git a/keyboards/melody96/keymaps/dvz/readme.md b/keyboards/melody96/keymaps/dvz/readme.md new file mode 100644 index 000000000000..d82055244eb1 --- /dev/null +++ b/keyboards/melody96/keymaps/dvz/readme.md @@ -0,0 +1,3 @@ +# DvZ's VIA compatible keymap with rolling umlauts for german typists + +Added by: [devilzmods](https://github.com/devilzmods) diff --git a/keyboards/melody96/keymaps/dvz/rules.mk b/keyboards/melody96/keymaps/dvz/rules.mk new file mode 100644 index 000000000000..a1e85f13f4e4 --- /dev/null +++ b/keyboards/melody96/keymaps/dvz/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes # reduce firmware size +COMBO_ENABLE = yes +#UNICODE_ENABLE = yes +BOOTLOADER = caterina diff --git a/keyboards/melody96/keymaps/konstantin/config.h b/keyboards/melody96/keymaps/konstantin/config.h new file mode 100644 index 000000000000..4b511eb8484f --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define LAYER_FN diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c new file mode 100644 index 000000000000..1ee7ca1e7760 --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -0,0 +1,77 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +static const HSV *colors[] = { &godspeed_blue, &godspeed_yellow }; +static const size_t cnum = sizeof colors / sizeof *colors; +static size_t cidx = 0; + +enum keycodes_keymap { + RGB_SET = RANGE_KEYMAP, +}; + +void eeconfig_init_keymap(void) { + rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v); +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SET: + if (record->event.pressed) { + cidx = (cidx + 1) % cnum; + rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v); + } + break; + } + + return true; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│Hom│End│PgU│PgD│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Del│NLk│P/ │P* │P- │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │P7 │P8 │P9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤P+ │ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │P4 │P5 │P6 │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ + * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSfRCt│ ↑ │P1 │P2 │P3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤PEn│ + * │LCtl│LGui│LAlt│ Space │RAlGu│FnFLk│ ← │ ↓ │ → │P0 │P. │ │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ + */ + [L_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, XXXXXXX, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSF_RCT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, XXXXXXX, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Sys│SLk│Pau│Brk│Top│Btm│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │RTg│ ÷ │ × │ − │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│RH+│RS+│RV+│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ + * │ │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│Mut│ │PgU│RMR│RMS│RMB│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤RMP│ + * │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│RM-│RM+│ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [L_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SYSRQ, KC_SLCK, KC_PAUS, BREAK, TOP, BOTTOM, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, _______, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P + ), +}; diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk new file mode 100644 index 000000000000..b315c8e6b96a --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/rules.mk @@ -0,0 +1,19 @@ +# Generic features +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes + +# Keyboard-specific features +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +VIA_ENABLE = yes + +# Firmware size reduction +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no +SPACE_CADET_ENABLE = no diff --git a/keyboards/melody96/keymaps/lessthan3/keymap.c b/keyboards/melody96/keymaps/lessthan3/keymap.c new file mode 100644 index 000000000000..3e6cd6d9da4b --- /dev/null +++ b/keyboards/melody96/keymaps/lessthan3/keymap.c @@ -0,0 +1,63 @@ +#include QMK_KEYBOARD_H + +#define L0 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Layer 0: Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Del│Hom│End│PgU│PgD│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bkspc │NLk│P/ │P* │P- │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ | │P7 │P8 │P9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤P+ │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │P4 │P5 │P6 │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ + * │ LSft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RSft │ ↑ │P1 │P2 │P3 │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤PEn│ + * │LCtl│LGui│LAlt│ Space │RAl│Fn │RCt│ ← │ ↓ │ → │P0 │P. │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + + + LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO , KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + +/* Layer 1: Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │RST│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │VoD│VoU│VoM│ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Ply│Mpv│Mnx│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + * 'RST' resets the controller and puts the board into firmware flashing mode, so you don't have to push the button on the PCB. + * (If you push this by accident, just unplug the board and plug it back in) + * 'VoM' = Volume Mute, 'VoD' and 'VoU' are Volume Down and Volume Up, respectively. + * 'Ply' = Media Play/Pause, 'Mpv' = Media Previous, 'Mnx' = Media Next. + */ + + LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/melody96/keymaps/levi-layout/keymap.c b/keyboards/melody96/keymaps/levi-layout/keymap.c new file mode 100644 index 000000000000..75f01f63b420 --- /dev/null +++ b/keyboards/melody96/keymaps/levi-layout/keymap.c @@ -0,0 +1,76 @@ +#include QMK_KEYBOARD_H + +#define L0 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +____________________________________________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | P SCN | DEL | HOME | END | PGUP | PGDN | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | | NUM | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | LOCK | / | * | - | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________ ________|________|________|________|________| +| | | | | | | | | | | | [ | ] | | | | | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | 7 | 8 | 9 | + | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|_____________|________|________|________|________| +| | | | | | | | | | | ; | ' | | | | | | +| LCTL | A | S | D | F | G | H | J | K | L | : | " | ENTER | 4 | 5 | 6 | + | +|______________|________|________|________|________|________|________|________|________|________|________|________|____________________|________|________|________|________| +| | | | | | | | | | , | . | / | | | | | | | +| SHIFT | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | 1 | 2 | 3 | ENTER | +|_________|________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________|________| +| | | | | | | | | | | | | | +| MO_FN | LGUI | L ALT | SPACE | R ALT | RCTL | RCTL | LEFT | DOWN | RIGHT | 0 | . | ENTER | +|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| +*/ + + + + LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO , KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + + + /* Layer 1, function layer +____________________________________________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | |QK_BOOT | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | | | | | | +| | HOME | UP | END | | | | | | | | | | | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|_____________|________|________|________|________| +| | | | | | | | | | | | | | | | | | +| | LEFT | DOWN | RIGHT | | | | | | | | | | | | | | +|______________|________|________|________|________|________|________|________|________|________|________|________|____________________|________|________|________|________| +| | | | | | | | | | | | | | | | | | | +| | | MPAUSE | MPREV | MNEXT | VOLDN | VOLUP | VMUTE | | | | | | | | | | | +|_________|________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________|________| +| | | | | | | | | | | | | | +| | | | | | | | | | | | | | +|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| +BL_TOGG, BL_DEC, BL_INC changes the in-switch LEDs +*/ + + + LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/melody96/keymaps/via/keymap.c b/keyboards/melody96/keymaps/via/keymap.c new file mode 100644 index 000000000000..c02fa785a858 --- /dev/null +++ b/keyboards/melody96/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/melody96/keymaps/via/rules.mk b/keyboards/melody96/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/melody96/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/melody96/keymaps/zunger/config.h b/keyboards/melody96/keymaps/zunger/config.h new file mode 100644 index 000000000000..cc06440e0dd6 --- /dev/null +++ b/keyboards/melody96/keymaps/zunger/config.h @@ -0,0 +1,22 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// Enable cmd-option-escape on mac. +#define GRAVE_ESC_ALT_OVERRIDE + +// place overrides here diff --git a/keyboards/melody96/keymaps/zunger/keymap.c b/keyboards/melody96/keymaps/zunger/keymap.c new file mode 100644 index 000000000000..d0d2698b7a10 --- /dev/null +++ b/keyboards/melody96/keymaps/zunger/keymap.c @@ -0,0 +1,489 @@ +/* Copyright 2019 Yonatan Zunger + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include + +// This keymap is designed to make it easy to type in a wide variety of languages, as well as +// generate mathematical symbols (à la Space Cadet). +// +// LAYER MAGIC (aka, typing in many alphabets) +// This keyboard has three "base" layers: QWERTY, GREEK, and CADET. The GREEK and CADET layers +// are actually full of Unicode points, and so which point they generate depends on things like +// whether the shift key is down. To handle this, each of those layers is actually *two* layers, one +// with and one without shift. In our main loop, we manage modifier state detection, as well as +// layer switch detection, and pick the right layer on the fly. +// Layers are selected with a combination of three keys. The "Greek" and "Cadet" keys act like +// modifiers: When held down, they transiently select the indicated base layer. The "Layer Lock" key +// locks the value of the base layer at whatever is currently held; so e.g., if you hold Greek + +// Layer Lock, you'll stay in Greek mode until you hit Layer Lock again without any of the mods +// held. +// TODO: This system of layer selection is nice for math, but it's not very nice for actually +// typing in multiple languages. It seems like a better plan will be to reserve one key for each +// base layer -- maybe fn + F(n) -- which can either be held as a modifier or tapped to switch +// layers. That will open up adding some more languages, like Yiddish, but to do this effectively +// we'll need to find a good UI with which to show the currently selected layer. Need to check what +// the melody96 has in the way of outputs (LEDs, sound, etc). +// +// ACCENT MAGIC (aka, typing conveniently in Romance languages) +// We want to support easy typing of diacritical marks. We can't rely on the host OS for this, +// because (e.g.) on MacOS, to make any of the other stuff work, we need to be using the Unicode +// input method at the OS level, which breaks all the normal accent stuff on that end. So we do it +// ourselves. Accents can actually be invoked in two different ways: one fast and very compatible, +// one very versatile but with occasional compatibility problems. +// +// THE MAIN WAY: You can hit one of the "accent request" key patterns immediately *before* typing +// a letter to be accented. It will emit the corresponding accented Unicode. For example, you can +// hit fn-e to request an acute accent, followed by i, and it will output í, U+00ED LATIN SMALL +// LETTER I WITH ACUTE. These "combined characters" are in Unicode normal form C (NFKC), which is +// important because many European websites and apps, in particular, tend to behave very badly +// (misunderstanding and/or crashing) when presented with characters in other forms! The catch is +// that this only works for the various combinations of letters and accents found in the Latin-1 +// supplement block of Unicode -- basically, things you need for Western European languages. +// +// (NB: If you make an accent request followed by a letter which can't take the corresponding +// accent, it will output the uncombined form of the accent followed by whatever you typed; so +// e.g., if you hit fn-e followed by f, it will output ´f, U+00B4 ACUTE ACCENT followed by an +// ordinary f. This is very similar to the default behavior of MacOS.) +// +// THE FLEXIBLE WAY: If you hit the accent request with a shift -- e.g., fn-shift-e -- it will +// instead immediately output the corresponding *combining* Unicode accent mark, which will modify +// the *previous* character you typed. For example, if you type i followed by fn-shift-e, it will +// generate í. But don't be fooled by visual similarity: unlike the previous example, this one is +// an ordinary i followed by U+0301 COMBINING ACUTE ACCENT. It's actually *two symbols*, and this +// is Unicode normal form D (NFKD). Unlike NFKC, there are NFKD representations of far more +// combinations of letters and accents, and it's easy to add more of these if you need. (The NFKC +// representation of such combinations is identical to their NFKD representation) +// +// Programs that try to compare Unicode strings *should* first normalize them by converting them +// all into one normal form or another, and there are functions in every programming language to +// do this -- e.g., JavaScript's string.normalize() -- but lots of programmers fail to understand +// this, and so write code that massively freaks out when it encounters the wrong form. +// +// The current accent request codes are modeled on the ones in MacOS. +// +// fn+` Grave accent (`) +// fn+e Acute accent (´) +// fn+i Circumflex (^) +// fn+u Diaresis / umlaut / trema (¨) +// fn+c Cedilla (¸) +// fn+n Tilde (˜) +// +// Together, these functions make for a nice "polyglot" keyboard: one that can easily type in a wide +// variety of languages, which is very useful for people who, well, need to type in a bunch of +// languages. +// +// The major TODOs are: +// - Update the layer selection logic (and add visible layer cues); +// - Factor the code below so that the data layers are more clearly separated from the code logic, +// so that other users of this keymap can easily add whichever alphabets they need without +// having to deeply understand the implementation. + + +enum custom_keycodes { + // We provide special layer management keys: + // GREEK triggers the Greek (aka "Front") layer, or the SHIFTGREEK layer when shift is held. + // (Because we use Unicode, we need to implement shift-handling at the firmware level, + // rather than the OS level like we do in the QWERTY layer) + // CADET or GREEK+ALT triggers the Cadet (aka "Top") layer, or the SHIFTCADET layer when + // shift is held. + // LAYER_LOCK locks the "base" layer (i.e., QWERTY, GREEK, or CADET) to the value which is + // pressed at the moment that it is being released. When a layer lock is set, the + // analogous layer modifier key is reversed; e.g., if you lock the GREEK layer, then the + // GREEK button bounces you back to QWERTY. + // + // We also parse the shift, alt, and caps lock keys to provide management of those which is + // compatible with these various layers. + KC_GREEK = SAFE_RANGE, + KC_CADET, + KC_LAYER_LOCK, + + // These are the keycodes generated by the various "accent request" keystrokes. + KC_ACCENT_START, + KC_CGRV = KC_ACCENT_START, // Grave accent + KC_CAGU, // Acute accent + KC_CDIA, // Diaresis / umlaut / trema + KC_CCIR, // Circumflex + KC_CCED, // Cedilla + KC_CTIL, // Tilde + KC_ACCENT_END, +}; + +enum layers_keymap { + _QWERTY = 0, + _FUNCTION, + + _GREEK, + _SHIFTGREEK, + _CADET, + _SHIFTCADET, +}; + +// This is so that H(xxxx) has the same width as _______, which makes the grids more legible. +#define H(x) UC(0x##x) +#define MO_FN MO(_FUNCTION) +#define KC_LLCK KC_LAYER_LOCK + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the + // switch on the KC_GRV key; change back to KC_ESC once this is fixed. + [_QWERTY] = LAYOUT_hotswap( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_MPLY, KC_BRK, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_LLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO_FN, KC_GREEK,KC_CADET,KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* The Greek layers. Shown here are the QWERTY layer (for visual reference) and the two Greek + * layers. + * ,---------------------------------------------------------------------------- + * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY + * | ` | ₁ | ₂ | ₃ | ₄ | ₅ | ₆ | ₇ | ₈ | ₉ | ₀ | ₋ | ₊ | ₍ | ₎ | | | | | SHIFTGREEK + * | ` | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ⁻ | ⁺ | ⁽ | ⁾ | | | | | GREEK + * |---------------------------------------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | + * | ` | ¿ | | € | | | | | | | | | ≁ | BKSPC |LCK| | ⊗ | | + * | | | | | | | | | | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | + * |---------------------------------------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | + * | | Θ | Ω | Ε | Ρ | Τ | Ψ | Υ | Ι | Ο | Π | | | | | | | | + * | | θ | ω | ε | ρ | τ | ψ | υ | ι | ο | π | | | | | | | | + * |-----------------------------------------------------------------------| + | + * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | ⊕ | + * | CTRL | Α | Σ | Δ | Φ | Γ | Η | | Κ | Λ | … | ∴ | RET | | | | | + * | CTRL | α | σ | δ | φ | γ | η | ϑ | κ | λ | ⋯ | ⋅ | RET | | | | | + * |-----------------------------------------------------------------------|---| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | + * | SHIFT | Ζ | Ξ | Χ | ✔ | Β | Ν | Μ | ≲ | ≳ | |SHFT | | | | | | + * | SHIFT | ζ | ξ | χ | ς | β | ν | μ | ≪ | ≫ | ∫ |SHFT | | | | | | + * |-----------------------------------------------------------------------|ENT| + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * `---------------------------------------------------------------------------' + */ + [_GREEK] = LAYOUT_hotswap( + KC_GRV, H(00b9), H(00b2), H(00b3), H(2074), H(2075), H(2076), H(2077), H(2078), H(2079), H(2070), H(207b), H(207a), H(207d), H(207e), XXXXXXX, XXXXXXX, XXXXXXX, _______, + KC_GRV, _______, _______, _______, _______, _______, _______, _______, H(00b0), _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), + _______, H(03b8), H(03c9), H(03b5), H(03c1), H(03c4), H(03c8), H(03c5), H(03b9), H(03bf), H(03c0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, + _______, H(03b1), H(03c3), H(03b4), H(03c6), H(03b3), H(03b7), H(03d1), H(03ba), H(03bb), H(22ef), H(22c5), _______, KC_P4, KC_P5, KC_P6, H(2295), + _______, H(03b6), H(03be), H(03c7), H(03c2), H(03b2), H(03bd), H(03bc), H(226a), H(226b), H(222b), _______, _______, KC_P1, KC_P2, KC_P3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), + [_SHIFTGREEK] = LAYOUT_hotswap( + KC_GRV, H(2081), H(2082), H(2083), H(2084), H(2085), H(2086), H(2087), H(2088), H(2089), H(2080), H(208b), H(208a), H(208d), H(208e), XXXXXXX, XXXXXXX, XXXXXXX, _______, + KC_GRV, H(00bf), _______, H(20ac), _______, _______, _______, _______, _______, _______, _______, XXXXXXX, H(2241), _______, _______, XXXXXXX, H(2297), XXXXXXX, + _______, H(0398), H(03a9), H(0395), H(03a1), H(03a4), H(03a8), H(03a5), H(0399), H(039f), H(03a0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, + _______, H(0391), H(03a3), H(0394), H(03a6), H(0393), H(0397), XXXXXXX, H(039a), H(039b), H(2026), H(2234), _______, KC_P4, KC_P5, KC_P6, H(2295), + _______, H(0396), H(039e), H(03a7), H(2714), H(0392), H(039d), H(039c), H(2272), H(2273), XXXXXXX, _______, _______, KC_P1, KC_P2, KC_P3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), + /* The Cadet layers. Again, we show the QWERTY layer and the two cadet layers. + * ,---------------------------------------------------------------------------- + * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY + * | ∅ | | | | | | | | | | | | | | | | | | | SHIFTCADET + * | ¬ | | | | | | | | | | | | | | | | | | | CADET + * |---------------------------------------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | + * | ` | ¡ | | £ | | | | | ° | | | * | ∓ | BKSPC |LCK| | | | + * | | | | | | | | | | | | | ± | BKSPC |LCK| | × | | + * |---------------------------------------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | + * | | ℚ | | | ℝ | ⊆ | ⊇ | | ℵ | ∄ | | ∉ | | | * | * | * | | + * | | ∧ | ∨ | ∩ | ∪ | ⊂ | ⊃ | ∀ | ∞ | ∃ | ∂ | ∈ | | | * | * | * | | [1] + * |-----------------------------------------------------------------------| + | + * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | ⊕ | + * | CTRL | Å | | ∇ | | ⇑ | ⇓ | ⇐ | ⇒ | ⇔ | | | RET | * | * | * | | + * | CTRL | ⟘ | ⊤ | ⊢ | ⊣ | ↑ | ↓ | ← | → | ↔ | | | RET | * | * | * | | [1] + * |-----------------------------------------------------------------------|---| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | + * | SHIFT | ℤ | ℂ | | ≉ | ≢ | ℕ | | | | |SHFT | | * | * | * | | + * | SHIFT | | ≠ | | ≈ | ≡ | ≤ | ≥ | | | ÷ |SHFT | | * | * | * | | [1] + * |-----------------------------------------------------------------------|ENT| + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * `---------------------------------------------------------------------------' + * [1] CADET + numpad moves the mouse. SHIFT+CADET+NUMPAD moves it more quickly. CADET+5 + * clicks the mouse, and SHIFT+CADET+FIVE right-clicks. + */ + [_CADET] = LAYOUT_hotswap( + H(00AC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), XXXXXXX, + _______, H(2227), H(2228), H(2229), H(222a), H(2282), H(2283), H(2200), H(221e), H(2203), H(2202), H(2208), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, + _______, H(22a5), H(22a4), H(22a2), H(22a3), H(2191), H(2193), H(2190), H(2192), H(2194), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, + _______, XXXXXXX, H(2260), XXXXXXX, H(2248), H(2261), H(2264), H(2265), XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), + [_SHIFTCADET] = LAYOUT_hotswap( + H(2205), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + KC_GRV, H(00a1), XXXXXXX, H(00a3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(2213), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, + _______, H(211a), XXXXXXX, XXXXXXX, H(211d), H(2286), H(2287), XXXXXXX, H(2135), H(2204), XXXXXXX, H(2209), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, + _______, H(212b), XXXXXXX, H(2207), XXXXXXX, H(21d1), H(21d3), H(21d0), H(21d2), H(21d4), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, + _______, H(2124), H(2102), XXXXXXX, H(2249), H(2262), H(2115), XXXXXXX, XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), + + // Function layer is mostly for keyboard meta-control operations, but also contains the combining + // accent marks. These are deliberately placed to match where the analogous controls go on Mac OS. + [_FUNCTION] = LAYOUT_hotswap( + KC_CGRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RESET, + KC_CGRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_CAGU, _______, _______, _______, KC_CDIA, KC_CCIR, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_CCED, _______, _______, KC_CTIL, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Accent implementation +// +// In the body of process_record_user, we store an "accent_request", which is the accent keycode if +// one was just selected, or zero otherwise. When the *next* key is hit, we look up whether the +// accent request plus that next keycode (plus the state of the shift key) together amount to an +// interesting combined (NFKC) character, and if so, emit it; otherwise, we emit the accent as a +// separate character and then process the next key normally. The resulting UI behavior is similar +// to that of the combining accent keys in MacOS. +// +// We store two arrays, depending on whether shift is or isn't held. Each is two-dimensional, with +// its outer key by the next keycode struck, and the inner key by the accent requested. The outer +// array has KC_Z + 1 as its upper bound, so that we can save memory by only coding alphabetic keys. +// The contents are either Unicode code points, or zero to indicate that we don't have a point for +// this combination. + +#define KC_NUM_ACCENTS (KC_ACCENT_END - KC_ACCENT_START) +#define KC_NUM_SLOTS (KC_Z + 1) + +const uint16_t PROGMEM unshifted_accents[KC_NUM_SLOTS][KC_NUM_ACCENTS] = { + // KC_CGRV, KC_CAGU, KC_CDIA, KC_CCIR, KC_CCED, KC_CTIL + [KC_A] = { 0x00e0, 0x00e1, 0x00e4, 0x00e2, 0, 0x00e3 }, + [KC_E] = { 0x00e8, 0x00e9, 0x00eb, 0x00ea, 0, 0 }, + [KC_I] = { 0x00ec, 0x00ed, 0x00ef, 0x00ee, 0, 0 }, + [KC_O] = { 0x00f2, 0x00f3, 0x00f6, 0x00f4, 0, 0x00f5 }, + [KC_U] = { 0x00f9, 0x00fa, 0x00fc, 0x00fb, 0, 0 }, + [KC_Y] = { 0, 0, 0x00ff, 0, 0, 0 }, + [KC_N] = { 0, 0, 0, 0, 0, 0x00f1 }, + [KC_C] = { 0, 0, 0, 0, 0x00e7, 0 }, +}; + +const uint16_t PROGMEM shifted_accents[KC_NUM_SLOTS][KC_NUM_ACCENTS] = { + // KC_CGRV, KC_CAGU, KC_CDIA, KC_CCIR, KC_CCED, KC_CTIL + [KC_A] = { 0x00c0, 0x00c1, 0x00c4, 0x00c2, 0, 0x00c3 }, + [KC_E] = { 0x00c8, 0x00c9, 0x00cb, 0x00ca, 0, 0 }, + [KC_I] = { 0x00cc, 0x00cd, 0x00cf, 0x00ce, 0, 0 }, + [KC_O] = { 0x00d2, 0x00d3, 0x00d6, 0x00d4, 0, 0x00d5 }, + [KC_U] = { 0x00d9, 0x00da, 0x00dc, 0x00db, 0, 0 }, + [KC_Y] = { 0, 0, 0x00df, 0, 0, 0 }, + [KC_N] = { 0, 0, 0, 0, 0, 0x00d1 }, + [KC_C] = { 0, 0, 0, 0, 0x00c7, 0 }, +}; + +// The uncombined and combined forms of the accents, for when we want to emit them as single +// characters. +const uint16_t PROGMEM uncombined_accents[KC_NUM_ACCENTS] = { + [KC_CGRV - KC_ACCENT_START] = 0x0060, + [KC_CAGU - KC_ACCENT_START] = 0x00b4, + [KC_CDIA - KC_ACCENT_START] = 0x00a8, + [KC_CCIR - KC_ACCENT_START] = 0x005e, + [KC_CCED - KC_ACCENT_START] = 0x00b8, + [KC_CTIL - KC_ACCENT_START] = 0x02dc, +}; + +const uint16_t PROGMEM combined_accents[KC_NUM_ACCENTS] = { + [KC_CGRV - KC_ACCENT_START] = 0x0300, + [KC_CAGU - KC_ACCENT_START] = 0x0301, + [KC_CDIA - KC_ACCENT_START] = 0x0308, + [KC_CCIR - KC_ACCENT_START] = 0x0302, + [KC_CCED - KC_ACCENT_START] = 0x0327, + [KC_CTIL - KC_ACCENT_START] = 0x0303, +}; + +// This function manages keypresses that happen after an accent has been selected by an earlier +// keypress. +// Args: +// accent_key: The accent key which was earlier selected. This must be in the range +// [KC_ACCENT_START, KC_ACCENT_END). +// keycode: The keycode which was just pressed. +// is_shifted: The current shift state (as set by a combination of shift and caps lock) +// force_no_accent: If true, we're in a situation where we want to force there to be no +// accent combination -- if e.g. we're in a non-QWERTY layer, or if other modifier keys +// are held. +// +// Returns true if the keycode has been completely handled by this function (and so should not be +// processed further by process_record_user) or false otherwise. +bool process_key_after_accent( + uint16_t accent_key, + uint16_t keycode, + bool is_shifted, + bool force_no_accent +) { + assert(accent_key >= KC_ACCENT_START); + assert(accent_key < KC_ACCENT_END); + const int accent_index = accent_key - KC_ACCENT_START; + + // If the keycode is outside A..Z, or force_no_accent is set, we know we shouldn't even bother + // with a table lookup. + if (keycode <= KC_Z && !force_no_accent) { + // Pick the correct array. Because this is progmem, we're going to need to do the + // two-dimensional array indexing by hand, and so we just cast it to a single-dimensional array. + const uint16_t *points = (const uint16_t*)(is_shifted ? shifted_accents : unshifted_accents); + const uint16_t code_point = pgm_read_word_near(points + KC_NUM_ACCENTS * keycode + accent_index); + if (code_point) { + register_unicode(code_point); + return true; + } + } + + // If we get here, there was no accent match. Emit the accent as its own character, and then let + // the caller figure out what to do next. + register_unicode(pgm_read_word_near(uncombined_accents + accent_index)); + return false; +} + +// Layer bitfields. +#define GREEK_LAYER (1UL << _GREEK) +#define SHIFTGREEK_LAYER (1UL << _SHIFTGREEK) +#define CADET_LAYER (1UL << _CADET) +#define SHIFTCADET_LAYER (1UL << _SHIFTCADET) +// The layers we don't touch. +#define LAYER_MASK ~(GREEK_LAYER|SHIFTGREEK_LAYER|CADET_LAYER|SHIFTCADET_LAYER) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // We track these persistent globals and manage them on our own, rather than trying to rely on + // get_mods or the like, because this function is called *before* that's updated! + static bool shift_held = false; + static bool alt_held = false; + static bool ctrl_held = false; + static bool super_held = false; + static bool greek_held = false; + static bool cadet_held = false; + + // These are where we remember the values of lock states. + static bool shift_lock = false; + static int layer_lock = _QWERTY; + + // The accent request, or zero if there isn't one. + static uint16_t accent_request = 0; + + // If this is set to true, don't trigger any handling of pending accent requests. That's what we + // want to do if e.g. the user just hit the shift key or something. + bool ignore_accent_change = !record->event.pressed; + + // Step 1: Process any modifier key state changes, so we can maintain that state. + if (keycode == KC_LSHIFT || keycode == KC_RSHIFT) { + shift_held = record->event.pressed; + ignore_accent_change = true; + } else if (keycode == KC_LALT || keycode == KC_RALT) { + alt_held = record->event.pressed; + ignore_accent_change = true; + } else if (keycode == KC_LCTRL || keycode == KC_RCTRL) { + ctrl_held = record->event.pressed; + ignore_accent_change = true; + } else if (keycode == KC_LGUI || keycode == KC_RGUI) { + super_held = record->event.pressed; + ignore_accent_change = true; + } else if (keycode == KC_GREEK) { + greek_held = record->event.pressed; + ignore_accent_change = true; + } else if (keycode == KC_CADET) { + cadet_held = record->event.pressed; + ignore_accent_change = true; + } + + // Step 2: Figure out which layer we're supposed to be in, by transforming all the prior stuff + // into layer requests. + const bool greek_request = (greek_held && !alt_held); + const bool cadet_request = (cadet_held || (greek_held && alt_held)); + + // Now, handle the lock keys. We store next_layer_lock in a local variable so that we can + // determine the layer to pick right now before we update layer_lock. + int next_layer_lock = layer_lock; + if (keycode == KC_CAPS) { + // If we're in QWERTY mode, caps lock is already going to be managed by the host OS, but by + // tracking it ourselves we can also usefully apply it to the GREEK and CADET layers. + if (record->event.pressed) { + shift_lock = !shift_lock; + } + } else if (keycode == KC_LAYER_LOCK) { + if (record->event.pressed) { + if (cadet_request) { + next_layer_lock = _CADET; + } else if (greek_request) { + next_layer_lock = _GREEK; + } else { + next_layer_lock = _QWERTY; + } + } + } + + // OK! Now we know which buttons are being held, and the current and upcoming states of the locks. + // We can compute our new base layer. Remember that the CADET and GREEK keys act as their own + // antonyms if they match the layer lock -- e.g., if you have CADET locked, then CADET+X generates + // QWERTY-X. + int base_layer; + if (cadet_request) { + base_layer = (layer_lock == _CADET ? _QWERTY : _CADET); + } else if (greek_request) { + base_layer = (layer_lock == _GREEK ? _QWERTY : _GREEK); + } else { + base_layer = layer_lock; + } + + const bool shifted = (shift_held != shift_lock); + int actual_layer; + if (base_layer == _CADET) { + actual_layer = (shifted ? _SHIFTCADET : _CADET); + } else if (base_layer == _GREEK) { + actual_layer = (shifted ? _SHIFTGREEK : _GREEK); + } else { + // We don't do shifting for the QWERTY layer, since for that we emit USB HID codes and shifting + // is managed by the host OS. + actual_layer = _QWERTY; + } + + // And now we can update the layer lock and the actual firmware layer selector. + layer_lock = next_layer_lock; + layer_state_t new_layer_state = (layer_state & LAYER_MASK) | (1UL << actual_layer); + if (new_layer_state != layer_state) { + layer_state_set(new_layer_state); + } + + // Step 3: Handle accents. If there's a pending accent request, process it. If what the user just + // hit creates a new accent request, update the pending state for the next keypress. + if (!ignore_accent_change && accent_request && record->event.pressed) { + // Only do the accent stuff if we're in the QWERTY layer and we aren't modifying something. + const bool force_no_accent = ( + actual_layer != _QWERTY || + ctrl_held || + super_held || + alt_held + ); + const uint16_t old_accent = accent_request; + accent_request = 0; + if (process_key_after_accent(old_accent, keycode, shifted, force_no_accent)) { + return false; + } + } + + // And if a new accent request just arrived, update accent_request. + if (keycode >= KC_ACCENT_START && keycode < KC_ACCENT_END && record->event.pressed) { + if (shifted) { + // Shift + accent request generates the combining accent key, and leaves accent_request alone. + register_unicode(pgm_read_word_near(combined_accents + keycode - KC_ACCENT_START)); + return false; + } else { + accent_request = keycode; + } + } + + return true; +} diff --git a/keyboards/melody96/keymaps/zunger/readme.md b/keyboards/melody96/keymaps/zunger/readme.md new file mode 100644 index 000000000000..3eb64a2e7395 --- /dev/null +++ b/keyboards/melody96/keymaps/zunger/readme.md @@ -0,0 +1,78 @@ +* The "Cadet-Style" keymap for the melody96. +* Author: Yonatan Zunger (zunger@gmail.com) + +This is an experimental keymap being used both for practical reasons (as my daily driver) and to +work out the ideas of a "space-cadet-style" keyboard which can type text and mathematical symbols +with equal ease. It's designed for anyone who frequently needs to do this outside of a LaTeX +environment, or for anyone who loves the old "Space Cadet" keyboard! And it works at its best when +you have actual Cadet keycaps (like SA Symbolics) installed, because those keycaps will actually +show what you get. + +The core idea of this keyboard is that, in addition to a QWERTY base layer and a function layer, it +supports two additional base layers -- the GREEK layer (the analogue of the Space Cadet "Greek," or +"Front," keys) and the CADET layer (the analogue of the Space Cadet "Top" keys). These layers use +Unicode to generate all of the mathematical symbols you can find on a traditional Space Cadet +layout, plus a bunch of extras. + +Because Unicode can't be encoded using the traditional USB HID protocol, QMK does some clever but +horrifying things to fool your OS. One consequence of this is that the shift key needs to be handled +by the keyboard firmware, not the host OS. To handle this, we have two additional layers -- +SHIFTGREEK and SHIFTCADET -- and handle the flipping between all of these layers here in the +firmware. + +*The simple bit: Using this layout on a Melody96* + +At the core of this layout are three special modifier keys and two special lock keys: + +* The GREEK key, to the right of the spacebar, activates the GREEK layer. GREEK+SHIFT activates + SHIFTGREEK. These keys generate Greek letters on the letter keys (thus the name), and a few + mathematical symbols on other keys. They correspond to the notations on the front of traditional + Space Cadet keys; if your capset doesn't include those (alas, most don't), they're the "pretty + obvious" mappings. +* The CADET key, to the right of GREEK, activates the CADET layer. These are the symbols above the + letters on a Space Cadet layout. CADET+SHIFT activates the SHIFTCADET layer, with even more + symbols. +* The FUNCTION key, to the right of CADET, activates the function layer. This is where you have a + reset mechanism, a selector for which Unicode input type you want, and so on. + +Additionally, GREEK+ALT is equivalent to CADET. This is handy for other keyboards where you don't +have room for this many modifiers. + +The lock keys are: + +* Caps lock, if you use it, will also act as a "shift lock" for the Greek and Cadet layers. Shift + lock is slightly different, in that while it is engaged shift will _dis_engage it; that's actually + pretty useful when typing math. +* An additional "layer lock" key, by default where "num lock" usually goes, will lock the choice of + base layer. To use it, hold down any invocation of the GREEK or CADET layers, or none at all, and + hit lock; it will then put you in that layer. The corresponding modifier key will then toggle you + back to the QWERTY layer. (So for example, if you hit GREEK+LAYER_LOCK and release them, you're + now typing in Greek; the GREEK modifier would cause you to type QWERTY momentarily. To go back to + ordinary QWERTY mode, you'd just hit LAYER_LOCK again with no modifiers held) + +To see the full layout, check out the big comment in keymap.c. + +*A less-simple bit: Adapting this to other keyboards* + +This is really a canary for generic Cadet implementations. Before this can be made generic, a few +things will have to happen: + +(1) Instead of a fixed keymap, this has to be refactored into some kind of array showing the +mappings of QWERTY-layer keys onto the appropriate code points in the GREEK and CADET layers, and +some preprocessor magic needs to auto-transform this plus a traditional keymap for the QWERTY layer +into keymaps for all five of the core layers. (Function layers would presumably be handled on a +per-keyboard basis) + +(2) The standard mapping of those should have some #define's to control things like whether there +are physical F-keys (you would probably want to move superscript and subscripts onto the numbers if +there weren't, and figure out what to do with the non-numeric super/sub keys), whether you actually +want to enable GREEK+ALT=CADET, and so on; + +(3) There should be support for controlling indicator LEDs based on the base layer selection, +caps/shift lock state, and layer lock state, as well as for triggering audio on transitions; + +(4) All the core fancy logic in process_record_user which implements the layer handling should be +factored out into its own function, so that keyboards can easily reuse that, too. + +This is a lovely TODO for future work, and could be particularly fun to go along with new releases +of SA Symbolics and the like. Anyone interested in such things, ping me! diff --git a/keyboards/melody96/keymaps/zunger/rules.mk b/keyboards/melody96/keymaps/zunger/rules.mk new file mode 100644 index 000000000000..a61cfa33fa9e --- /dev/null +++ b/keyboards/melody96/keymaps/zunger/rules.mk @@ -0,0 +1,2 @@ +# You need Unicode for this map. +UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/melody96/melody96.c b/keyboards/melody96/melody96.c new file mode 100644 index 000000000000..44e813586bff --- /dev/null +++ b/keyboards/melody96/melody96.c @@ -0,0 +1 @@ +#include "melody96.h" diff --git a/keyboards/melody96/melody96.h b/keyboards/melody96/melody96.h new file mode 100644 index 000000000000..3d3bc6070c69 --- /dev/null +++ b/keyboards/melody96/melody96.h @@ -0,0 +1,233 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* + * ┌────┬───┐ ┌───┬───┐ + * │10 │11 │ │A3 │A6 │ + * └────┴───┘ └───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │50 │51 │52 │53 │54 │55 │56 │57 │58 │B8 │B7 │B5 │B4 │B3 │B6 │B2 │B1 │B0 │63 │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤ + * │40 │41 │42 │43 │44 │45 │46 │47 │48 │A8 │A7 │A5 │A4 │A6 │A2 │A1 │A0 │64 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┼───┼───┼───┤ ┌─────┐ ┌───┐ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │98 │97 │95 │94 │93 │96 │92 │91 │80 │ │93 │ │90 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ ┌──┴┐ │ ├───┤ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │88 │87 │85 │84 │86 │82 │81 │ │ │84 │ │ │80 │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ ├───┼────┘ └───┘ + * │10 │12 │13 │14 │15 │16 │17 │18 │78 │77 │75 │74 │73 │76 │72 │71 │60 │ │70 │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┴───┼───┤ │ ├───┤ + * │00 │01 │02 │06 │08 │07 │05 │04 │03 │62 │61 │ │ │60 │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───────┴───┴───┘ └───┘ + * ┌──────────┬───┬───┐ + * │74 │66 │62 │ + * └──────────┴───┴───┘ + * ┌────┬────┬────┬────────────────────────┬─────┬─────┬───┬───┐ + * │00 │01 │02 │06 │08 │05 │04 │03 │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┘ + * ┌────┬────┬────┬─────────────────────────────┬────┬────┬────┐ + * │00 │01 │02 │06 │08 │07 │04 │03 │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + * ┌─────┬─────┬───────────────────────────┬─────┬─────┬───┬───┐ + * │00 │01 │06 │08 │05 │04 │03 │ + * └─────┴─────┴───────────────────────────┴─────┴─────┴───┴───┘ + * ┌─────┬─────┬───────────────────────────┬────┬────┬────┬────┐ + * │00 │01 │06 │08 │07 │04 │03 │ + * └─────┴─────┴───────────────────────────┴────┴────┴────┴────┘ + * ┌─────┬─────┬───────────────────────────┬───┬───┬───┬───┬───┐ + * │00 │01 │06 │08 │07 │05 │04 │03 │ + * └─────┴─────┴───────────────────────────┴───┴───┴───┴───┴───┘ + * ┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐ + * │00 │01 │02 │06 │07 │04 │03 │ + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ + * ┌─────┬───┬─────┬───────────────────────────┬───┬───┬───┬───┐ + * │00 │01 │02 │06 │07 │05 │04 │03 │ + * └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘ + * ┌─────┬───┬─────┬───────────────────────┬─────┬─────┬───┬───┐ + * │00 │01 │02 │06 │08 │05 │04 │03 │ + * └─────┴───┴─────┴───────────────────────┴─────┴─────┴───┴───┘ + * ┌─────┬───┬─────┬───────────────────────┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │06 │08 │07 │05 │04 │03 │ + * └─────┴───┴─────┴───────────────────────┴───┴───┴───┴───┴───┘ + * ┌─────┬───┬─────┬───────────────────────┬────┬────┬────┬────┐ + * │00 │01 │02 │06 │08 │07 │04 │03 │ + * └─────┴───┴─────┴───────────────────────┴────┴────┴────┴────┘ + */ + +#define LAYOUT_all( \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, kB8, kB7, kB5, kB4, kB3, kB6, kB2, kB1, kB0, k63, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, kA8, kA7, kA5, kA4, kA3, kA6, kA2, kA1, kA0, k64, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k98, k97, k95, k94, k93, k96, k92, k91, k90, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k88, k87, k85, k84, k86, k82, k81, k80, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k78, k77, k75, k74, k73, k76, k72, k71, k70, \ + k00, k01, k02, k06, k08, k07, k05, k04, k03, k66, k62, k61, k60 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, XXX, k66, XXX, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, XXX, k84, k85, k86, k87, k88 }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98 }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8 }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8 } \ +} + +#define LAYOUT_96_ansi( \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, kB8, kB7, kB5, kB4, kB3, kB6, kB2, kB1, kB0, k63, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, kA8, kA7, kA5, kA4, kA6, kA2, kA1, kA0, k64, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k98, k97, k95, k94, k93, k96, k92, k91, k80, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k88, k87, k85, k84, k86, k82, k81, \ + k10, k12, k13, k14, k15, k16, k17, k18, k78, k77, k75, k74, k73, k76, k72, k71, k60, \ + k00, k01, k02, k06, k08, k07, k05, k04, k03, k66, k62, k61 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, XXX, k66, XXX, XXX }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, XXX, k84, k85, k86, k87, k88 }, \ + { XXX, k91, k92, k93, k94, k95, k96, k97, k98 }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, kA8 }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8 } \ +} + +#define LAYOUT_96_ansi_splitbs( \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, kB8, kB7, kB5, kB4, kB3, kB6, kB2, kB1, kB0, k63, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, kA8, kA7, kA5, kA4, kA3, kA6, kA2, kA1, kA0, k64, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k98, k97, k95, k94, k93, k96, k92, k91, k80, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k88, k87, k85, k84, k86, k82, k81, \ + k10, k12, k13, k14, k15, k16, k17, k18, k78, k77, k75, k74, k73, k76, k72, k71, k60, \ + k00, k01, k02, k06, k08, k07, k05, k04, k03, k66, k62, k61 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, XXX, k66, XXX, XXX }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, XXX, k84, k85, k86, k87, k88 }, \ + { XXX, k91, k92, k93, k94, k95, k96, k97, k98 }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, kA8 }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8 } \ +} + +#define LAYOUT_96_iso( \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, kB8, kB7, kB5, kB4, kB3, kB6, kB2, kB1, kB0, k63, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, kA8, kA7, kA5, kA4, kA6, kA2, kA1, kA0, k64, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k98, k97, k95, k94, k96, k92, k91, k80, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k88, k87, k85, k84, k93, k86, k82, k81, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k78, k77, k75, k74, k73, k76, k72, k71, k60, \ + k00, k01, k02, k06, k08, k07, k05, k04, k03, k66, k62, k61 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, XXX, k66, XXX, XXX }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, XXX, k84, k85, k86, k87, k88 }, \ + { XXX, k91, k92, k93, k94, k95, k96, k97, k98 }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, kA8 }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8 } \ +} + +#define LAYOUT_96_iso_splitbs( \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, kB8, kB7, kB5, kB4, kB3, kB6, kB2, kB1, kB0, k63, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, kA8, kA7, kA5, kA4, kA3, kA6, kA2, kA1, kA0, k64, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k98, k97, k95, k94, k96, k92, k91, k80, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k88, k87, k85, k84, k93, k86, k82, k81, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k78, k77, k75, k74, k73, k76, k72, k71, k60, \ + k00, k01, k02, k06, k08, k07, k05, k04, k03, k66, k62, k61 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, XXX, k66, XXX, XXX }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, XXX, k84, k85, k86, k87, k88 }, \ + { XXX, k91, k92, k93, k94, k95, k96, k97, k98 }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8 }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8 } \ +} + +#define LAYOUT_96_with60( \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, kB8, kB7, kB5, kB4, kB3, kB6, kB2, kB1, kB0, k63, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, kA8, kA7, kA5, kA4, kA6, kA2, kA1, kA0, k64, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k98, k97, k95, k94, k84, k96, k92, k91, k80, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k88, k87, k85, k93, k86, k82, k81, \ + k10, k12, k13, k14, k15, k16, k17, k18, k78, k77, k75, k74, k76, k72, k71, k60,\ + k00, k01, k02, k06, k08, k07, k04, k03, k62, k61 \ +) { \ + { k00, k01, k02, k03, k04, XXX, k06, k07, k08 }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, XXX, XXX, XXX, XXX }, \ + { XXX, k71, k72, XXX, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, XXX, k84, k85, k86, k87, k88 }, \ + { XXX, k91, k92, k93, k94, k95, k96, k97, k98 }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, kA8 }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8 } \ +} + +#define LAYOUT_96_with60_splitbs( \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, kB8, kB7, kB5, kB4, kB3, kB6, kB2, kB1, kB0, k63, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, kA8, kA7, kA5, kA4, kA3, kA6, kA2, kA1, kA0, k64, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k98, k97, k95, k94, k84, k96, k92, k91, k80, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k88, k87, k85, k93, k86, k82, k81, \ + k10, k12, k13, k14, k15, k16, k17, k18, k78, k77, k75, k74, k76, k72, k71, k60, \ + k00, k01, k02, k06, k08, k07, k04, k03, k62, k61 \ +) { \ + { k00, k01, k02, k03, k04, XXX, k06, k07, k08 }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, XXX, XXX, XXX, XXX }, \ + { XXX, k71, k72, XXX, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, XXX, k84, k85, k86, k87, k88 }, \ + { XXX, k91, k92, k93, k94, k95, k96, k97, k98 }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8 }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8 } \ +} + +#define LAYOUT_96_with60_split_num0( \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, kB8, kB7, kB5, kB4, kB3, kB6, kB2, kB1, kB0, k63, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, kA8, kA7, kA5, kA4, kA6, kA2, kA1, kA0, k64, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k98, k97, k95, k94, k84, k96, k92, k91, k80,\ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k88, k87, k85, k93, k86, k82, k81, \ + k10, k12, k13, k14, k15, k16, k17, k18, k78, k77, k75, k74, k76, k72, k71, k60, \ + k00, k01, k02, k06, k08, k07, k04, k03, k66, k62, k61 \ +) { \ + { k00, k01, k02, k03, k04, XXX, k06, k07, k08 }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, XXX, k66, XXX, XXX }, \ + { XXX, k71, k72, XXX, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, XXX, k84, k85, k86, k87, k88 }, \ + { XXX, k91, k92, k93, k94, k95, k96, k97, k98 }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, kA8 }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8 } \ +} diff --git a/keyboards/melody96/readme.md b/keyboards/melody96/readme.md new file mode 100644 index 000000000000..16338e9ed3c9 --- /dev/null +++ b/keyboards/melody96/readme.md @@ -0,0 +1,19 @@ +# YMDK Melody96 + +![melody96](https://i.imgur.com/9o0a6XFh.png) + +96-key Keyboard from YMDK. The PCB for this board is also commonly used in the NYM96. + +* Keyboard Maintainer: [superuser41](https://github.com/kaylanm) +* Hardware Supported: melody96 +* Hardware Availability: [YMDK on Geekhack, group buy closed](https://geekhack.org/index.php?topic=93614.0), [NYM96 on Massdrop](https://www.massdrop.com/buy/nym96-aluminum-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make melody96:default + +Flashing example for this keyboard: + + make melody96:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/melody96/rules.mk b/keyboards/melody96/rules.mk new file mode 100644 index 000000000000..b27013f8630d --- /dev/null +++ b/keyboards/melody96/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/system76/launch_1/i2c.c b/keyboards/system76/launch_1/i2c.c new file mode 100644 index 000000000000..a46927fa59e2 --- /dev/null +++ b/keyboards/system76/launch_1/i2c.c @@ -0,0 +1,176 @@ +#include +#include +#include + +#include "i2c.h" + +#define TIMEOUT (F_CPU/1000) + +// Initialize I2C with specified buad rate +void i2c_init(unsigned long baud) { + TWAR = 0; + TWBR = (uint8_t)(((F_CPU / baud) - 16 ) / 2); + TWCR = 0; +} + +// Send an I2C start condition, a 7-bit address, and a read bit +// Returns zero on success or negative number on error +int i2c_start(uint8_t addr, bool read) { + uint32_t count; + uint8_t twst; + + // transmit START condition + TWCR = (1< 0) count -= 1; + if (count == 0) return -1; + + // check if the start condition was successfully transmitted + twst = TW_STATUS & 0xF8; + if ((twst != TW_START) && (twst != TW_REP_START)) return -1; + + // load slave addr into data register + TWDR = ((addr << 1) | read); + // start transmission of addr + TWCR = (1< 0) count -= 1; + if (count == 0) return -1; + + // check if the device has acknowledged the READ / WRITE mode + twst = TW_STATUS & 0xF8; + if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) return -1; + + return 0; +} + +// Send an I2C stop condition +// Always successful +void i2c_stop(void) { + // transmit STOP condition + TWCR = (1< 0) count -= 1; + // timed out + if (count == 0) return -1; + // failed to receive ack + if((TWSR & 0xF8) != TW_MT_DATA_ACK) return -1; + } + + return i; +} + +// Read a byte from the I2C bus, sending an ack if specified +// Returns byte data on success or negative number on error +int i2c_read_byte(bool ack) { + if (ack) { + // start TWI module and acknowledge data after reception + TWCR = (1< 0) count -= 1; + if (count == 0) return -1; + // return received data from TWDR + return (int)TWDR; +} + +// Read data from the I2C bus +// Returns bytes read on success or negative number on error +int i2c_read(uint8_t * data, int length) { + int res; + int i; + + for (i = 0; i < length; i++) { + bool ack = (i + 1) < length; + res = i2c_read_byte(ack); + if (res < 0) return res; + data[i] = (uint8_t)res; + } + + return i; +} + +// Receive data from a specified address on the I2C bus +// Returns bytes read on success or negative number on error +int i2c_recv(uint8_t addr, uint8_t* data, int length) { + int res = 0; + + res = i2c_start(addr, true); + if (res < 0) return res; + + res = i2c_read(data, length); + if (res < 0) return res; + + i2c_stop(); + + return res; +} + +// Send data to a specified address on the I2C bus +// Returns bytes written on success or negative number on error +int i2c_send(uint8_t addr, uint8_t* data, int length) { + int res = 0; + + res = i2c_start(addr, false); + if (res < 0) return res; + + res = i2c_write(data, length); + if (res < 0) return res; + + i2c_stop(); + + return res; +} + +// Get data from a specified address and register on the I2C bus +// Returns bytes read on success or negative number on error +int i2c_get(uint8_t addr, uint8_t reg, uint8_t* data, int length) { + int res = 0; + + res = i2c_start(addr, false); + if (res < 0) return res; + + res = i2c_write(®, 1); + if (res < 0) return res; + + return i2c_recv(addr, data, length); +} + +// Set data in a specified address and register on the I2C bus +// Returns bytes written on success or negative number on error +int i2c_set(uint8_t addr, uint8_t reg, uint8_t* data, int length) { + int res = 0; + + res = i2c_start(addr, false); + if (res < 0) return res; + + res = i2c_write(®, 1); + if (res < 0) return res; + + res = i2c_write(data, length); + if (res < 0) return res; + + i2c_stop(); + + return res; +} diff --git a/keyboards/system76/launch_1/i2c.h b/keyboards/system76/launch_1/i2c.h new file mode 100644 index 000000000000..f980a308dced --- /dev/null +++ b/keyboards/system76/launch_1/i2c.h @@ -0,0 +1,46 @@ +#ifndef I2C_H +#define I2C_H + +#include +#include + +// Initialize I2C with specified buad rate +void i2c_init(unsigned long baud); + +// Send an I2C start condition, a 7-bit address, and a read bit +// Returns zero on success or negative number on error +int i2c_start(uint8_t addr, bool read); + +// Send an I2C stop condition +// Always successful +void i2c_stop(void); + +// Write data to the I2C bus +// Returns bytes written on success or negative number on error +int i2c_write(uint8_t * data, int length); + +// Read a byte from the I2C bus, sending an ack if specified +// Returns byte data on success or negative number on error +int i2c_read_byte(bool ack); + +// Read data from the I2C bus +// Returns bytes read on success or negative number on error +int i2c_read(uint8_t * data, int length); + +// Receive data from a specified address on the I2C bus +// Returns bytes read on success or negative number on error +int i2c_recv(uint8_t addr, uint8_t* data, int length); + +// Send data to a specified address on the I2C bus +// Returns bytes written on success or negative number on error +int i2c_send(uint8_t addr, uint8_t* data, int length); + +// Get data from a specified address and register on the I2C bus +// Returns bytes read on success or negative number on error +int i2c_get(uint8_t addr, uint8_t reg, uint8_t* data, int length); + +// Set data in a specified address and register on the I2C bus +// Returns bytes written on success or negative number on error +int i2c_set(uint8_t addr, uint8_t reg, uint8_t* data, int length); + +#endif // I2C_H diff --git a/keyboards/system76/launch_1/keymaps/jeremy/keymap.c b/keyboards/system76/launch_1/keymaps/jeremy/keymap.c new file mode 100644 index 000000000000..765cf8545013 --- /dev/null +++ b/keyboards/system76/launch_1/keymaps/jeremy/keymap.c @@ -0,0 +1,91 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || HOME | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE || PGUP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | [ | ] | || | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ || PGDN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | ; | ' | | | | + | FN | A | S | D | F | G | H | J | K | L | : | " | ENTER | | END | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | CTRL | FN | LALT | LGUI | SPACE | BACKSPACE | ESC | RALT | FN | | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_ESC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1, function layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || PLAY/ | +| RESET | | | | | | | | | | | | | || PAUSE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || VOLUME | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || UP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | LED | LED | LED || VOLUME | +|PRINT SCREEN| | | | | | | PGUP | HOME | PGDN | | DOWN | UP | TOGGLE || DOWN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | VOL | VOL | | | | | | | | | | | | + | | | DOWN | UP | MUTE | | LEFT | DOWN | UP | RIGHT | | | | | MUTE | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | | | | | | + | | | | | | | END | | | | | | PGUP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | | | | | ENTER | DELETE | | | | | HOME | PGDN | END | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, + KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_PGDN, KC_TRNS, RGB_VAD, RGB_VAI, RGB_TOG, KC_VOLD, + KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_1/keymaps/levi/keymap.c b/keyboards/system76/launch_1/keymaps/levi/keymap.c new file mode 100644 index 000000000000..67a2a5936052 --- /dev/null +++ b/keyboards/system76/launch_1/keymaps/levi/keymap.c @@ -0,0 +1,133 @@ +#include QMK_KEYBOARD_H + +static bool lctl_pressed, rctl_pressed, esc_pressed; +void system76_ec_unlock(void); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, Dvorak layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || HOME | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | [ | ] | || | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | { | } | BACKSPACE || PGUP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | ' | , | . | | | | | | | | / | = | || | +| TAB | " | < | > | P | Y | F | G | C | R | L | ? | + | | \ || PGDN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | | - | | | | + | CTRL | A | O | E | U | I | D | H | T | N | S | _ | ENTER | | END | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | : | | | | | | | | | | | | + | SHIFT | ; | Q | J | K | X | B | M | W | V | Z | SHIFT | UP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | FN | CTRL | LALT | LGUI | SPACE | FN | RCTRL | RALT | FN | | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_END, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, + MO(2), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_RCTL, KC_RALT, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT + ), + +/* Layer 1, QWERTY layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || HOME | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE || PGUP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | [ | ] | || | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ || PGDN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | ; | ' | | | | + | CTRL | A | S | D | F | G | H | J | K | L | : | " | ENTER | | END | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | FN | CTRL | LALT | LGUI | SPACE | FN | RCTRL | RALT | FN | | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| +*/ + + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + MO(2), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_RCTL, KC_RALT, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 2, function layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| QK_BOOT| | | | | | | | | | | | | || Dvorak | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| | | | | | | | | | | | | | || Qwerty | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| | Home | Up | End | PgUp | | PgUp | Home | Up | End | | | | PrtScr || | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | | | | | | + | | Left | Down | Right | PgDn | | PgDn | Left | Down | Right | | | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | | | | | | + | |PlayPaus| Prev | Next | VolDn | VolUp | VolMute| | | | | | PGUP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | | | | | Backspace | | | | | | HOME | PGDN | END | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + +* 'QK_BOOT' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [2] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(1), + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LCTL: + lctl_pressed = record->event.pressed; + break; + case KC_RCTL: + rctl_pressed = record->event.pressed; + break; + case KC_ESC: + esc_pressed = record ->event.pressed; + break; + }; + return true; +} + +void matrix_scan_user(void) { + if (lctl_pressed && rctl_pressed && esc_pressed) { + system76_ec_unlock(); + } +} diff --git a/keyboards/system76/launch_alpha_1/README.md b/keyboards/system76/launch_alpha_1/README.md new file mode 100644 index 000000000000..a0e94a44bfcb --- /dev/null +++ b/keyboards/system76/launch_alpha_1/README.md @@ -0,0 +1,21 @@ +## Flashing firmware: +* Clone this repository and `cd` into the `qmk_firmware` directory. +* After cloning, you probably need to run `make git-submodule`. + - You may also need to install dependencies: `sudo apt install avrdude gcc-avr avr-libc` +* To build the firmware without flashing the keyboard, use `make (keyboard name):(layout name)` + - For example, if I want to build Levi's layout for the launch_alpha_1 keyboard, I will run: + `make system76/launch_alpha_1:levi` +* Before flashing firmware, disable your ModemManager: `systemctl stop ModemManager.service` + - It messes with the flasher, so just stop it before flashing. You can disable it with `systemctl disable ModemManager.service` if you wish to. +* To flash the firmware, you'll use the same build command, but with `flash` added to the end: + `make system76/launch_alpha_1:default:flash` + - After it builds, you will see a message that says `Detecting USB port, reset your controller now...`. You then want to hit the "RESET" key on the keyboard if it is programmed into the layout. + - In the default layout and the `levi` layout, it is Fn+Esc. If a RESET key is not programmed into the layout, unplugging and re-plugging the keyboard sometimes begins the flashing process. If it doesn't, you'll have to briefly bridge the RST and GND pins on the Arduino Pro Micro inside the keyboard. Don't attempt this unless you know what you are doing. + +## Making your own layout: +If you want to create your own layout, go to the `keymaps` directory and copy one of the maps in there. You'll probably want to start with the default layout, but the other layouts in there may be helpful references. The name of the directory you create will be the name of your layout. Ensure that it has no spaces or strange symbols, as this could lead to build errors. + +Inside of each layout directory, there is a file called `keymap.c`, which is what you will be customizing to create your own keymap. The commented out grid area in this file is a reference for the actual key assignments below it. When I am modifying a layout, I first update this grid. It helps me keep track of where I want everything. It does not matter what you label the keys in this grid since it is in a comment. Just try to keep it understandable for yourself and everyone else. + +The keycodes below that do have to be typed correctly. A full list of keycodes can be found here: https://beta.docs.qmk.fm/reference/keycodes . Use the shorter keycode alias to help keep these lined up (e.g. use `KC_ESC` instead of `KC_ESCAPE`). + diff --git a/keyboards/system76/launch_alpha_1/config.h b/keyboards/system76/launch_alpha_1/config.h new file mode 100644 index 000000000000..9b62c19a093a --- /dev/null +++ b/keyboards/system76/launch_alpha_1/config.h @@ -0,0 +1,62 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1776 +#define PRODUCT_ID 0x1776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER System76 +#define PRODUCT Launch Keyboard Alpha 1 +#define DESCRIPTION Launch Keyboard Alpha 1 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, D3, D2, D1, D0, D4, D5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +// NKRO must be used +#define FORCE_NKRO + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +// Dynamic keyboard support { +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage +#define EEPROM_SIZE 1024 + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x76EC +#define EEPROM_MAGIC_ADDR 64 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x01 +#define EEPROM_VERSION_ADDR (EEPROM_MAGIC_ADDR + 2) + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR (EEPROM_VERSION_ADDR + 1) +#define DYNAMIC_KEYMAP_EEPROM_SIZE (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) +// Dynamic macro starts after dynamic keymaps +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR + DYNAMIC_KEYMAP_EEPROM_SIZE) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (EEPROM_SIZE - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR) +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// } Dynamic keyboard support + +#endif // CONFIG_H diff --git a/keyboards/system76/launch_alpha_1/keymaps/carl/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/carl/keymap.c new file mode 100644 index 000000000000..2725a93c09b7 --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/carl/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | Alt | FN | LGUI | BACKSPACE | SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, MO(1), KC_LGUI, KC_BSPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| RESET | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | Home | PgUp | PgDn | End | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | | | | | | LEFT | DOWN | UP | RIGHT | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | | | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/keymaps/default/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/default/keymap.c new file mode 100644 index 000000000000..ae6d4bf78af8 --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | FN | LGUI | LALT | SPACE | SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| RESET | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | | | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/keymaps/ian/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/ian/keymap.c new file mode 100644 index 000000000000..4bae6c0613c6 --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/ian/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | FN | LGUI | LALT | SPACE | SPACE | RALT | FN | RCTRL | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| POWER | | | MUTE | | VOL↓ | VOL↑ | | BRT↓ | BRT↑ | | | SLEEP | INSERT | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| PLAY | M_PREV | M_NEXT | | | | | | | | | | | RESET | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | | | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [1] = LAYOUT( + KC_POWER, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_SLEP, KC_INS, + KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/keymaps/jeremy/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/jeremy/keymap.c new file mode 100644 index 000000000000..d7fc753aae8b --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/jeremy/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +#define FNESC LT(1, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | FN(ESC) | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | FN | LALT | LGUI | SPACE | BACKSPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + FNESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| RESET | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | PGUP | HOME | PGDN | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | | | | | | LEFT | DOWN | UP | RIGHT | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | | | | | | | END | | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | | DELETE | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/keymaps/john/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/john/keymap.c new file mode 100644 index 000000000000..580b1b471c73 --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/john/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | LGUI | FN | LALT | SPACE | SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| RESET | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | | | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/keymaps/levi/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/levi/keymap.c new file mode 100644 index 000000000000..6924bae3b1c3 --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/levi/keymap.c @@ -0,0 +1,103 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, dvorak layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | {[ | }] | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| TAB | '" | ,< | .> | P | Y | F | G | C | R | L | ?/ | =+ | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | CTRL | A | O | E | U | I | D | H | T | N | S | -_ | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | SHIFT | ;: | Q | J | K | X | B | M | W | V | Z | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | FN | LALT | LGUI | SPACE | FN | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, + KC_LCTL, MO(2), KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_RCTL, KC_RALT, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, qwerty layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | FN | LALT | LGUI | SPACE | FN | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(2), KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_RCTL, KC_RALT, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 2, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| QK_BOOT| | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | Home | Up | End | PgUp | | PgUp | Home | Up | End | | | | PrtScr | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | Left | Down | Right | PgDn | | PgDn | Left | Down | Right | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | |PlayPaus| Prev | Next | VolDn | VolUp | VolMute| | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | Backspace | | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +* 'QK_BOOT' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [2] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, TO(1), TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/keymaps/nathaniel/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/nathaniel/keymap.c new file mode 100644 index 000000000000..3d7efa9f64f6 --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/nathaniel/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | LGUI | FN | LCTL | LALT | SPACE | SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LGUI, MO(1), KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| RESET | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | | | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/keymaps/sean/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/sean/keymap.c new file mode 100644 index 000000000000..65cf3e330c4a --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/sean/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | FN | LGUI | LALT | SPACE | BACKSPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| RESET | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | | | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/keymaps/shpurk/keymap.c b/keyboards/system76/launch_alpha_1/keymaps/shpurk/keymap.c new file mode 100644 index 000000000000..701e702bb76c --- /dev/null +++ b/keyboards/system76/launch_alpha_1/keymaps/shpurk/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, qwerty layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | [ | ] | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | CTRL | FN | LGUI | LALT | SPACE | Backspace | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +___________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | +| RESET | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________| +| | | | | | | | | | | | | | | +| | Home | Up | End | PgUp | | PgUp | Home | Up | End | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | Left | Down | Right | PgDn | | PgDn | Left | Down | Right | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________| + | | | | | | | | | | | | | | + | |PlayPaus| Prev | Next | VolDn | VolUp | VolMute| | | | | | PgUp | + ____|____________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | + | | | | | Backspace | | | | | Home | PgDn | End | + |____________|________|_______|________|_________________|_________________|________|________|_____________|________|________|________| +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_1/launch_alpha_1.c b/keyboards/system76/launch_alpha_1/launch_alpha_1.c new file mode 100644 index 000000000000..2f55f3772ebf --- /dev/null +++ b/keyboards/system76/launch_alpha_1/launch_alpha_1.c @@ -0,0 +1,49 @@ +#include "dynamic_keymap.h" +#include "tmk_core/common/eeprom.h" + +#include "launch_alpha_1.h" + +bool eeprom_is_valid(void) { + return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && + eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); +} + +void eeprom_set_valid(bool valid) { + eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); + eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); +} + +void eeprom_reset(void) { + // Set the keyboard specific EEPROM state as invalid. + eeprom_set_valid(false); + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); +} + +void bootmagic_lite(void) { + // The lite version of TMK's bootmagic. + // 100% less potential for accidentally making the + // keyboard do stupid things. + + // We need multiple scans because debouncing can't be turned off. + matrix_scan(); + wait_ms(DEBOUNCE); + wait_ms(DEBOUNCE); + matrix_scan(); + + // If the Esc (matrix 0,0) is held down on power up, + // reset the EEPROM valid state and jump to bootloader. + if ( matrix_get_row(0) & (1<<0) ) { + eeprom_reset(); + bootloader_jump(); + } +} + +void matrix_init_kb(void) { + bootmagic_lite(); + if (!eeprom_is_valid()) { + dynamic_keymap_reset(); + dynamic_keymap_macro_reset(); + eeprom_set_valid(true); + } +} diff --git a/keyboards/system76/launch_alpha_1/launch_alpha_1.h b/keyboards/system76/launch_alpha_1/launch_alpha_1.h new file mode 100644 index 000000000000..85cf4a044b25 --- /dev/null +++ b/keyboards/system76/launch_alpha_1/launch_alpha_1.h @@ -0,0 +1,24 @@ +#ifndef LAUNCH_ALPHA_1_H +#define LAUNCH_ALPHA_1_H + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, ___ }, \ + { K50, K51, K52, K53, K54, ___, K55, K56, K57, K58, K59, K5A, K5B, ___ }, \ +} + +#endif // LAUNCH_ALPHA_1_H diff --git a/keyboards/system76/launch_alpha_1/rules.mk b/keyboards/system76/launch_alpha_1/rules.mk new file mode 100644 index 000000000000..c2229278477c --- /dev/null +++ b/keyboards/system76/launch_alpha_1/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +DYNAMIC_KEYMAP_ENABLE = yes # Reconfigurable keyboard without flashing firmware +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RAW_ENABLE = yes # Enable RAW HID commands (used by keyboard configurator) +USB_6KRO_ENABLE = no # 6key Rollover + +# Add System76 EC command interface +SRC+=../system76_ec.c diff --git a/keyboards/system76/launch_alpha_2/README.md b/keyboards/system76/launch_alpha_2/README.md new file mode 100644 index 000000000000..caa172e67b2b --- /dev/null +++ b/keyboards/system76/launch_alpha_2/README.md @@ -0,0 +1,19 @@ +## Flashing firmware: +* Clone this repository and `cd` into the `qmk_firmware` directory. +* After cloning, you probably need to run `make git-submodule`. + - You may also need to install dependencies: `sudo apt install avrdude gcc-avr avr-libc` +* To build the firmware without flashing the keyboard, use `make (keyboard name):(layout name)` + - For example, if I want to build Jeremy's layout for the Launch keyboard, I will run: + `make system76/launch_alpha_2:jeremy` +* To flash the firmware, you'll use the same build command, but with `flash` added to the end: + `make system76/launch_alpha_2:default:flash` + - After it builds, you will see a message that says `Detecting USB port, reset your controller now...`. You then want to hit the "RESET" key on the keyboard if it is programmed into the layout. + - In the default layout, it is Fn+Esc. If a RESET key is not programmed into the layout, you will have to manually reset the controller. + +## Making your own layout: +If you want to create your own layout, go to the `keymaps` directory and copy one of the maps in there. You'll probably want to start with the default layout, but the other layouts in there may be helpful references. The name of the directory you create will be the name of your layout. Ensure that it has no spaces or strange symbols, as this could lead to build errors. + +Inside of each layout directory, there is a file called `keymap.c`, which is what you will be customizing to create your own keymap. The commented out grid area in this file is a reference for the actual key assignments below it. When I am modifying a layout, I first update this grid. It helps me keep track of where I want everything. It does not matter what you label the keys in this grid since it is in a comment. Just try to keep it understandable for yourself and everyone else. + +The keycodes below that do have to be typed correctly. A full list of keycodes can be found here: https://beta.docs.qmk.fm/reference/keycodes . Use the shorter keycode alias to help keep these lined up (e.g. use `KC_ESC` instead of `KC_ESCAPE`). + diff --git a/keyboards/system76/launch_alpha_2/config.h b/keyboards/system76/launch_alpha_2/config.h new file mode 100644 index 000000000000..63177dd6af32 --- /dev/null +++ b/keyboards/system76/launch_alpha_2/config.h @@ -0,0 +1,62 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1776 +#define PRODUCT_ID 0x1776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER System76 +#define PRODUCT Launch Keyboard Alpha 2 +#define DESCRIPTION Launch Keyboard Alpha 2 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F5, F4, F1, F0, B3, F6 } +#define MATRIX_COL_PINS { B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +// NKRO must be used +#define FORCE_NKRO + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +// Dynamic keyboard support { +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage +#define EEPROM_SIZE 1024 + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x76EC +#define EEPROM_MAGIC_ADDR 64 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x01 +#define EEPROM_VERSION_ADDR (EEPROM_MAGIC_ADDR + 2) + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR (EEPROM_VERSION_ADDR + 1) +#define DYNAMIC_KEYMAP_EEPROM_SIZE (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) +// Dynamic macro starts after dynamic keymaps +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR + DYNAMIC_KEYMAP_EEPROM_SIZE) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (EEPROM_SIZE - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR) +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// } Dynamic keyboard support + +#endif // CONFIG_H diff --git a/keyboards/system76/launch_alpha_2/keymaps/default/keymap.c b/keyboards/system76/launch_alpha_2/keymaps/default/keymap.c new file mode 100644 index 000000000000..54cd388d8000 --- /dev/null +++ b/keyboards/system76/launch_alpha_2/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || HOME | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE || PGUP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | [ | ] | || | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ || PGDN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | ; | ' | | | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | | END | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | CTRL | FN | LGUI | LALT | SPACE | SPACE | RCTRL | RALT | FN | | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| RESET | | | | | | | | | | | | | || | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| | | | | | | | | | | | | | || | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| | | | | | | | | | | | | | || | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PGUP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | | | | | | | | | | | HOME | PGDN | END | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_2/keymaps/jeremy/keymap.c b/keyboards/system76/launch_alpha_2/keymaps/jeremy/keymap.c new file mode 100644 index 000000000000..b6b31b4862a1 --- /dev/null +++ b/keyboards/system76/launch_alpha_2/keymaps/jeremy/keymap.c @@ -0,0 +1,73 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || HOME | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE || PGUP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | [ | ] | || | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ || PGDN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | ; | ' | | | | + | FN | A | S | D | F | G | H | J | K | L | : | " | ENTER | | END | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | CTRL | FN | LALT | LGUI | SPACE | SPACE | RCTRL | RALT | FN | | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1, function layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| RESET | | | | | | | | | | | | | || | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| | | | | | | | | | | | | | || | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| | | | | | | | PGUP | HOME | PGDN | | | | || | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | | | | | | + | | | | | | | LEFT | DOWN | UP | RIGHT | BSPC | DEL | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | | | | | | + | | | | | | | END | | | | | | PGUP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | | | | | | | | | | | HOME | PGDN | END | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, KC_DEL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_alpha_2/launch_alpha_2.c b/keyboards/system76/launch_alpha_2/launch_alpha_2.c new file mode 100644 index 000000000000..84d851fc48f5 --- /dev/null +++ b/keyboards/system76/launch_alpha_2/launch_alpha_2.c @@ -0,0 +1,49 @@ +#include "dynamic_keymap.h" +#include "tmk_core/common/eeprom.h" + +#include "launch_alpha_2.h" + +bool eeprom_is_valid(void) { + return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && + eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); +} + +void eeprom_set_valid(bool valid) { + eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); + eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); +} + +void eeprom_reset(void) { + // Set the keyboard specific EEPROM state as invalid. + eeprom_set_valid(false); + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); +} + +void bootmagic_lite(void) { + // The lite version of TMK's bootmagic. + // 100% less potential for accidentally making the + // keyboard do stupid things. + + // We need multiple scans because debouncing can't be turned off. + matrix_scan(); + wait_ms(DEBOUNCE); + wait_ms(DEBOUNCE); + matrix_scan(); + + // If the Esc (matrix 0,0) is held down on power up, + // reset the EEPROM valid state and jump to bootloader. + if ( matrix_get_row(0) & (1<<0) ) { + eeprom_reset(); + bootloader_jump(); + } +} + +void matrix_init_kb(void) { + bootmagic_lite(); + if (!eeprom_is_valid()) { + dynamic_keymap_reset(); + dynamic_keymap_macro_reset(); + eeprom_set_valid(true); + } +} diff --git a/keyboards/system76/launch_alpha_2/launch_alpha_2.h b/keyboards/system76/launch_alpha_2/launch_alpha_2.h new file mode 100644 index 000000000000..f1a0eebe491e --- /dev/null +++ b/keyboards/system76/launch_alpha_2/launch_alpha_2.h @@ -0,0 +1,24 @@ +#ifndef LAUNCH_ALPHA_2_H +#define LAUNCH_ALPHA_2_H + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3D }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, ___, ___ }, \ + { K50, K51, K52, K53, K54, ___, K55, K56, K57, K58, K59, K5A, K5B, ___, ___ }, \ +} + +#endif // LAUNCH_ALPHA_2_H diff --git a/keyboards/system76/launch_alpha_2/layout-files/system76-launch-configurable-keyboard-1-0.dxf b/keyboards/system76/launch_alpha_2/layout-files/system76-launch-configurable-keyboard-1-0.dxf new file mode 100644 index 000000000000..7d60047e9053 --- /dev/null +++ b/keyboards/system76/launch_alpha_2/layout-files/system76-launch-configurable-keyboard-1-0.dxf @@ -0,0 +1,8002 @@ + 0 +SECTION + 2 +HEADER + 9 +$ACADVER + 1 +AC1009 + 9 +$INSBASE + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$EXTMIN + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$EXTMAX + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$LIMMIN + 10 +0.0 + 20 +0.0 + 9 +$LIMMAX + 10 +12.0 + 20 +9.0 + 9 +$ORTHOMODE + 70 + 0 + 9 +$REGENMODE + 70 + 1 + 9 +$FILLMODE + 70 + 1 + 9 +$QTEXTMODE + 70 + 0 + 9 +$MIRRTEXT + 70 + 0 + 9 +$DRAGMODE + 70 + 2 + 9 +$LTSCALE + 40 +1.0 + 9 +$OSMODE + 70 + 37 + 9 +$ATTMODE + 70 + 1 + 9 +$TEXTSIZE + 40 +0.2 + 9 +$TRACEWID + 40 +0.05 + 9 +$TEXTSTYLE + 7 +STANDARD + 9 +$CLAYER + 8 +0 + 9 +$CELTYPE + 6 +BYLAYER + 9 +$CECOLOR + 62 + 256 + 9 +$DIMSCALE + 40 +1.0 + 9 +$DIMASZ + 40 +0.18 + 9 +$DIMEXO + 40 +0.0625 + 9 +$DIMDLI + 40 +0.38 + 9 +$DIMRND + 40 +0.0 + 9 +$DIMDLE + 40 +0.0 + 9 +$DIMEXE + 40 +0.18 + 9 +$DIMTP + 40 +0.0 + 9 +$DIMTM + 40 +0.0 + 9 +$DIMTXT + 40 +0.18 + 9 +$DIMCEN + 40 +0.09 + 9 +$DIMTSZ + 40 +0.0 + 9 +$DIMTOL + 70 + 0 + 9 +$DIMLIM + 70 + 0 + 9 +$DIMTIH + 70 + 1 + 9 +$DIMTOH + 70 + 1 + 9 +$DIMSE1 + 70 + 0 + 9 +$DIMSE2 + 70 + 0 + 9 +$DIMTAD + 70 + 0 + 9 +$DIMZIN + 70 + 0 + 9 +$DIMBLK + 1 + + 9 +$DIMASO + 70 + 1 + 9 +$DIMSHO + 70 + 1 + 9 +$DIMPOST + 1 + + 9 +$DIMAPOST + 1 + + 9 +$DIMALT + 70 + 0 + 9 +$DIMALTD + 70 + 2 + 9 +$DIMALTF + 40 +25.4 + 9 +$DIMLFAC + 40 +1.0 + 9 +$DIMTOFL + 70 + 0 + 9 +$DIMTVP + 40 +0.0 + 9 +$DIMTIX + 70 + 0 + 9 +$DIMSOXD + 70 + 0 + 9 +$DIMSAH + 70 + 0 + 9 +$DIMBLK1 + 1 + + 9 +$DIMBLK2 + 1 + + 9 +$DIMSTYLE + 2 +STANDARD + 9 +$DIMCLRD + 70 + 0 + 9 +$DIMCLRE + 70 + 0 + 9 +$DIMCLRT + 70 + 0 + 9 +$DIMTFAC + 40 +1.0 + 9 +$DIMGAP + 40 +0.09 + 9 +$LUNITS + 70 + 2 + 9 +$LUPREC + 70 + 4 + 9 +$SKETCHINC + 40 +0.1 + 9 +$FILLETRAD + 40 +0.0 + 9 +$AUNITS + 70 + 0 + 9 +$AUPREC + 70 + 0 + 9 +$MENU + 1 +. + 9 +$ELEVATION + 40 +0.0 + 9 +$PELEVATION + 40 +0.0 + 9 +$THICKNESS + 40 +0.0 + 9 +$LIMCHECK + 70 + 0 + 9 +$BLIPMODE + 70 + 0 + 9 +$CHAMFERA + 40 +0.0 + 9 +$CHAMFERB + 40 +0.0 + 9 +$SKPOLY + 70 + 0 + 9 +$TDCREATE + 40 +2458914.452037036885 + 9 +$TDUPDATE + 40 +2458914.452037036885 + 9 +$TDINDWG + 40 +0.0 + 9 +$TDUSRTIMER + 40 +0.0 + 9 +$USRTIMER + 70 + 1 + 9 +$ANGBASE + 50 +0.0 + 9 +$ANGDIR + 70 + 0 + 9 +$PDMODE + 70 + 0 + 9 +$PDSIZE + 40 +0.0 + 9 +$PLINEWID + 40 +0.0 + 9 +$COORDS + 70 + 1 + 9 +$SPLFRAME + 70 + 0 + 9 +$SPLINETYPE + 70 + 6 + 9 +$SPLINESEGS + 70 + 8 + 9 +$ATTDIA + 70 + 1 + 9 +$ATTREQ + 70 + 1 + 9 +$HANDLING + 70 + 1 + 9 +$HANDSEED + 5 +151 + 9 +$SURFTAB1 + 70 + 6 + 9 +$SURFTAB2 + 70 + 6 + 9 +$SURFTYPE + 70 + 6 + 9 +$SURFU + 70 + 6 + 9 +$SURFV + 70 + 6 + 9 +$UCSNAME + 2 + + 9 +$UCSORG + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSXDIR + 10 +1.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSYDIR + 10 +0.0 + 20 +1.0 + 30 +0.0 + 9 +$PUCSNAME + 2 + + 9 +$PUCSORG + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSXDIR + 10 +1.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSYDIR + 10 +0.0 + 20 +1.0 + 30 +0.0 + 9 +$USERI1 + 70 + 0 + 9 +$USERI2 + 70 + 0 + 9 +$USERI3 + 70 + 0 + 9 +$USERI4 + 70 + 0 + 9 +$USERI5 + 70 + 0 + 9 +$USERR1 + 40 +0.0 + 9 +$USERR2 + 40 +0.0 + 9 +$USERR3 + 40 +0.0 + 9 +$USERR4 + 40 +0.0 + 9 +$USERR5 + 40 +0.0 + 9 +$WORLDVIEW + 70 + 1 + 9 +$SHADEDGE + 70 + 3 + 9 +$SHADEDIF + 70 + 70 + 9 +$TILEMODE + 70 + 1 + 9 +$MAXACTVP + 70 + 64 + 9 +$PLIMCHECK + 70 + 0 + 9 +$PEXTMIN + 10 +100000000000000000000.0 + 20 +100000000000000000000.0 + 30 +100000000000000000000.0 + 9 +$PEXTMAX + 10 +-100000000000000000000.0 + 20 +-100000000000000000000.0 + 30 +-100000000000000000000.0 + 9 +$PLIMMIN + 10 +0.0 + 20 +0.0 + 9 +$PLIMMAX + 10 +12.0 + 20 +9.0 + 9 +$UNITMODE + 70 + 0 + 9 +$VISRETAIN + 70 + 1 + 9 +$PLINEGEN + 70 + 0 + 9 +$PSLTSCALE + 70 + 1 + 0 +ENDSEC + 0 +SECTION + 2 +TABLES + 0 +ENDSEC + 0 +SECTION + 2 +ENTITIES + 0 +LINE + 5 +1 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +2.5 + 20 +2.5 + 30 +0.0 + 11 +16.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +2 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +16.5 + 20 +2.5 + 30 +0.0 + 11 +16.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +3 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +2.5 + 20 +16.5 + 30 +0.0 + 11 +16.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +4 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +2.5 + 20 +2.5 + 30 +0.0 + 11 +2.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +5 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +21.5 + 20 +2.5 + 30 +0.0 + 11 +35.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +6 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +35.5 + 20 +2.5 + 30 +0.0 + 11 +35.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +7 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +21.5 + 20 +16.5 + 30 +0.0 + 11 +35.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +8 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +21.5 + 20 +2.5 + 30 +0.0 + 11 +21.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +9 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +40.5 + 20 +2.5 + 30 +0.0 + 11 +54.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +54.5 + 20 +2.5 + 30 +0.0 + 11 +54.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +40.5 + 20 +16.5 + 30 +0.0 + 11 +54.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +40.5 + 20 +2.5 + 30 +0.0 + 11 +40.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +59.5 + 20 +2.5 + 30 +0.0 + 11 +73.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +73.5 + 20 +2.5 + 30 +0.0 + 11 +73.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +59.5 + 20 +16.5 + 30 +0.0 + 11 +73.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +10 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +59.5 + 20 +2.5 + 30 +0.0 + 11 +59.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +11 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +78.5 + 20 +2.5 + 30 +0.0 + 11 +92.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +12 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +92.5 + 20 +2.5 + 30 +0.0 + 11 +92.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +13 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +78.5 + 20 +16.5 + 30 +0.0 + 11 +92.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +14 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +78.5 + 20 +2.5 + 30 +0.0 + 11 +78.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +15 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +97.5 + 20 +2.5 + 30 +0.0 + 11 +111.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +16 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +111.5 + 20 +2.5 + 30 +0.0 + 11 +111.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +17 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +97.5 + 20 +16.5 + 30 +0.0 + 11 +111.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +18 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +97.5 + 20 +2.5 + 30 +0.0 + 11 +97.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +19 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +116.5 + 20 +2.5 + 30 +0.0 + 11 +130.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +1A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +130.5 + 20 +2.5 + 30 +0.0 + 11 +130.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +1B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +116.5 + 20 +16.5 + 30 +0.0 + 11 +130.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +1C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +116.5 + 20 +2.5 + 30 +0.0 + 11 +116.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +1D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +135.5 + 20 +2.5 + 30 +0.0 + 11 +149.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +1E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +149.5 + 20 +2.5 + 30 +0.0 + 11 +149.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +1F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +135.5 + 20 +16.5 + 30 +0.0 + 11 +149.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +20 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +135.5 + 20 +2.5 + 30 +0.0 + 11 +135.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +21 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +154.5 + 20 +2.5 + 30 +0.0 + 11 +168.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +22 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +168.5 + 20 +2.5 + 30 +0.0 + 11 +168.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +23 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +154.5 + 20 +16.5 + 30 +0.0 + 11 +168.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +24 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +154.5 + 20 +2.5 + 30 +0.0 + 11 +154.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +25 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +173.5 + 20 +2.5 + 30 +0.0 + 11 +187.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +26 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +187.5 + 20 +2.5 + 30 +0.0 + 11 +187.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +27 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +173.5 + 20 +16.5 + 30 +0.0 + 11 +187.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +28 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +173.5 + 20 +2.5 + 30 +0.0 + 11 +173.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +29 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +192.5 + 20 +2.5 + 30 +0.0 + 11 +206.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +2A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +206.5 + 20 +2.5 + 30 +0.0 + 11 +206.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +2B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +192.5 + 20 +16.5 + 30 +0.0 + 11 +206.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +2C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +192.5 + 20 +2.5 + 30 +0.0 + 11 +192.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +2D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +2.5 + 30 +0.0 + 11 +225.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +2E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +225.5 + 20 +2.5 + 30 +0.0 + 11 +225.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +2F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +16.5 + 30 +0.0 + 11 +225.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +30 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +2.5 + 30 +0.0 + 11 +211.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +31 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +230.5 + 20 +2.5 + 30 +0.0 + 11 +244.5 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +32 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +244.5 + 20 +2.5 + 30 +0.0 + 11 +244.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +33 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +230.5 + 20 +16.5 + 30 +0.0 + 11 +244.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +34 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +230.5 + 20 +2.5 + 30 +0.0 + 11 +230.5 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +35 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +254.25 + 20 +2.5 + 30 +0.0 + 11 +268.25 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +36 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +268.25 + 20 +2.5 + 30 +0.0 + 11 +268.25 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +37 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +254.25 + 20 +16.5 + 30 +0.0 + 11 +268.25 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +38 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +254.25 + 20 +2.5 + 30 +0.0 + 11 +254.25 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +39 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +2.5 + 30 +0.0 + 11 +296.75 + 21 +2.5 + 31 +0.0 + 0 +LINE + 5 +3A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +296.75 + 20 +2.5 + 30 +0.0 + 11 +296.75 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +3B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +16.5 + 30 +0.0 + 11 +296.75 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +3C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +2.5 + 30 +0.0 + 11 +282.75 + 21 +16.5 + 31 +0.0 + 0 +LINE + 5 +3D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +2.5 + 20 +-16.5 + 30 +0.0 + 11 +16.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +3E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +16.5 + 20 +-16.5 + 30 +0.0 + 11 +16.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +3F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +2.5 + 20 +-2.5 + 30 +0.0 + 11 +16.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +40 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +2.5 + 20 +-16.5 + 30 +0.0 + 11 +2.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +41 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +21.5 + 20 +-16.5 + 30 +0.0 + 11 +35.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +42 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +35.5 + 20 +-16.5 + 30 +0.0 + 11 +35.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +43 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +21.5 + 20 +-2.5 + 30 +0.0 + 11 +35.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +44 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +21.5 + 20 +-16.5 + 30 +0.0 + 11 +21.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +45 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +40.5 + 20 +-16.5 + 30 +0.0 + 11 +54.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +46 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +54.5 + 20 +-16.5 + 30 +0.0 + 11 +54.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +47 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +40.5 + 20 +-2.5 + 30 +0.0 + 11 +54.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +48 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +40.5 + 20 +-16.5 + 30 +0.0 + 11 +40.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +49 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +59.5 + 20 +-16.5 + 30 +0.0 + 11 +73.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +4A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +73.5 + 20 +-16.5 + 30 +0.0 + 11 +73.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +4B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +59.5 + 20 +-2.5 + 30 +0.0 + 11 +73.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +4C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +59.5 + 20 +-16.5 + 30 +0.0 + 11 +59.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +4D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +78.5 + 20 +-16.5 + 30 +0.0 + 11 +92.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +4E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +92.5 + 20 +-16.5 + 30 +0.0 + 11 +92.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +4F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +78.5 + 20 +-2.5 + 30 +0.0 + 11 +92.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +50 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +78.5 + 20 +-16.5 + 30 +0.0 + 11 +78.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +51 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +97.5 + 20 +-16.5 + 30 +0.0 + 11 +111.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +52 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +111.5 + 20 +-16.5 + 30 +0.0 + 11 +111.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +53 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +97.5 + 20 +-2.5 + 30 +0.0 + 11 +111.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +54 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +97.5 + 20 +-16.5 + 30 +0.0 + 11 +97.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +55 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +116.5 + 20 +-16.5 + 30 +0.0 + 11 +130.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +56 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +130.5 + 20 +-16.5 + 30 +0.0 + 11 +130.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +57 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +116.5 + 20 +-2.5 + 30 +0.0 + 11 +130.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +58 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +116.5 + 20 +-16.5 + 30 +0.0 + 11 +116.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +59 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +135.5 + 20 +-16.5 + 30 +0.0 + 11 +149.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +5A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +149.5 + 20 +-16.5 + 30 +0.0 + 11 +149.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +5B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +135.5 + 20 +-2.5 + 30 +0.0 + 11 +149.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +5C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +135.5 + 20 +-16.5 + 30 +0.0 + 11 +135.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +5D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +154.5 + 20 +-16.5 + 30 +0.0 + 11 +168.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +5E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +168.5 + 20 +-16.5 + 30 +0.0 + 11 +168.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +5F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +154.5 + 20 +-2.5 + 30 +0.0 + 11 +168.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +60 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +154.5 + 20 +-16.5 + 30 +0.0 + 11 +154.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +61 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +173.5 + 20 +-16.5 + 30 +0.0 + 11 +187.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +62 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +187.5 + 20 +-16.5 + 30 +0.0 + 11 +187.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +63 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +173.5 + 20 +-2.5 + 30 +0.0 + 11 +187.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +64 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +173.5 + 20 +-16.5 + 30 +0.0 + 11 +173.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +65 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +192.5 + 20 +-16.5 + 30 +0.0 + 11 +206.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +66 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +206.5 + 20 +-16.5 + 30 +0.0 + 11 +206.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +67 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +192.5 + 20 +-2.5 + 30 +0.0 + 11 +206.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +68 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +192.5 + 20 +-16.5 + 30 +0.0 + 11 +192.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +69 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +-16.5 + 30 +0.0 + 11 +225.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +6A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +225.5 + 20 +-16.5 + 30 +0.0 + 11 +225.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +6B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +-2.5 + 30 +0.0 + 11 +225.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +6C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +-16.5 + 30 +0.0 + 11 +211.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +6D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +230.5 + 20 +-16.5 + 30 +0.0 + 11 +244.5 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +6E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +244.5 + 20 +-16.5 + 30 +0.0 + 11 +244.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +6F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +230.5 + 20 +-2.5 + 30 +0.0 + 11 +244.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +70 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +230.5 + 20 +-16.5 + 30 +0.0 + 11 +230.5 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +71 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +254.25 + 20 +-16.5 + 30 +0.0 + 11 +268.25 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +72 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +268.25 + 20 +-16.5 + 30 +0.0 + 11 +268.25 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +73 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +254.25 + 20 +-2.5 + 30 +0.0 + 11 +268.25 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +74 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +254.25 + 20 +-16.5 + 30 +0.0 + 11 +254.25 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +75 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-16.5 + 30 +0.0 + 11 +296.75 + 21 +-16.5 + 31 +0.0 + 0 +LINE + 5 +76 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +296.75 + 20 +-16.5 + 30 +0.0 + 11 +296.75 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +77 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-2.5 + 30 +0.0 + 11 +296.75 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +78 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-16.5 + 30 +0.0 + 11 +282.75 + 21 +-2.5 + 31 +0.0 + 0 +LINE + 5 +79 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +7.25 + 20 +-35.5 + 30 +0.0 + 11 +21.25 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +7A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +21.25 + 20 +-35.5 + 30 +0.0 + 11 +21.25 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +7B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +7.25 + 20 +-21.5 + 30 +0.0 + 11 +21.25 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +7C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +7.25 + 20 +-35.5 + 30 +0.0 + 11 +7.25 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +7D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +31.0 + 20 +-35.5 + 30 +0.0 + 11 +45.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +7E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +45.0 + 20 +-35.5 + 30 +0.0 + 11 +45.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +7F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +31.0 + 20 +-21.5 + 30 +0.0 + 11 +45.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +80 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +31.0 + 20 +-35.5 + 30 +0.0 + 11 +31.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +81 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +50.0 + 20 +-35.5 + 30 +0.0 + 11 +64.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +82 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +64.0 + 20 +-35.5 + 30 +0.0 + 11 +64.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +83 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +50.0 + 20 +-21.5 + 30 +0.0 + 11 +64.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +84 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +50.0 + 20 +-35.5 + 30 +0.0 + 11 +50.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +85 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +69.0 + 20 +-35.5 + 30 +0.0 + 11 +83.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +86 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +83.0 + 20 +-35.5 + 30 +0.0 + 11 +83.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +87 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +69.0 + 20 +-21.5 + 30 +0.0 + 11 +83.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +88 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +69.0 + 20 +-35.5 + 30 +0.0 + 11 +69.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +89 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +88.0 + 20 +-35.5 + 30 +0.0 + 11 +102.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +8A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +102.0 + 20 +-35.5 + 30 +0.0 + 11 +102.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +8B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +88.0 + 20 +-21.5 + 30 +0.0 + 11 +102.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +8C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +88.0 + 20 +-35.5 + 30 +0.0 + 11 +88.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +8D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +107.0 + 20 +-35.5 + 30 +0.0 + 11 +121.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +8E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +121.0 + 20 +-35.5 + 30 +0.0 + 11 +121.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +8F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +107.0 + 20 +-21.5 + 30 +0.0 + 11 +121.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +90 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +107.0 + 20 +-35.5 + 30 +0.0 + 11 +107.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +91 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +126.0 + 20 +-35.5 + 30 +0.0 + 11 +140.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +92 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +140.0 + 20 +-35.5 + 30 +0.0 + 11 +140.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +93 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +126.0 + 20 +-21.5 + 30 +0.0 + 11 +140.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +94 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +126.0 + 20 +-35.5 + 30 +0.0 + 11 +126.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +95 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +145.0 + 20 +-35.5 + 30 +0.0 + 11 +159.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +96 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +159.0 + 20 +-35.5 + 30 +0.0 + 11 +159.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +97 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +145.0 + 20 +-21.5 + 30 +0.0 + 11 +159.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +98 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +145.0 + 20 +-35.5 + 30 +0.0 + 11 +145.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +99 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +164.0 + 20 +-35.5 + 30 +0.0 + 11 +178.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +9A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +178.0 + 20 +-35.5 + 30 +0.0 + 11 +178.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +9B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +164.0 + 20 +-21.5 + 30 +0.0 + 11 +178.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +9C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +164.0 + 20 +-35.5 + 30 +0.0 + 11 +164.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +9D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +183.0 + 20 +-35.5 + 30 +0.0 + 11 +197.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +9E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +197.0 + 20 +-35.5 + 30 +0.0 + 11 +197.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +9F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +183.0 + 20 +-21.5 + 30 +0.0 + 11 +197.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +A0 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +183.0 + 20 +-35.5 + 30 +0.0 + 11 +183.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +A1 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +202.0 + 20 +-35.5 + 30 +0.0 + 11 +216.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +A2 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +216.0 + 20 +-35.5 + 30 +0.0 + 11 +216.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +A3 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +202.0 + 20 +-21.5 + 30 +0.0 + 11 +216.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +A4 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +202.0 + 20 +-35.5 + 30 +0.0 + 11 +202.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +A5 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +221.0 + 20 +-35.5 + 30 +0.0 + 11 +235.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +A6 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +235.0 + 20 +-35.5 + 30 +0.0 + 11 +235.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +A7 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +221.0 + 20 +-21.5 + 30 +0.0 + 11 +235.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +A8 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +221.0 + 20 +-35.5 + 30 +0.0 + 11 +221.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +A9 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +240.0 + 20 +-35.5 + 30 +0.0 + 11 +254.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +AA +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +254.0 + 20 +-35.5 + 30 +0.0 + 11 +254.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +AB +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +240.0 + 20 +-21.5 + 30 +0.0 + 11 +254.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +AC +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +240.0 + 20 +-35.5 + 30 +0.0 + 11 +240.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +AD +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +259.0 + 20 +-35.5 + 30 +0.0 + 11 +273.0 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +AE +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +273.0 + 20 +-35.5 + 30 +0.0 + 11 +273.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +AF +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +259.0 + 20 +-21.5 + 30 +0.0 + 11 +273.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +B0 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +259.0 + 20 +-35.5 + 30 +0.0 + 11 +259.0 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +B1 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-35.5 + 30 +0.0 + 11 +296.75 + 21 +-35.5 + 31 +0.0 + 0 +LINE + 5 +B2 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +296.75 + 20 +-35.5 + 30 +0.0 + 11 +296.75 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +B3 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-21.5 + 30 +0.0 + 11 +296.75 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +B4 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-35.5 + 30 +0.0 + 11 +282.75 + 21 +-21.5 + 31 +0.0 + 0 +LINE + 5 +B5 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +12.0 + 20 +-54.5 + 30 +0.0 + 11 +26.0 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +B6 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +26.0 + 20 +-54.5 + 30 +0.0 + 11 +26.0 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +B7 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +12.0 + 20 +-40.5 + 30 +0.0 + 11 +26.0 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +B8 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +12.0 + 20 +-54.5 + 30 +0.0 + 11 +12.0 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +B9 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +35.75 + 20 +-54.5 + 30 +0.0 + 11 +49.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +BA +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +49.75 + 20 +-54.5 + 30 +0.0 + 11 +49.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +BB +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +35.75 + 20 +-40.5 + 30 +0.0 + 11 +49.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +BC +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +35.75 + 20 +-54.5 + 30 +0.0 + 11 +35.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +BD +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +54.75 + 20 +-54.5 + 30 +0.0 + 11 +68.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +BE +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +68.75 + 20 +-54.5 + 30 +0.0 + 11 +68.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +BF +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +54.75 + 20 +-40.5 + 30 +0.0 + 11 +68.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +C0 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +54.75 + 20 +-54.5 + 30 +0.0 + 11 +54.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +C1 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +73.75 + 20 +-54.5 + 30 +0.0 + 11 +87.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +C2 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +87.75 + 20 +-54.5 + 30 +0.0 + 11 +87.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +C3 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +73.75 + 20 +-40.5 + 30 +0.0 + 11 +87.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +C4 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +73.75 + 20 +-54.5 + 30 +0.0 + 11 +73.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +C5 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +92.75 + 20 +-54.5 + 30 +0.0 + 11 +106.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +C6 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +106.75 + 20 +-54.5 + 30 +0.0 + 11 +106.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +C7 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +92.75 + 20 +-40.5 + 30 +0.0 + 11 +106.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +C8 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +92.75 + 20 +-54.5 + 30 +0.0 + 11 +92.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +C9 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +111.75 + 20 +-54.5 + 30 +0.0 + 11 +125.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +CA +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +125.75 + 20 +-54.5 + 30 +0.0 + 11 +125.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +CB +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +111.75 + 20 +-40.5 + 30 +0.0 + 11 +125.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +CC +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +111.75 + 20 +-54.5 + 30 +0.0 + 11 +111.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +CD +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +130.75 + 20 +-54.5 + 30 +0.0 + 11 +144.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +CE +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +144.75 + 20 +-54.5 + 30 +0.0 + 11 +144.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +CF +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +130.75 + 20 +-40.5 + 30 +0.0 + 11 +144.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +D0 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +130.75 + 20 +-54.5 + 30 +0.0 + 11 +130.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +D1 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +149.75 + 20 +-54.5 + 30 +0.0 + 11 +163.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +D2 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +163.75 + 20 +-54.5 + 30 +0.0 + 11 +163.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +D3 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +149.75 + 20 +-40.5 + 30 +0.0 + 11 +163.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +D4 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +149.75 + 20 +-54.5 + 30 +0.0 + 11 +149.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +D5 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +168.75 + 20 +-54.5 + 30 +0.0 + 11 +182.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +D6 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +182.75 + 20 +-54.5 + 30 +0.0 + 11 +182.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +D7 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +168.75 + 20 +-40.5 + 30 +0.0 + 11 +182.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +D8 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +168.75 + 20 +-54.5 + 30 +0.0 + 11 +168.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +D9 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +187.75 + 20 +-54.5 + 30 +0.0 + 11 +201.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +DA +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +201.75 + 20 +-54.5 + 30 +0.0 + 11 +201.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +DB +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +187.75 + 20 +-40.5 + 30 +0.0 + 11 +201.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +DC +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +187.75 + 20 +-54.5 + 30 +0.0 + 11 +187.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +DD +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +206.75 + 20 +-54.5 + 30 +0.0 + 11 +220.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +DE +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +220.75 + 20 +-54.5 + 30 +0.0 + 11 +220.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +DF +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +206.75 + 20 +-40.5 + 30 +0.0 + 11 +220.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +E0 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +206.75 + 20 +-54.5 + 30 +0.0 + 11 +206.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +E1 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +225.75 + 20 +-54.5 + 30 +0.0 + 11 +239.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +E2 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +239.75 + 20 +-54.5 + 30 +0.0 + 11 +239.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +E3 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +225.75 + 20 +-40.5 + 30 +0.0 + 11 +239.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +E4 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +225.75 + 20 +-54.5 + 30 +0.0 + 11 +225.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +E5 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +249.5 + 20 +-54.5 + 30 +0.0 + 11 +263.5 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +E6 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +263.5 + 20 +-54.5 + 30 +0.0 + 11 +263.5 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +E7 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +249.5 + 20 +-40.5 + 30 +0.0 + 11 +263.5 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +E8 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +249.5 + 20 +-54.5 + 30 +0.0 + 11 +249.5 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +E9 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-54.5 + 30 +0.0 + 11 +296.75 + 21 +-54.5 + 31 +0.0 + 0 +LINE + 5 +EA +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +296.75 + 20 +-54.5 + 30 +0.0 + 11 +296.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +EB +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-40.5 + 30 +0.0 + 11 +296.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +EC +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-54.5 + 30 +0.0 + 11 +282.75 + 21 +-40.5 + 31 +0.0 + 0 +LINE + 5 +ED +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +16.75 + 20 +-73.5 + 30 +0.0 + 11 +30.75 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +EE +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +30.75 + 20 +-73.5 + 30 +0.0 + 11 +30.75 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +EF +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +16.75 + 20 +-59.5 + 30 +0.0 + 11 +30.75 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +F0 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +16.75 + 20 +-73.5 + 30 +0.0 + 11 +16.75 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +F1 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +45.25 + 20 +-73.5 + 30 +0.0 + 11 +59.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +F2 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +59.25 + 20 +-73.5 + 30 +0.0 + 11 +59.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +F3 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +45.25 + 20 +-59.5 + 30 +0.0 + 11 +59.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +F4 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +45.25 + 20 +-73.5 + 30 +0.0 + 11 +45.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +F5 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +64.25 + 20 +-73.5 + 30 +0.0 + 11 +78.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +F6 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +78.25 + 20 +-73.5 + 30 +0.0 + 11 +78.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +F7 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +64.25 + 20 +-59.5 + 30 +0.0 + 11 +78.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +F8 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +64.25 + 20 +-73.5 + 30 +0.0 + 11 +64.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +F9 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +83.25 + 20 +-73.5 + 30 +0.0 + 11 +97.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +FA +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +97.25 + 20 +-73.5 + 30 +0.0 + 11 +97.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +FB +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +83.25 + 20 +-59.5 + 30 +0.0 + 11 +97.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +FC +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +83.25 + 20 +-73.5 + 30 +0.0 + 11 +83.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +FD +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +102.25 + 20 +-73.5 + 30 +0.0 + 11 +116.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +FE +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +116.25 + 20 +-73.5 + 30 +0.0 + 11 +116.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +FF +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +102.25 + 20 +-59.5 + 30 +0.0 + 11 +116.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +100 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +102.25 + 20 +-73.5 + 30 +0.0 + 11 +102.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +101 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +121.25 + 20 +-73.5 + 30 +0.0 + 11 +135.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +102 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +135.25 + 20 +-73.5 + 30 +0.0 + 11 +135.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +103 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +121.25 + 20 +-59.5 + 30 +0.0 + 11 +135.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +104 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +121.25 + 20 +-73.5 + 30 +0.0 + 11 +121.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +105 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +140.25 + 20 +-73.5 + 30 +0.0 + 11 +154.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +106 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +154.25 + 20 +-73.5 + 30 +0.0 + 11 +154.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +107 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +140.25 + 20 +-59.5 + 30 +0.0 + 11 +154.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +108 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +140.25 + 20 +-73.5 + 30 +0.0 + 11 +140.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +109 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +159.25 + 20 +-73.5 + 30 +0.0 + 11 +173.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +10A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +173.25 + 20 +-73.5 + 30 +0.0 + 11 +173.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +10B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +159.25 + 20 +-59.5 + 30 +0.0 + 11 +173.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +10C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +159.25 + 20 +-73.5 + 30 +0.0 + 11 +159.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +10D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +178.25 + 20 +-73.5 + 30 +0.0 + 11 +192.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +10E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +192.25 + 20 +-73.5 + 30 +0.0 + 11 +192.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +10F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +178.25 + 20 +-59.5 + 30 +0.0 + 11 +192.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +110 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +178.25 + 20 +-73.5 + 30 +0.0 + 11 +178.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +111 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +197.25 + 20 +-73.5 + 30 +0.0 + 11 +211.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +112 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.25 + 20 +-73.5 + 30 +0.0 + 11 +211.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +113 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +197.25 + 20 +-59.5 + 30 +0.0 + 11 +211.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +114 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +197.25 + 20 +-73.5 + 30 +0.0 + 11 +197.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +115 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +216.25 + 20 +-73.5 + 30 +0.0 + 11 +230.25 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +116 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +230.25 + 20 +-73.5 + 30 +0.0 + 11 +230.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +117 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +216.25 + 20 +-59.5 + 30 +0.0 + 11 +230.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +118 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +216.25 + 20 +-73.5 + 30 +0.0 + 11 +216.25 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +119 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +240.0 + 20 +-73.5 + 30 +0.0 + 11 +254.0 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +11A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +254.0 + 20 +-73.5 + 30 +0.0 + 11 +254.0 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +11B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +240.0 + 20 +-59.5 + 30 +0.0 + 11 +254.0 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +11C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +240.0 + 20 +-73.5 + 30 +0.0 + 11 +240.0 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +11D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +263.75 + 20 +-73.5 + 30 +0.0 + 11 +277.75 + 21 +-73.5 + 31 +0.0 + 0 +LINE + 5 +11E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +277.75 + 20 +-73.5 + 30 +0.0 + 11 +277.75 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +11F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +263.75 + 20 +-59.5 + 30 +0.0 + 11 +277.75 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +120 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +263.75 + 20 +-73.5 + 30 +0.0 + 11 +263.75 + 21 +-59.5 + 31 +0.0 + 0 +LINE + 5 +121 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +12.0 + 20 +-92.5 + 30 +0.0 + 11 +26.0 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +122 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +26.0 + 20 +-92.5 + 30 +0.0 + 11 +26.0 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +123 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +12.0 + 20 +-78.5 + 30 +0.0 + 11 +26.0 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +124 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +12.0 + 20 +-92.5 + 30 +0.0 + 11 +12.0 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +125 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +35.75 + 20 +-92.5 + 30 +0.0 + 11 +49.75 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +126 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +49.75 + 20 +-92.5 + 30 +0.0 + 11 +49.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +127 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +35.75 + 20 +-78.5 + 30 +0.0 + 11 +49.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +128 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +35.75 + 20 +-92.5 + 30 +0.0 + 11 +35.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +129 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +54.75 + 20 +-92.5 + 30 +0.0 + 11 +68.75 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +12A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +68.75 + 20 +-92.5 + 30 +0.0 + 11 +68.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +12B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +54.75 + 20 +-78.5 + 30 +0.0 + 11 +68.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +12C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +54.75 + 20 +-92.5 + 30 +0.0 + 11 +54.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +12D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +73.75 + 20 +-92.5 + 30 +0.0 + 11 +87.75 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +12E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +87.75 + 20 +-92.5 + 30 +0.0 + 11 +87.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +12F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +73.75 + 20 +-78.5 + 30 +0.0 + 11 +87.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +130 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +73.75 + 20 +-92.5 + 30 +0.0 + 11 +73.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +131 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +102.25 + 20 +-92.5 + 30 +0.0 + 11 +116.25 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +132 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +116.25 + 20 +-92.5 + 30 +0.0 + 11 +116.25 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +133 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +102.25 + 20 +-78.5 + 30 +0.0 + 11 +116.25 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +134 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +102.25 + 20 +-92.5 + 30 +0.0 + 11 +102.25 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +135 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +140.25 + 20 +-92.5 + 30 +0.0 + 11 +154.25 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +136 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +154.25 + 20 +-92.5 + 30 +0.0 + 11 +154.25 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +137 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +140.25 + 20 +-78.5 + 30 +0.0 + 11 +154.25 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +138 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +140.25 + 20 +-92.5 + 30 +0.0 + 11 +140.25 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +139 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +168.75 + 20 +-92.5 + 30 +0.0 + 11 +182.75 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +13A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +182.75 + 20 +-92.5 + 30 +0.0 + 11 +182.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +13B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +168.75 + 20 +-78.5 + 30 +0.0 + 11 +182.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +13C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +168.75 + 20 +-92.5 + 30 +0.0 + 11 +168.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +13D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +187.75 + 20 +-92.5 + 30 +0.0 + 11 +201.75 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +13E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +201.75 + 20 +-92.5 + 30 +0.0 + 11 +201.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +13F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +187.75 + 20 +-78.5 + 30 +0.0 + 11 +201.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +140 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +187.75 + 20 +-92.5 + 30 +0.0 + 11 +187.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +141 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +-92.5 + 30 +0.0 + 11 +225.5 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +142 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +225.5 + 20 +-92.5 + 30 +0.0 + 11 +225.5 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +143 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +-78.5 + 30 +0.0 + 11 +225.5 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +144 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +211.5 + 20 +-92.5 + 30 +0.0 + 11 +211.5 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +145 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +244.75 + 20 +-92.5 + 30 +0.0 + 11 +258.75 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +146 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +258.75 + 20 +-92.5 + 30 +0.0 + 11 +258.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +147 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +244.75 + 20 +-78.5 + 30 +0.0 + 11 +258.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +148 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +244.75 + 20 +-92.5 + 30 +0.0 + 11 +244.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +149 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +263.75 + 20 +-92.5 + 30 +0.0 + 11 +277.75 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +14A +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +277.75 + 20 +-92.5 + 30 +0.0 + 11 +277.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +14B +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +263.75 + 20 +-78.5 + 30 +0.0 + 11 +277.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +14C +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +263.75 + 20 +-92.5 + 30 +0.0 + 11 +263.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +14D +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-92.5 + 30 +0.0 + 11 +296.75 + 21 +-92.5 + 31 +0.0 + 0 +LINE + 5 +14E +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +296.75 + 20 +-92.5 + 30 +0.0 + 11 +296.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +14F +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-78.5 + 30 +0.0 + 11 +296.75 + 21 +-78.5 + 31 +0.0 + 0 +LINE + 5 +150 +100 +AcDbEntity + 8 +0 +100 +AcDbLine + 10 +282.75 + 20 +-92.5 + 30 +0.0 + 11 +282.75 + 21 +-78.5 + 31 +0.0 + 0 +ENDSEC + 0 +SECTION + 2 +OBJECTS + 0 +ENDSEC + 0 +EOF diff --git a/keyboards/system76/launch_alpha_2/layout-files/system76-launch-configurable-keyboard-1-0.json b/keyboards/system76/launch_alpha_2/layout-files/system76-launch-configurable-keyboard-1-0.json new file mode 100644 index 000000000000..01c9dfd1f4b5 --- /dev/null +++ b/keyboards/system76/launch_alpha_2/layout-files/system76-launch-configurable-keyboard-1-0.json @@ -0,0 +1,196 @@ +[ + { + "name": "System76 Launch Configurable Keyboard 1.0", + "author": "Jeremy" + }, + [ + { + "a": 6 + }, + "Esc", + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + { + "w": 1.5 + }, + "Del", + { + "x": 0.25, + "a": 7 + }, + "Home" + ], + [ + { + "a": 4 + }, + "~\n`", + "!\n1", + "@\n2", + "#\n3", + "$\n4", + "%\n5", + "^\n6", + "&\n7", + "*\n8", + "(\n9", + ")\n0", + "_\n-", + "+\n=", + { + "a": 6, + "w": 1.5 + }, + "Bksp", + { + "x": 0.25, + "a": 7 + }, + "PgUp" + ], + [ + { + "a": 6, + "w": 1.5 + }, + "Tab", + { + "a": 4 + }, + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "{\n[", + "}\n]", + "|\n\\", + { + "x": 0.25, + "a": 7 + }, + "PgDn" + ], + [ + { + "x": 0.25, + "a": 6, + "w": 1.5 + }, + "Caps", + { + "a": 4 + }, + "A", + "S", + "D", + { + "n": true + }, + "F", + "G", + "H", + { + "n": true + }, + "J", + "K", + "L", + ":\n;", + "\"\n'", + { + "a": 6, + "w": 1.5 + }, + "Enter", + { + "x": 0.5, + "a": 7 + }, + "End" + ], + [ + { + "x": 0.25, + "a": 6, + "w": 2 + }, + "Shift", + { + "a": 4 + }, + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + "<\n,", + ">\n.", + "?\n/", + { + "a": 6, + "w": 1.5 + }, + "Shift", + { + "a": 7 + }, + "" + ], + [ + { + "x": 0.25, + "a": 6, + "w": 1.5 + }, + "Ctrl", + "Fn", + "Super", + "Alt", + { + "a": 7, + "w": 2 + }, + "", + { + "w": 2 + }, + "", + { + "a": 6 + }, + "Ctrl", + "Alt", + { + "w": 1.5 + }, + "Fn", + { + "x": 0.5, + "a": 7 + }, + "", + { + "n": true + }, + "", + "" + ] +] \ No newline at end of file diff --git a/keyboards/system76/launch_alpha_2/rules.mk b/keyboards/system76/launch_alpha_2/rules.mk new file mode 100644 index 000000000000..c2229278477c --- /dev/null +++ b/keyboards/system76/launch_alpha_2/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +DYNAMIC_KEYMAP_ENABLE = yes # Reconfigurable keyboard without flashing firmware +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RAW_ENABLE = yes # Enable RAW HID commands (used by keyboard configurator) +USB_6KRO_ENABLE = no # 6key Rollover + +# Add System76 EC command interface +SRC+=../system76_ec.c diff --git a/keyboards/system76/launch_test/README.md b/keyboards/system76/launch_test/README.md new file mode 100644 index 000000000000..1bb62384a629 --- /dev/null +++ b/keyboards/system76/launch_test/README.md @@ -0,0 +1,19 @@ +## Flashing firmware: +* Clone this repository and `cd` into the `qmk_firmware` directory. +* After cloning, you probably need to run `make git-submodule`. + - You may also need to install dependencies: `sudo apt install avrdude gcc-avr avr-libc` +* To build the firmware without flashing the keyboard, use `make (keyboard name):(layout name)` + - For example, if I want to build Levi's layout for the Launch keyboard, I will run: + `make system76/launch:levi` +* To flash the firmware, you'll use the same build command, but with `flash` added to the end: + `make system76/launch:default:flash` + - After it builds, you will see a message that says `Detecting USB port, reset your controller now...`. You then want to hit the "RESET" key on the keyboard if it is programmed into the layout. + - In the default layout, it is Fn+Esc. If a RESET key is not programmed into the layout, you will have to manually reset the controller. + +## Making your own layout: +If you want to create your own layout, go to the `keymaps` directory and copy one of the maps in there. You'll probably want to start with the default layout, but the other layouts in there may be helpful references. The name of the directory you create will be the name of your layout. Ensure that it has no spaces or strange symbols, as this could lead to build errors. + +Inside of each layout directory, there is a file called `keymap.c`, which is what you will be customizing to create your own keymap. The commented out grid area in this file is a reference for the actual key assignments below it. When I am modifying a layout, I first update this grid. It helps me keep track of where I want everything. It does not matter what you label the keys in this grid since it is in a comment. Just try to keep it understandable for yourself and everyone else. + +The keycodes below that do have to be typed correctly. A full list of keycodes can be found here: https://beta.docs.qmk.fm/reference/keycodes . Use the shorter keycode alias to help keep these lined up (e.g. use `KC_ESC` instead of `KC_ESCAPE`). + diff --git a/keyboards/system76/launch_test/config.h b/keyboards/system76/launch_test/config.h new file mode 100644 index 000000000000..48f3c1cb92a1 --- /dev/null +++ b/keyboards/system76/launch_test/config.h @@ -0,0 +1,63 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1776 +#define PRODUCT_ID 0x1776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER System76 +#define PRODUCT Launch Test +#define DESCRIPTION Launch Keyboard (TEST) + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 11 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F0, F1 } +#define MATRIX_COL_PINS { C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define RGB_DI_PIN E6 +#define RGBLED_NUM 22 +#define RGBLIGHT_ANIMATIONS + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +// Dynamic keyboard support { +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage +#define EEPROM_SIZE 1024 + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x76EC +#define EEPROM_MAGIC_ADDR 64 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x01 +#define EEPROM_VERSION_ADDR (EEPROM_MAGIC_ADDR + 2) + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR (EEPROM_VERSION_ADDR + 1) +#define DYNAMIC_KEYMAP_EEPROM_SIZE (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) +// Dynamic macro starts after dynamic keymaps +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR + DYNAMIC_KEYMAP_EEPROM_SIZE) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (EEPROM_SIZE - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR) +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// } Dynamic keyboard support + +#endif // CONFIG_H diff --git a/keyboards/system76/launch_test/keymaps/default/keymap.c b/keyboards/system76/launch_test/keymaps/default/keymap.c new file mode 100644 index 000000000000..7fd122cbc3a6 --- /dev/null +++ b/keyboards/system76/launch_test/keymaps/default/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_M_P, RESET, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/launch_test/launch_test.c b/keyboards/system76/launch_test/launch_test.c new file mode 100644 index 000000000000..d9d4dd53d45f --- /dev/null +++ b/keyboards/system76/launch_test/launch_test.c @@ -0,0 +1,133 @@ +#include "dynamic_keymap.h" +#include "raw_hid.h" +#include "tmk_core/common/eeprom.h" +#include "version.h" + +#include "launch_test.h" + +enum Command { + // Probe for System76 EC protocol + CMD_PROBE = 1, + // Read board string + CMD_BOARD = 2, + // Read version string + CMD_VERSION = 3, + // Get keyboard map index + CMD_KEYMAP_GET = 9, + // Set keyboard map index + CMD_KEYMAP_SET = 10, +}; + +static bool keymap_get(uint8_t layer, uint8_t output, uint8_t input, uint16_t *value) { + if (layer < dynamic_keymap_get_layer_count()) { + if (output < MATRIX_ROWS) { + if (input < MATRIX_COLS) { + *value = dynamic_keymap_get_keycode(layer, output, input); + return true; + } + } + } + return false; +} + +static bool keymap_set(uint8_t layer, uint8_t output, uint8_t input, uint16_t value) { + if (layer < dynamic_keymap_get_layer_count()) { + if (output < MATRIX_ROWS) { + if (input < MATRIX_COLS) { + dynamic_keymap_set_keycode(layer, output, input, value); + return true; + } + } + } + return false; +} + +void raw_hid_receive(uint8_t *data, uint8_t length) { + // Error response by default, set to success by commands + data[1] = 1; + + switch (data[0]) { + case CMD_PROBE: + // Signature + data[2] = 0x76; + data[3] = 0xEC; + // Version + data[4] = 0x01; + data[1] = 0; + break; + case CMD_BOARD: + strncpy((char *)&data[2], QMK_KEYBOARD, length - 2); + data[1] = 0; + break; + case CMD_VERSION: + strncpy((char *)&data[2], QMK_VERSION, length - 2); + data[1] = 0; + break; + case CMD_KEYMAP_GET: + { + uint16_t value = 0; + if (keymap_get(data[2], data[3], data[4], &value)) { + data[5] = (uint8_t)value; + data[6] = (uint8_t)(value >> 8); + data[1] = 0; + } + } + break; + case CMD_KEYMAP_SET: + { + uint16_t value = + ((uint16_t)data[5]) | + (((uint16_t)data[6]) << 8); + if (keymap_set(data[2], data[3], data[4], value)) { + data[1] = 0; + } + } + } + + raw_hid_send(data, length); +} + +bool eeprom_is_valid(void) { + return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && + eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); +} + +void eeprom_set_valid(bool valid) { + eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); + eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); +} + +void eeprom_reset(void) { + // Set the keyboard specific EEPROM state as invalid. + eeprom_set_valid(false); + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); +} + +void bootmagic_lite(void) { + // The lite version of TMK's bootmagic. + // 100% less potential for accidentally making the + // keyboard do stupid things. + + // We need multiple scans because debouncing can't be turned off. + matrix_scan(); + wait_ms(DEBOUNCE); + wait_ms(DEBOUNCE); + matrix_scan(); + + // If the Esc (matrix 0,0) is held down on power up, + // reset the EEPROM valid state and jump to bootloader. + if ( matrix_get_row(0) & (1<<0) ) { + eeprom_reset(); + bootloader_jump(); + } +} + +void matrix_init_kb(void) { + bootmagic_lite(); + if (!eeprom_is_valid()) { + dynamic_keymap_reset(); + dynamic_keymap_macro_reset(); + eeprom_set_valid(true); + } +} diff --git a/keyboards/system76/launch_test/launch_test.h b/keyboards/system76/launch_test/launch_test.h new file mode 100644 index 000000000000..bf57051630ea --- /dev/null +++ b/keyboards/system76/launch_test/launch_test.h @@ -0,0 +1,16 @@ +#ifndef LAUNCH_TEST_H +#define LAUNCH_TEST_H + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A } \ +} + +#endif // LAUNCH_TEST_H diff --git a/keyboards/system76/launch_test/rules.mk b/keyboards/system76/launch_test/rules.mk new file mode 100644 index 000000000000..b80acb3790e6 --- /dev/null +++ b/keyboards/system76/launch_test/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +DYNAMIC_KEYMAP_ENABLE = yes # Reconfigurable keyboard without flashing firmware +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RAW_ENABLE = yes # Enable RAW HID commands (used by keyboard configurator) +RGBLIGHT_ENABLE = yes # Support for RGB backlight diff --git a/keyboards/system76/ortho_split_2u/config.h b/keyboards/system76/ortho_split_2u/config.h new file mode 100644 index 000000000000..3271744e1a2f --- /dev/null +++ b/keyboards/system76/ortho_split_2u/config.h @@ -0,0 +1,41 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1776 +#define PRODUCT_ID 0x1776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER System76 +#define PRODUCT ortho_split_2u +#define DESCRIPTION 2U Split Ortho + +/* key matrix size */ +#define MATRIX_ROWS 12 // 6, but each side is separate +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } +#define MATRIX_COL_PINS { D1, B5, D4, C6, D7, E6, B4 } +#define MATRIX_ROW_PINS_RIGHT { F4, F5, F6, F7, B1, B3 } +#define MATRIX_COL_PINS_RIGHT { D3, D2, D1, B5, D4, C6, D7, E6, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Settings for split keyboard */ +#define MASTER_RIGHT // Right half is the master, don't plug USB into left half +#define SOFT_SERIAL_PIN D0 // The halves communicate via serial on pin D0 + +#endif // CONFIG_H diff --git a/keyboards/system76/ortho_split_2u/keymaps/default/keymap.c b/keyboards/system76/ortho_split_2u/keymaps/default/keymap.c new file mode 100644 index 000000000000..261c80b7b9f9 --- /dev/null +++ b/keyboards/system76/ortho_split_2u/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 ││ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtSc│ Del │ Ins │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ ` ~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 ││ 7 │ 8 │ 9 │ 0 │ - _ │ = + │ Backspace │ Home│ + * ├─────┴─────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┬─────┼─────┤ + * │ Tab │ Q │ W │ E │ R │ T ││ Y │ U │ I │ O │ P │ [ { │ ] } │ \ | │ PgUp│ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ Caps Lock │ A │ S │ D │ F │ G ││ H │ J │ K │ L │ ; : │ ' " │ Enter │ PgDn│ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┴─────┬─────┼─────┤ + * │ Shift │ Z │ X │ C │ V │ B ││ N │ M │ , < │ . > │ / ? │ Shift │ Up │ End │ + * ├───────────┼─────┼─────┼─────┼─────┴─────┤├─────┴─────┼─────┼─────┼─────┴─────┬─────┼─────┼─────┤ + * │ Ctrl │ Fn │ Alt │Super│ Space ││ Space │ Alt │ Fn │ Ctrl │ Left│ Down│Right│ + * └───────────┴─────┴─────┴─────┴───────────┘└───────────┴─────┴─────┴───────────┴─────┴─────┴─────┘ + */ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_INS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1, function layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │ ││ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ │ │ │ │ │ │ ││ │ │ │ │ │ │ │ │ + * ├─────┴─────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┬─────┼─────┤ + * │ │ │ │ │ │ ││ │ │ │ │ │ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ │ │ │ │ │ ││ │ │ │ │ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┴─────┬─────┼─────┤ + * │ │ │ │ │ │ ││ │ │ │ │ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┴─────┤├─────┴─────┼─────┼─────┼─────┴─────┬─────┼─────┼─────┤ + * │ │ │ │ │ ││ │ │ │ │ │ │ │ + * └───────────┴─────┴─────┴─────┴───────────┘└───────────┴─────┴─────┴───────────┴─────┴─────┴─────┘ + */ + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/ortho_split_2u/keymaps/levi/keymap.c b/keyboards/system76/ortho_split_2u/keymaps/levi/keymap.c new file mode 100644 index 000000000000..39c7368fc1e6 --- /dev/null +++ b/keyboards/system76/ortho_split_2u/keymaps/levi/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 ││ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtSc│ Del │ Ins │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ ` ~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 ││ 7 │ 8 │ 9 │ 0 │ - _ │ = + │ Backspace │ Home│ + * ├─────┴─────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┬─────┼─────┤ + * │ Tab │ Q │ W │ E │ R │ T ││ Y │ U │ I │ O │ P │ [ { │ ] } │ \ | │ PgUp│ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ Caps Lock │ A │ S │ D │ F │ G ││ H │ J │ K │ L │ ; : │ ' " │ Enter │ PgDn│ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┴─────┬─────┼─────┤ + * │ Shift │ Z │ X │ C │ V │ B ││ N │ M │ , < │ . > │ / ? │ Shift │ Up │ End │ + * ├───────────┼─────┼─────┼─────┼─────┴─────┤├─────┴─────┼─────┼─────┼─────┴─────┬─────┼─────┼─────┤ + * │ Ctrl │ Fn │ Alt │Super│ Space ││ Fn │BkSpc│ Alt │ Ctrl │ Left│ Down│Right│ + * └───────────┴─────┴─────┴─────┴───────────┘└───────────┴─────┴─────┴───────────┴─────┴─────┴─────┘ + */ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_INS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, MO(1), KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1, function layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ QKB │ │ │ │ │ │ ││ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ │ │ │ │ │ │ ││ │ │ │ │ │ │ │ │ + * ├─────┴─────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┬─────┼─────┤ + * │ │Home │ Up │End │PgUp │Mute ││PgUp │Home │ Up │End │ │ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ │Left │Down │Right│PgDn │VolU ││PgDn │Left │Down │Right│ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤├─────┼─────┼─────┼─────┼─────┼─────┴─────┬─────┼─────┤ + * │ │ │ │ │ │VolD ││MPly │MPrv │MNxt │ │ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┴─────┤├─────┴─────┼─────┼─────┼─────┴─────┬─────┼─────┼─────┤ + * │ │ │ │ │ Backspace ││ │ │ │ │ │ │ │ + * └───────────┴─────┴─────┴─────┴───────────┘└───────────┴─────┴─────┴───────────┴─────┴─────┴─────┘ + */ + + [1] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_MUTE, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLU, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/ortho_split_2u/ortho_split_2u.c b/keyboards/system76/ortho_split_2u/ortho_split_2u.c new file mode 100644 index 000000000000..56fb53b5f8a2 --- /dev/null +++ b/keyboards/system76/ortho_split_2u/ortho_split_2u.c @@ -0,0 +1,9 @@ +#include "ortho_split_2u.h" + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/system76/ortho_split_2u/ortho_split_2u.h b/keyboards/system76/ortho_split_2u/ortho_split_2u.h new file mode 100644 index 000000000000..2de6f34c0869 --- /dev/null +++ b/keyboards/system76/ortho_split_2u/ortho_split_2u.h @@ -0,0 +1,31 @@ +#ifndef ORTHO_SPLIT_2U_H +#define ORTHO_SPLIT_2U_H + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, \ + LC2, LC3, LC4, LC5, LC6, LC7, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \ + LD2, LD3, LD4, LD5, LD6, LD7, RD1, RD2, RD3, RD4, RD5, RD6, RD7, RD9, \ + LE2, LE3, LE4, LE5, LE6, LE7, RE1, RE2, RE3, RE4, RE5, RE6, RE8, RE9, \ + LF2, LF3, LF4, LF5, LF7, RF1, RF3, RF4, RF5, RF7, RF8, RF9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7 }, \ + { ___, LC2, LC3, LC4, LC5, LC6, LC7 }, \ + { ___, LD2, LD3, LD4, LD5, LD6, LD7 }, \ + { ___, LE2, LE3, LE4, LE5, LE6, LE7 }, \ + { ___, LF2, LF3, LF4, LF5, ___, LF7 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, ___, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, RD6, RD7, ___, RD9 }, \ + { RE1, RE2, RE3, RE4, RE5, RE6, ___, RE8, RE9 }, \ + { RF1, ___, RF3, RF4, RF5, ___, RF7, RF8, RF9 } \ + } + +#endif // ORTHO_SPLIT_2U_H diff --git a/keyboards/system76/ortho_split_2u/rules.mk b/keyboards/system76/ortho_split_2u/rules.mk new file mode 100644 index 000000000000..e59dfc3de73d --- /dev/null +++ b/keyboards/system76/ortho_split_2u/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +SPLIT_KEYBOARD = yes # Enables split keyboard + diff --git a/keyboards/system76/virgo/config.h b/keyboards/system76/virgo/config.h new file mode 100644 index 000000000000..2cd924f1f80c --- /dev/null +++ b/keyboards/system76/virgo/config.h @@ -0,0 +1,35 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER System76 +#define PRODUCT Virgo +#define DESCRIPTION Virgo Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0 } +#define MATRIX_COL_PINS { B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#endif // CONFIG_H diff --git a/keyboards/system76/virgo/keymaps/default/keymap.c b/keyboards/system76/virgo/keymaps/default/keymap.c new file mode 100644 index 000000000000..15c7d66756dd --- /dev/null +++ b/keyboards/system76/virgo/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | POWER | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | BACK | PLAY / | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | SPACE | PAUSE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | [ | ] | | + | TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | + |________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |________|________|________|________|________|________|________|________|________|________|________|________|________|____ + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | | + | CTRL | FN | LALT | LGUI | SPACE | SPACE | FN | RALT | RCTRL | | LEFT | DOWN | RIGHT | + |________|________|_______|________|_________________|_________________|________|________|________| |________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PWR, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MPLY, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | + |________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | | + |________|________|________|________|________|________|________|________|________|________|________|________|________|____ + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PGUP | + ____|________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | | + | | | | | | | | | | | HOME | PGDN | END | + |________|________|_______|________|_________________|_________________|________|________|________| |________|________|________| + +*/ + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/virgo/keymaps/jeremy/keymap.c b/keyboards/system76/virgo/keymaps/jeremy/keymap.c new file mode 100644 index 000000000000..5a67ba4b18b2 --- /dev/null +++ b/keyboards/system76/virgo/keymaps/jeremy/keymap.c @@ -0,0 +1,71 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | POWER | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | BACK | PLAY / | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | SPACE | PAUSE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | [ | ] | | + | TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | + |________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | ; | ' | | + | FN | A | S | D | F | G | H | J | K | L | : | " | ENTER | + |________|________|________|________|________|________|________|________|________|________|________|________|________|____ + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | BACK | | | | | | | | + | CTRL | FN | LALT | LGUI | SPACE | SPACE | ESC | RALT | RCTRL | | LEFT | DOWN | RIGHT | + |________|________|_______|________|_________________|_________________|________|________|________| |________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PWR, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MPLY, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_ESC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1, function layer +________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | | | | | + | | | | | | | | PGUP | HOME | PGDN | | | | | + |________|________|________|________|________|________|________|________|________|________|________|________|________|________| + | | | | | | | | | | | BACK | | | + | | | | | | | LEFT | DOWN | UP | RIGHT | SPACE | DEL | | + |________|________|________|________|________|________|________|________|________|________|________|________|________|____ + | | | | | | | | | | | | | | + | | | | | | | END | | | | | | PGUP | + ____|________|________|________|________|________|________|________|________|________|________|________|________|________|_________ + | | | | | | | | | | | | | | + | | | | | | | | | | | HOME | PGDN | END | + |________|________|_______|________|_________________|_________________|________|________|________| |________|________|________| + +*/ + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/virgo/rules.mk b/keyboards/system76/virgo/rules.mk new file mode 100644 index 000000000000..02a94584a364 --- /dev/null +++ b/keyboards/system76/virgo/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/system76/virgo/virgo.c b/keyboards/system76/virgo/virgo.c new file mode 100644 index 000000000000..1bb7b19599c6 --- /dev/null +++ b/keyboards/system76/virgo/virgo.c @@ -0,0 +1,9 @@ +#include "virgo.h" + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/system76/virgo/virgo.h b/keyboards/system76/virgo/virgo.h new file mode 100644 index 000000000000..d793e01119eb --- /dev/null +++ b/keyboards/system76/virgo/virgo.h @@ -0,0 +1,24 @@ +#ifndef VIRGO_H +#define VIRGO_H + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, \ + K50, K51, K52, K53, K54, K56, K57, K58, K59, K5B, K5C, K5D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___ }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, ___ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, ___, ___ }, \ + { K50, K51, K52, K53, K54, ___, K56, K57, K58, K59, ___, K5B, K5C, K5D, ___ }, \ +} + +#endif // VIRGO_H