diff options
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/README.md | 16 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/dz60-v6-1-0.json | 1160 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/keymap-parts/defs.c | 29 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/keymap-parts/functions.c | 34 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/keymap-parts/layers.c | 115 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/keymap.c | 12 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c | 37 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/rules.mk | 3 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/_bonfire/scratchpad.txt | 7 |
9 files changed, 1413 insertions, 0 deletions
diff --git a/keyboards/dz60/keymaps/_bonfire/README.md b/keyboards/dz60/keymaps/_bonfire/README.md new file mode 100644 index 000000000..9fe4c5a2d --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/README.md @@ -0,0 +1,16 @@ +# Docs + +1. https://docs.qmk.fm/#/ +2. To build, run: `make dz60:_bonfire` + +## Map of Layers + +http://www.keyboard-layout-editor.com/#/gists/b19ee1c251c908d9b5ef76965d588937 + +![Visual Keymap](https://i.imgur.com/DuiUo0W.jpg) + +### Todo +- lighting effects based on layer in use + - https://github.com/DanDobrick/qmk_firmware/blob/danDobrick-v60r-layout/keyboards/v60_type_r/keymaps/danDobrick/keymap.c#L140 + +- rewrite the mod-tap functions to use the non-deprecated way of instancing them diff --git a/keyboards/dz60/keymaps/_bonfire/dz60-v6-1-0.json b/keyboards/dz60/keymaps/_bonfire/dz60-v6-1-0.json new file mode 100644 index 000000000..42625f7e2 --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/dz60-v6-1-0.json @@ -0,0 +1,1160 @@ +[ + { + "name": "DZ60 v6.1.0", + "author": "Bonf1re" + }, + [ + { + "c": "#454545", + "a": 7, + "f": 2, + "w": 1.75 + }, + "NOTHING", + { + "c": "#fc8e28", + "w": 1.25 + }, + "HELD", + { + "c": "#7afff6", + "w2": 2 + }, + "Function Layer", + { + "x": 1, + "c": "#c47aff", + "w2": 2 + }, + "Keyboard Layer" + ], + [ + { + "y": 0.75, + "c": "#cccccc", + "f": 3, + "w": 3 + }, + "[BASE]" + ], + [ + { + "a": 5 + }, + "~\n`", + "!\n1", + "@\n2", + "#\n3", + "$\n4", + "%\n5", + "^\n6", + "&\n7", + "*\n8", + "(\n9", + ")\n0", + "_\n-", + "+\n=", + { + "a": 7, + "w": 2 + }, + "Backspace" + ], + [ + { + "w": 1.5 + }, + "Tab", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + { + "a": 5 + }, + "{\n[", + "}\n]", + { + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "a": 7, + "w": 1.75 + }, + "Escape", + "A", + "S", + "D", + { + "n": true + }, + "F", + "G", + "H", + { + "n": true + }, + "J", + "K", + "L", + { + "a": 5 + }, + ":\n;", + "\"\n'", + { + "a": 7, + "w": 2.25 + }, + "Enter" + ], + [ + { + "w": 2.25 + }, + "Shift", + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + { + "a": 5 + }, + "<\n,", + ">\n.", + "?\n/", + { + "w": 1.75 + }, + "Up\nShift", + { + "c": "#7afff6", + "a": 7, + "fa": [ + 2 + ] + }, + "HACK" + ], + [ + { + "c": "#cccccc", + "f": 3, + "w": 1.25 + }, + "Ctrl", + { + "f": 3, + "w": 1.25 + }, + "Sys", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "w": 6.25 + }, + "", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "a": 5, + "f": 3, + "w": 1.25 + }, + "Left\nSys", + { + "f": 3, + "w": 1.25 + }, + "Down\nCtrl", + { + "f": 3, + "w": 1.25 + }, + "Right\nHYPER" + ], + [ + { + "y": 0.25, + "a": 7, + "f": 3, + "w": 3 + }, + "[NRMN]" + ], + [ + { + "c": "#aaaaaa", + "g": true, + "a": 5, + "f": 3 + }, + "~\n`", + { + "f": 3 + }, + "!\n1", + { + "f": 3 + }, + "@\n2", + { + "f": 3 + }, + "#\n3", + { + "f": 3 + }, + "$\n4", + { + "f": 3 + }, + "%\n5", + { + "f": 3 + }, + "^\n6", + { + "f": 3 + }, + "&\n7", + { + "f": 3 + }, + "*\n8", + { + "f": 3 + }, + "(\n9", + { + "f": 3 + }, + ")\n0", + { + "f": 3 + }, + "_\n-", + { + "f": 3 + }, + "+\n=", + { + "a": 7, + "f": 3, + "w": 2 + }, + "Backspace" + ], + [ + { + "f": 3, + "w": 1.5 + }, + "Tab", + { + "c": "#cccccc", + "g": false, + "f": 3 + }, + "Q", + { + "f": 3 + }, + "W", + { + "f": 3 + }, + "D", + { + "f": 3 + }, + "F", + { + "f": 3 + }, + "K", + { + "f": 3 + }, + "J", + { + "f": 3 + }, + "U", + { + "f": 3 + }, + "R", + { + "f": 3 + }, + "L", + { + "a": 5, + "f": 3 + }, + ":\n;", + { + "c": "#aaaaaa", + "g": true, + "f": 3 + }, + "{\n[", + { + "f": 3 + }, + "}\n]", + { + "f": 3, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "a": 7, + "f": 3, + "w": 1.75 + }, + "Escape", + { + "c": "#cccccc", + "g": false, + "f": 3 + }, + "A", + { + "f": 3 + }, + "S", + { + "f": 3 + }, + "E", + { + "f": 3, + "n": true + }, + "T", + { + "f": 3 + }, + "G", + { + "f": 3 + }, + "Y", + { + "f": 3, + "n": true + }, + "N", + { + "f": 3 + }, + "I", + { + "f": 3 + }, + "O", + { + "f": 3 + }, + "H", + { + "c": "#aaaaaa", + "g": true, + "a": 5 + }, + "\n'\n\n\n\n\n\"", + { + "a": 7, + "f": 3, + "w": 2.25 + }, + "Enter" + ], + [ + { + "f": 3, + "w": 2.25 + }, + "Shift", + { + "c": "#cccccc", + "g": false, + "f": 3 + }, + "Z", + { + "f": 3 + }, + "X", + { + "f": 3 + }, + "C", + { + "f": 3 + }, + "V", + { + "f": 3 + }, + "B", + { + "f": 3 + }, + "P", + { + "f": 3 + }, + "M", + { + "c": "#aaaaaa", + "g": true, + "a": 5, + "f": 3 + }, + "<\n,", + { + "f": 3 + }, + ">\n.", + { + "f": 3 + }, + "?\n/", + { + "f": 3, + "w": 1.75 + }, + "Up\nShift", + { + "a": 7, + "f": 3 + }, + "HACK" + ], + [ + { + "f": 3, + "w": 1.25 + }, + "Ctrl", + { + "f": 3, + "w": 1.25 + }, + "Sys", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "w": 6.25 + }, + "", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "a": 5, + "f": 3, + "w": 1.25 + }, + "Left\nSys", + { + "f": 3, + "w": 1.25 + }, + "Down\nCtrl", + { + "f": 3, + "w": 1.25 + }, + "Right\nHYPER" + ], + [ + { + "y": 0.25, + "c": "#cccccc", + "g": false, + "a": 7, + "f": 3, + "w": 3 + }, + "[GAME]" + ], + [ + { + "c": "#aaaaaa", + "g": true + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 2 + }, + "" + ], + [ + { + "w": 1.5 + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 1.5 + }, + "" + ], + [ + { + "c": "#cccccc", + "g": false, + "f": 3, + "w": 1.75 + }, + "Held Esc", + { + "c": "#aaaaaa", + "g": true + }, + "", + "", + "", + { + "n": true + }, + "", + "", + "", + { + "n": true + }, + "", + "", + "", + "", + "", + { + "w": 2.25 + }, + "" + ], + [ + { + "w": 2.25 + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 1.75 + }, + "", + "" + ], + [ + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 6.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "" + ], + [ + { + "y": 0.25, + "c": "#cccccc", + "g": false, + "a": 5, + "fa": [ + 2, + 1 + ], + "w": 3 + }, + "\nHACK is held\n\n\n\n\n[FCTN]" + ], + [ + { + "c": "#7afff6", + "a": 7, + "f": 3 + }, + "ESC", + { + "f": 3 + }, + "F1", + { + "f": 3 + }, + "F2", + { + "f": 3 + }, + "F3", + { + "f": 3 + }, + "F4", + { + "f": 3 + }, + "F5", + { + "f": 3 + }, + "F6", + { + "f": 3 + }, + "F7", + { + "f": 3 + }, + "F8", + { + "f": 3 + }, + "F9", + { + "f": 3 + }, + "F10", + { + "f": 3 + }, + "F11", + { + "f": 3 + }, + "F12", + { + "c": "#aaaaaa", + "g": true, + "f": 3, + "w": 2 + }, + "Backspace" + ], + [ + { + "f": 3, + "w": 1.5 + }, + "Tab", + { + "c": "#7afff6", + "g": false, + "f": 3 + }, + "Mute", + { + "a": 5, + "f": 3 + }, + "\nDown\n\n\n\n\nVolume", + { + "f": 3 + }, + "\nUp\n\n\n\n\nVolume", + { + "c": "#aaaaaa", + "g": true, + "a": 7, + "f": 3 + }, + "R", + { + "f": 3 + }, + "T", + { + "f": 3 + }, + "Y", + { + "f": 3 + }, + "U", + { + "f": 3 + }, + "I", + { + "f": 3 + }, + "O", + { + "c": "#7afff6", + "g": false, + "a": 5, + "f": 3 + }, + "\nScreen\n\n\n\n\nPrint", + { + "f": 3 + }, + "\nLock\n\n\n\n\nScroll", + { + "a": 7, + "f": 3 + }, + "Pause", + { + "c": "#aaaaaa", + "g": true, + "a": 5, + "f": 3, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "c": "#7afff6", + "g": false, + "a": 7, + "f": 3, + "w": 1.75 + }, + "Caps Lock", + { + "a": 5, + "f": 3 + }, + "\nPrev\n\n\n\n\nMedia", + { + "f": 3 + }, + "\nPlay\n\n\n\n\nMedia", + { + "f": 3 + }, + "\nNext\n\n\n\n\nMedia", + { + "c": "#aaaaaa", + "g": true, + "a": 7, + "f": 3, + "n": true + }, + "F", + { + "f": 3 + }, + "G", + { + "f": 3 + }, + "H", + { + "f": 3, + "n": true + }, + "J", + { + "f": 3 + }, + "K", + { + "c": "#7afff6", + "g": false, + "f": 3 + }, + "Insert", + { + "f": 3 + }, + "Home", + { + "a": 5, + "f": 3 + }, + "\nUp\n\n\n\n\nPage", + { + "c": "#aaaaaa", + "g": true, + "a": 7, + "f": 3, + "w": 2.25 + }, + "Enter" + ], + [ + { + "f": 3, + "w": 2.25 + }, + "Shift", + { + "c": "#7afff6", + "g": false, + "f": 3 + }, + "Sleep", + { + "f": 3 + }, + "Wake", + { + "c": "#aaaaaa", + "g": true, + "f": 3 + }, + "C", + { + "f": 3 + }, + "V", + { + "f": 3 + }, + "B", + { + "f": 3 + }, + "N", + { + "f": 3 + }, + "M", + { + "c": "#7afff6", + "g": false, + "f": 3 + }, + "Delete", + { + "f": 3 + }, + "End", + { + "a": 5, + "f": 3 + }, + "\nDown\n\n\n\n\nPage", + { + "c": "#aaaaaa", + "g": true, + "f": 3, + "w": 1.75 + }, + "Up\nShift", + { + "c": "#fc8e28", + "g": false, + "a": 7, + "f": 3 + }, + "HACK" + ], + [ + { + "c": "#aaaaaa", + "g": true, + "f": 3, + "w": 1.25 + }, + "Ctrl", + { + "f": 3, + "w": 1.25 + }, + "Sys", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "w": 6.25 + }, + "", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "c": "#c47aff", + "g": false, + "a": 5, + "f": 3, + "w": 1.25 + }, + "\n[KEYB]\n\n\n\n\nTo", + { + "c": "#aaaaaa", + "g": true, + "f": 3, + "w": 1.25 + }, + "Down\nCtrl", + { + "f": 3, + "w": 1.25 + }, + "Right\nHYPER" + ], + [ + { + "y": 0.25, + "c": "#cccccc", + "g": false, + "f": 3, + "w": 3 + }, + "\nHACK + SYS Held\n\n\n\n\n[KEYB]" + ], + [ + { + "c": "#c47aff", + "f": 2 + }, + "\n[BASE]\n\n\n\n\nReset", + { + "a": 7 + }, + "[NRMN]", + "[GAME]", + { + "c": "#454545", + "f": 3 + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "c": "#c47aff", + "f": 2, + "w": 2 + }, + "QMK FLASH" + ], + [ + { + "c": "#454545", + "f": 3, + "w": 1.5 + }, + "", + { + "c": "#c47aff", + "a": 5, + "f": 2 + }, + "\nToggle\n\n\n\n\nRGB", + "\nMode\n\n\n\n\nRGB", + "RGB\nUp\n\n\n\n\nHue", + "RGB\nDown\n\n\n\n\nHue", + "RGB\nDown\n\n\n\n\nSat", + "RGB\nUp\n\n\n\n\nSat", + "RGB\nDown\n\n\n\n\nValue", + "RGB\nUp\n\n\n\n\nValue", + { + "c": "#454545", + "a": 7, + "f": 3 + }, + "", + "", + "", + "", + { + "w": 1.5 + }, + "" + ], + [ + { + "w": 1.75 + }, + "", + { + "c": "#c47aff", + "a": 5, + "f": 2 + }, + "\nDown\n\n\n\n\nBacklight", + "\nToggle\n\n\n\n\nBacklight", + "\nUp\n\n\n\n\nBacklight", + { + "n": true + }, + "\nStep\n\n\n\n\nBacklight", + { + "c": "#454545", + "a": 7, + "f": 3 + }, + "", + "", + { + "n": true + }, + "", + "", + "", + "", + "", + { + "w": 2.25 + }, + "" + ], + [ + { + "w": 2.25 + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 1.75 + }, + "", + { + "c": "#fc8e28", + "fa": [ + 2 + ] + }, + "HACK" + ], + [ + { + "c": "#454545", + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 6.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "c": "#fc8e28", + "a": 5, + "w": 1.25 + }, + "\n[KEYB]\n\n\n\n\nTo", + { + "c": "#454545", + "a": 7, + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "" + ] +] diff --git a/keyboards/dz60/keymaps/_bonfire/keymap-parts/defs.c b/keyboards/dz60/keymaps/_bonfire/keymap-parts/defs.c new file mode 100644 index 000000000..95351b43b --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/keymap-parts/defs.c @@ -0,0 +1,29 @@ +/** + * Variables + * + */ +int held_esc_threshold = 230; +bool is_esc_held = false; +uint16_t held_esc_timer = 0; + +/** + * Define Layers + */ +enum layers { + BASE = 0, + NRMN, + GAME, + FCTN, + KEYB +}; + +/** + * Define Custom Keycodes + */ +enum custom_keycodes { + HLD_ESC = SAFE_RANGE, + MOD_UP = MT(MOD_RSFT, KC_UP), + MOD_RT = MT(MOD_HYPR, KC_RIGHT), + MOD_DN = MT(MOD_RCTL, KC_DOWN), + MOD_LT = MT(MOD_RGUI, KC_LEFT) +}; diff --git a/keyboards/dz60/keymaps/_bonfire/keymap-parts/functions.c b/keyboards/dz60/keymaps/_bonfire/keymap-parts/functions.c new file mode 100644 index 000000000..fd4d16822 --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/keymap-parts/functions.c @@ -0,0 +1,34 @@ +/** + * Custom Keycodes + * https://beta.docs.qmk.fm/detailed-guides/custom_quantum_functions#custom-keycodes + * + */ + +// Called on every keyup and keydown +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case HLD_ESC: + if(record->event.pressed) { + is_esc_held = true; + held_esc_timer = timer_read(); + } else { + is_esc_held = false; + unregister_code(KC_ESC); + } + return true; + break; + + default: + return true; + break; + } +} + +// checking the held escape timer +void matrix_scan_user(void) +{ + if(is_esc_held && timer_elapsed(held_esc_timer) > held_esc_threshold) { + register_code(KC_ESC); + } +} diff --git a/keyboards/dz60/keymaps/_bonfire/keymap-parts/layers.c b/keyboards/dz60/keymaps/_bonfire/keymap-parts/layers.c new file mode 100644 index 000000000..9a44730b1 --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/keymap-parts/layers.c @@ -0,0 +1,115 @@ +#pragma once +#include "quantum.h" + +/* + * LAYOUT_bonfire Row Keys + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │ 0e │ 14 + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ 14 + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ 13 + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ 13 + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │40 │41 │43 │ 46 │4a │4b │4d │4e │ 8 + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + * +*/ +#define LAYOUT_bonfire( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k46, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \ +} + +/** + * XXXXXXX = Key does nothing. + * _______ = Key that allows the uppermost exposed key in a layer below it. + * + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /** + * Layer 0 + * + * QWERTY and basic modifiers. + * Upper layers are toggled or accessed through the "HACK" key: last key on fourth row. + */ + [BASE] = LAYOUT_bonfire( + 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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOD_UP, MO(FCTN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MOD_LT, MOD_DN, MOD_RT + ), + + /** + * Layer 1 + * + * NORMAN Key layout. + * All that's changed is the position of A-Z and a few punctuation keys. + */ + [NRMN] = LAYOUT_bonfire( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______, + _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /** + * Layer 2 + * + * Moves the escape key from the left to the right side of the keyboard for gaming. + */ + [GAME] = LAYOUT_bonfire( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + HLD_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /** + * Layer 3 + * + * Function layer. + * This layer is accessed when "HACK" is held down. + * Modifiers and such to basic keys, but with basic key functions. + */ + [FCTN] = LAYOUT_bonfire( + 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_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, + _______, KC_SLEP, KC_WAKE, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, + _______, _______, _______, _______, _______, MO(KEYB), _______, _______ + ), + + /** + * Layer 4 + * + * This is the KEYB/System layer. + * Other keymaps call this a NAV layer, but it's more than just NAV-ing the board's layers. + * This Layer currently handles RGB and puts the board into RESET for flashing. + * + * ~ key resets board to [BASE]. + * 1 key toggles [NRMN]. + * 2 key toggles [GAME]. + * BACKSPACE puts board into reset. + */ + [KEYB] = LAYOUT_bonfire( + TO(BASE), TG(NRMN), TO(GAME), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, 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 + ) +}; diff --git a/keyboards/dz60/keymaps/_bonfire/keymap.c b/keyboards/dz60/keymaps/_bonfire/keymap.c new file mode 100644 index 000000000..a6b55105c --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +/** + * Bonfire Layout + * v6.1.0 + * + * @author Ethan Beyer + * + */ +#include "keymap-parts/defs.c" +#include "keymap-parts/layers.c" +#include "keymap-parts/functions.c" diff --git a/keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c b/keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c new file mode 100644 index 000000000..1d951b1bc --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c @@ -0,0 +1,37 @@ +/** + * Cool Function where a single key does ALT+TAB + * From: https://beta.docs.qmk.fm/features/feature_macros#super-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 custom_keycodes { // Make sure have the awesome keycode ready + ALT_TAB = SAFE_RANGE, +}; + +// key processing +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { // This will do most of the grunt work with the keycodes. + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +// The very important timer. +void matrix_scan_user(void) { + if (is_alt_tab_active && timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } +}
\ No newline at end of file diff --git a/keyboards/dz60/keymaps/_bonfire/rules.mk b/keyboards/dz60/keymaps/_bonfire/rules.mk new file mode 100644 index 000000000..84550c22b --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = no + +# CONSOLE_ENABLE = yes diff --git a/keyboards/dz60/keymaps/_bonfire/scratchpad.txt b/keyboards/dz60/keymaps/_bonfire/scratchpad.txt new file mode 100644 index 000000000..48ed72c55 --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/scratchpad.txt @@ -0,0 +1,7 @@ +[NAME] = LAYOUT_bonfire( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) |