aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/dz60/keymaps/boris_burger/README.md52
-rw-r--r--keyboards/dz60/keymaps/boris_burger/config.h1
-rw-r--r--keyboards/dz60/keymaps/boris_burger/keymap.c87
3 files changed, 140 insertions, 0 deletions
diff --git a/keyboards/dz60/keymaps/boris_burger/README.md b/keyboards/dz60/keymaps/boris_burger/README.md
new file mode 100644
index 000000000..64062f823
--- /dev/null
+++ b/keyboards/dz60/keymaps/boris_burger/README.md
@@ -0,0 +1,52 @@
1### boris_burger's DZ60 layout
2
3This layout is for a DZ60 with a 2U left shift, 1U right shift and an arrow cluster in
4the bottom right.
5
6It is based off stephengrier's layout adding support for Home/End/PgUp/PgDn using Fn+arrows
7as used on macOS and Microsoft Surface. It has Insert instead of Fn near the arrow cluster
8and other smaller tweaks:
9- CapsLock is the only Fn key (CapsLock by itself is not available)
10- Del is available as Fn+Backspace
11- Ctrl+Del is available as Ctrl+Backspace (e.g. deleting word to the right of the cursor)
12- Shift+Del is available as Shift+Backspace (e.g. permanently deleting file or e-mail)
13- PgUp = Fn+Up
14- PgDn = Fn+Down
15- Home = Fn+Left
16- End = Fn+Right
17- Tilde = Shift+Esc
18- Backtick = Fn+Esc
19- Underglow toggle and mode selection are available as Fn+Q and Fn+W
20- Reset (bootloader mode) = Fn+B
21
22### 0 Qwerty
23```
24,-----------------------------------------------------------------------------------------.
25| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
26|-----------------------------------------------------------------------------------------+
27| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
28|-----------------------------------------------------------------------------------------+
29| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
30|-----------------------------------------------------------------------------------------+
31| Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | Ins |
32|-----------------------------------------------------------------------------------------+
33| Ctrl | Win | Alt | Space | Alt | Menu | L | D | R |
34`-----------------------------------------------------------------------------------------'
35```
36
37### 1 Fn Layer
38```
39FN Layer
40,-----------------------------------------------------------------------------------------.
41| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
42|-----------------------------------------------------------------------------------------+
43| |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | |
44|-----------------------------------------------------------------------------------------+
45| | BL T| BL M| BL+ | BL- | | | | | | | | |
46|-----------------------------------------------------------------------------------------+
47| | | | | |RESET| | | | | | | PgUp| |
48|-----------------------------------------------------------------------------------------+
49| | | | | | | Home| PgDn| End |
50`-----------------------------------------------------------------------------------------'
51```
52
diff --git a/keyboards/dz60/keymaps/boris_burger/config.h b/keyboards/dz60/keymaps/boris_burger/config.h
new file mode 100644
index 000000000..9560d51a6
--- /dev/null
+++ b/keyboards/dz60/keymaps/boris_burger/config.h
@@ -0,0 +1 @@
#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed
diff --git a/keyboards/dz60/keymaps/boris_burger/keymap.c b/keyboards/dz60/keymaps/boris_burger/keymap.c
new file mode 100644
index 000000000..5dcadf34c
--- /dev/null
+++ b/keyboards/dz60/keymaps/boris_burger/keymap.c
@@ -0,0 +1,87 @@
1#include QMK_KEYBOARD_H
2
3/* Holds state of modifiers when Backspace was pressed.
4 * Used to ensure that the correct keycode is unregistered when Backspace is released.
5 */
6static uint8_t bspc_mods = 0;
7
8const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
9
10 /* Qwerty
11 * ,-----------------------------------------------------------------------------------------.
12 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
13 * |-----------------------------------------------------------------------------------------+
14 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
15 * |-----------------------------------------------------------------------------------------+
16 * | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
17 * |-----------------------------------------------------------------------------------------+
18 * | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | Ins |
19 * |-----------------------------------------------------------------------------------------+
20 * | Ctrl | Win | Alt | Space | Alt | Menu | L | D | R |
21 * `-----------------------------------------------------------------------------------------'
22 */
23 LAYOUT_directional(
24 KC_GESC, 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,
25 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,
26 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 ,
27 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_INS ,
28 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT
29 ),
30
31 /* FN Layer
32 * ,-----------------------------------------------------------------------------------------.
33 * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
34 * |-----------------------------------------------------------------------------------------+
35 * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | |
36 * |-----------------------------------------------------------------------------------------+
37 * | | BL T| BL M| BL+ | BL- | | | | | | | | |
38 * |-----------------------------------------------------------------------------------------+
39 * | | | | | |RESET| | | | | | | PgUp| |
40 * |-----------------------------------------------------------------------------------------+
41 * | | | | | | | Home| PgDn| End |
42 * `-----------------------------------------------------------------------------------------'
43 */
44 LAYOUT_directional(
45 KC_GRV , 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 ,
46 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
47 _______, BL_TOGG, BL_STEP, BL_INC , BL_DEC , _______, _______, _______, _______, _______, _______, _______, _______,
48 _______, _______, _______, _______, _______, RESET , _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
49 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
50 ),
51};
52
53
54bool process_record_user(uint16_t keycode, keyrecord_t *record) {
55 switch(keycode) {
56 case KC_BSPC: {
57 if (record->event.pressed) {
58 const uint8_t current_mods = get_mods();
59 const uint8_t shift = current_mods & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
60 const uint8_t ctrl = current_mods & (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTL));
61 bspc_mods = current_mods;
62 if(shift || ctrl) {
63 add_key(KC_DEL);
64 add_mods(current_mods);
65 send_keyboard_report();
66 } else {
67 return true;
68 }
69 }
70 else {
71 if(bspc_mods & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTL))) {
72 // if Shift or Ctrl was pressed with Backspace, than that was intepreted as Del, so we need
73 // to unregister the Del key
74 del_key(KC_DEL);
75 } else {
76 // Either Backspace was pressed without mods, or with a modifier other than Shift or Ctrl
77 // so it is simply taken as Backspace
78 del_key(KC_BSPC);
79 }
80 send_keyboard_report();
81 }
82 return false;
83 }
84 default:
85 return true;
86 }
87}