From 9d99fd84180fe668ab9aa914d08d325f66134610 Mon Sep 17 00:00:00 2001 From: Stephen Grier Date: Tue, 21 Aug 2018 16:38:26 +0100 Subject: Keymap: Adding stephengrier keymap for the DZ60 PCB (#3700) --- keyboards/dz60/keymaps/stephengrier/README.md | 45 ++++++++++++++ keyboards/dz60/keymaps/stephengrier/keymap.c | 86 +++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 keyboards/dz60/keymaps/stephengrier/README.md create mode 100644 keyboards/dz60/keymaps/stephengrier/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/stephengrier/README.md b/keyboards/dz60/keymaps/stephengrier/README.md new file mode 100644 index 0000000000..002a8f255b --- /dev/null +++ b/keyboards/dz60/keymaps/stephengrier/README.md @@ -0,0 +1,45 @@ +### stephengrier's DZ60 layout + +This layout is for a DZ60 with a 2U left shift, 1U right shift and an arrow +cluster in the bottom right (i.e. the GK64 layout). + +Other features: + +* The capslock key is replaced with a second function key. +* The Alt an Cmd keys are swapped to replicate the Mac layout. +* Del is available as Fn+Backspace +* Tilde is available as Shift+Esc +* Backtick is available as Fn+Esc +* Underglow toggle and mode selection are available as Fn+Q and Fn+W + +### 0 Qwerty +``` +,-----------------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | +|-----------------------------------------------------------------------------------------+ +| 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 | , | . | / | RSh | U | Fn | +|-----------------------------------------------------------------------------------------+ +| Ctrl | Alt | Cmd | Space | Cmd | Alt | L | D | R | +`-----------------------------------------------------------------------------------------' +``` + +### 1 Fn Layer +``` +FN Layer +,-----------------------------------------------------------------------------------------. +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | +|-----------------------------------------------------------------------------------------+ +| |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | RESET | +|-----------------------------------------------------------------------------------------+ +| | BL T| BL M| BL+ | BL- | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + diff --git a/keyboards/dz60/keymaps/stephengrier/keymap.c b/keyboards/dz60/keymaps/stephengrier/keymap.c new file mode 100644 index 0000000000..d9403f59e2 --- /dev/null +++ b/keyboards/dz60/keymaps/stephengrier/keymap.c @@ -0,0 +1,86 @@ +#include QMK_KEYBOARD_H + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | 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 | , | . | / | RSh | U | Fn | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Cmd | Alt | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_2_shifts( + F(0), 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, + 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, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | | BL T| BL M| BL+ | BL- | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + 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_TRNS, KC_DEL, + ______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, ______, ______, ______, ______, RESET, + ______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ + ), +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} -- cgit v1.2.1 From 3892829d74119b1fe771b4b51c665448a433da1e Mon Sep 17 00:00:00 2001 From: xton Date: Tue, 28 Aug 2018 19:54:17 -0400 Subject: Keymap: xtonhasvim updates (#3768) * cherrypicking file changes just for updates * removed unused heat foo * avoid defining own min/max * add license * formatting --- keyboards/dz60/keymaps/xtonhasvim/keymap.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/xtonhasvim/keymap.c b/keyboards/dz60/keymaps/xtonhasvim/keymap.c index 8a7419214a..34b724aaad 100644 --- a/keyboards/dz60/keymaps/xtonhasvim/keymap.c +++ b/keyboards/dz60/keymaps/xtonhasvim/keymap.c @@ -5,9 +5,13 @@ enum layers { _QWERTY, _FUN, _MOVE, - _MOUSE + _MOUSE, + _CMD }; +extern uint8_t vim_cmd_layer(void) { return _CMD; } + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( @@ -15,21 +19,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, - KC_LCTL, KC_LALT, KC_LGUI, VIM_START, TG(_MOUSE), KC_SPC, KC_RGUI, KC_RALT, X_____X, KC_RCTL, MO(_FUN)), + LSFT(KC_LALT), KC_LALT, KC_LGUI, VIM_START, TG(_MOUSE), KC_SPC, KC_RGUI, KC_RALT, X_____X, KC_RCTL, MO(_FUN)), [_FUN] = LAYOUT( 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, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, - TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY)), [_MOVE] = LAYOUT( X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, X_____X, X_____X, X_____X, _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, - TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY)), [_MOUSE] = LAYOUT( @@ -37,21 +41,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { X_____X, X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X,KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X, X_____X, _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, - TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - [_EDIT] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - TO(_QWERTY), _______, _______, VIM_START, _______, _______, _______, _______, _______, _______, _______), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY)), [_CMD] = LAYOUT( X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X, X_____X, X_____X, VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X, X_____X, VIM_SHIFT, X_____X, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT,X_____X, - TO(_QWERTY), _______, _______, TO(_QWERTY), X_____X, X_____X, _______, _______, _______, _______, _______), + _______, _______, _______, TO(_QWERTY), X_____X, X_____X, _______, _______, _______, _______, TO(_QWERTY)), }; -- cgit v1.2.1 From e0c9f1d9b94f66f2cb8ddab0c041dbea24c87e0f Mon Sep 17 00:00:00 2001 From: TheOneTrueTrench <38593283+TheOneTrueTrench@users.noreply.github.com> Date: Thu, 6 Sep 2018 15:08:16 +0000 Subject: Keymap: Added new Marianas keymap for DZ60 (#3858) * Added new Marianas keymap for DZ60 * Included suggestions to remove unnecessary line regarding MODS_CTRL_MASK, and added names for layers. Added enum to define names for layers, and removed unused #DEFINE --- keyboards/dz60/keymaps/marianas/keymap.c | 71 ++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 keyboards/dz60/keymaps/marianas/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/marianas/keymap.c b/keyboards/dz60/keymaps/marianas/keymap.c new file mode 100644 index 0000000000..dfc83fb508 --- /dev/null +++ b/keyboards/dz60/keymaps/marianas/keymap.c @@ -0,0 +1,71 @@ +#include QMK_KEYBOARD_H + +enum marianas_layers { + BASE, + NAV_CLUSTER, + RGB, + MOUSE, + GAMING, + FN_LAYER, + LAYER_SEL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE]= + LAYOUT( + KC_ESC, 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_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(FN_LAYER), 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_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_LGUI, KC_NO, KC_APP, KC_RCTL), + + [NAV_CLUSTER]= + LAYOUT( + KC_TRNS, KC_PSCREEN, KC_SCROLLLOCK, KC_PAUSE, KC_INSERT, KC_HOME, KC_PGUP, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_UP, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS, KC_TRNS, KC_TRNS), + + [RGB]= + LAYOUT( + KC_TRNS, RGB_TOG, RGB_MOD, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [MOUSE]= + LAYOUT( + KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [GAMING]= + LAYOUT( + KC_ESC, 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_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_TRNS, 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_LSHIFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, KC_NO, + KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_NO, KC_NO, TO(BASE)), + + [FN_LAYER]= + LAYOUT( + 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_TRNS, KC_DEL, + KC_CAPSLOCK, KC_MPRV, KC_MPLY, KC_MNXT, LWIN(KC_R), KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_BRK, KC_TRNS, + KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, MO(LAYER_SEL), + 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_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HYPR, KC_TRNS, KC_MEH, KC_TRNS), + + [LAYER_SEL]= + LAYOUT( + TO(BASE), TO(NAV_CLUSTER), TO(RGB), TO(MOUSE), TO(GAMING), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; -- cgit v1.2.1 From 6bf2c077151bf6e71f5fe44f730c127eb667f5a6 Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Sat, 15 Sep 2018 10:50:38 -0700 Subject: Keymap: dz60/macos_arrow: rev3 (#3909) * Arrow keys are now arranged on hjkl (vi style) * The escape key is moved on capslock, shared with func layer switch * The grave key is now dedicated (not shared with escape) * Add a new numpad layer that can be activated with the spacebar * Fix layout mismatch between layers * Use bult-in underscore KC_TRNS alias --- keyboards/dz60/keymaps/macos_arrow/keymap.c | 77 +++++++++++++++++----------- keyboards/dz60/keymaps/macos_arrow/readme.md | 39 ++++++++++---- 2 files changed, 76 insertions(+), 40 deletions(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/macos_arrow/keymap.c b/keyboards/dz60/keymaps/macos_arrow/keymap.c index f4b03ddc95..9a3120afd3 100644 --- a/keyboards/dz60/keymaps/macos_arrow/keymap.c +++ b/keyboards/dz60/keymaps/macos_arrow/keymap.c @@ -1,9 +1,9 @@ #include QMK_KEYBOARD_H -#define ______ KC_TRNS -#define _BL 0 -#define _FL 1 -#define _ML 2 +#define _BL 0 // Base layer +#define _FL 1 // Function layer +#define _ML 2 // Media layer +#define _NL 2 // Numpad layer enum my_keycodes { BR_UP = SAFE_RANGE, @@ -12,45 +12,45 @@ enum my_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | * |-----------------------------------------------------------------------------------------+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | * |-----------------------------------------------------------------------------------------+ - * | _FL | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * | Esc/_FL | A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | _ML | Up |Shift| + * | Shift | Z | X | C | V | B | N | M | , | . | / | | Up |Shift| * |-----------------------------------------------------------------------------------------+ - * | Ctrl | Alt | Gui | Space |Gui/_ML| Alt | Left| Down|Right| + * | Ctrl | Alt | Gui | Space / _NL |Gui/_ML| Alt | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ [_BL] = LAYOUT_2_shifts( - 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_NO, KC_BSPC, + 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_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(_FL), 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_ML), KC_UP, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), + LT(_FL, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_A, KC_UP, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_NO, LT(_NL, KC_SPC), KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), /* ,-----------------------------------------------------------------------------------------. - * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | UP | | | | | | + * | | | | | | | |PgUp | | | | | | | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | Left| Down|Right| | | | + * | | | | | | | Left| Down| Up |Right| | | | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | | + * | | | | | | | |PgDwn| | | | | | | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ - [_FL] = LAYOUT( - 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, - ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, ______, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, KC_LEFT, KC_DOWN, KC_RIGHT, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), + [_FL] = LAYOUT_2_shifts( + _______, 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_NO, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), /* ,-----------------------------------------------------------------------------------------. - * |Eject| BR- | BR+ | F3 | F4 | | |PREV |PLAY |NEXT |MUTE | V- | V+ | | + * |Eject| BR- | BR+ | | | | |PREV |PLAY |NEXT |MUTE | V- | V+ | | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | | | | | | | Reset | * |-----------------------------------------------------------------------------------------+ @@ -61,12 +61,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ - [_ML] = LAYOUT( - KC_MEDIA_EJECT, BR_DOWN, BR_UP, ______, ______, KC_F5, KC_F6, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), + [_ML] = LAYOUT_2_shifts( + KC_MEDIA_EJECT, BR_DOWN, BR_UP, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | % | ( | ) | < | > | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | * | 0 | 1 | 2 | 3 | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | . | - | 4 | 5 | 6 | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | , | = | 7 | 8 | 9 | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + [_NL] = LAYOUT_2_shifts( + _______, _______, _______, _______, _______, _______, _______, _______, KC_PERCENT, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LEFT_ANGLE_BRACKET, KC_RIGHT_ANGLE_BRACKET, KC_NO, _______, + _______, _______, _______, _______, _______, _______, _______, KC_ASTERISK, KC_0, KC_1, KC_2, KC_3, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_MINS, KC_4, KC_5, KC_6, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, KC_COMMA, KC_EQL, KC_7, KC_8, KC_9, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/dz60/keymaps/macos_arrow/readme.md b/keyboards/dz60/keymaps/macos_arrow/readme.md index bba8148ba5..cb700b38f0 100644 --- a/keyboards/dz60/keymaps/macos_arrow/readme.md +++ b/keyboards/dz60/keymaps/macos_arrow/readme.md @@ -15,21 +15,22 @@ My build used the following components: ``` ,-----------------------------------------------------------------------------------------. -| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | |-----------------------------------------------------------------------------------------+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |-----------------------------------------------------------------------------------------+ -| _FL | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +| _FL/Esc | A | S | D | F | G | H | J | K | L | ; | ' | Enter | |-----------------------------------------------------------------------------------------+ -| Shift | Z | X | C | V | B | N | M | , | . | / | _ML | Up |Shift| +| Shift | Z | X | C | V | B | N | M | , | . | / | | Up |Shift| |-----------------------------------------------------------------------------------------+ -| Ctrl | Alt | Cmd | Space |Cmd/_ML| Alt | Left| Down|Right| +| Ctrl | Alt | Cmd | _NL / Space |Cmd/_ML| Alt | Left| Down|Right| `-----------------------------------------------------------------------------------------' ``` -* The escape key use `KC_GESC` to get grave accent on any letter with ``Alt+Esc`` and `` ` `` alone with the ``Hyper+Esc``. The `~` is obtained with `Shift+Esc`. `GRAVE_ESC_GUI_OVERRIDE` is define so `Cmd+Alt+Esc` can still work. -* The `Caps-Lock` (`Hyper`) key switch to the function layer (`_FL`). -* The right `Cmd` key is used to switch to the media layer (`_ML`) when used with keys mapped on that layer (the top row). Any other keys just act as a `Cmd+` that key. +* The escape key is moved to the capslock to get keep grave letter pristine. +* The `Caps-Lock` (`Hyper`) key switch to the function layer (`_FL`) or escape when used alone. +* The right `Cmd` key is used to switch to the media layer (`_ML`) when used with keys mapped on that layer. +* The space key can be used to switch to the numpad layer (`_NL`) when used with one of the mapped key on that layer. ## Function Layer (_FL) @@ -37,9 +38,9 @@ My build used the following components: ,-----------------------------------------------------------------------------------------. | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | |-----------------------------------------------------------------------------------------+ -| | | | | | | | | UP | | | | | | +| | | | | | | |PgDwn| PgUp| | | | | | |-----------------------------------------------------------------------------------------+ -| | | | | | | | Left| Down|Right| | | | +| | | | | | | Left| Down| Up |Right| | | | |-----------------------------------------------------------------------------------------+ | | | | | | | | | | | | | | | |-----------------------------------------------------------------------------------------+ @@ -47,13 +48,13 @@ My build used the following components: `-----------------------------------------------------------------------------------------' ``` -The function layer is activated by the `Caps-Lock` (`Hyper`) key to access `F` keys. In addition, the `IJKL` are mapped as cursor keys on that layer. +The function layer is activated by the `Caps-Lock` (`Hyper`) key to access `F` keys. In addition, the `HJKL` are mapped as cursor keys on that layer. ## Media Layer (_ML) ``` ,-----------------------------------------------------------------------------------------. -| | BR- | BR+ | F3 | F4 | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Eject | +|Eject| BR- | BR+ | | | | |PREV |PLAY |NEXT |MUTE | V- | V+ | | |-----------------------------------------------------------------------------------------+ | | | | | | | | | | | | | | Reset | |-----------------------------------------------------------------------------------------+ @@ -67,4 +68,20 @@ The function layer is activated by the `Caps-Lock` (`Hyper`) key to access `F` k The media layer is activated by the right `Cmd` (`FN`) key. It contains the typical macos media keys on the top row. Blank keys act as `Cmd+` that key on the base layer. +## Numpad Layer (_NL) +``` +,-----------------------------------------------------------------------------------------. +| | | | | | | | | % | ( | ) | < | > | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | * | 0 | 1 | 2 | 3 | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | . | - | 4 | 5 | 6 | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | , | = | 7 | 8 | 9 | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +The numpad layer is activated by the space bar, when hold. \ No newline at end of file -- cgit v1.2.1 From 743449472e58651ec8111e6f70811103fb0a28bd Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Mon, 17 Sep 2018 10:48:02 -0700 Subject: Make `PREVENT_STUCK_MODIFIERS` the default (#3107) * Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps. --- keyboards/dz60/keymaps/LEdiodes/config.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/LEdiodes/config.h b/keyboards/dz60/keymaps/LEdiodes/config.h index bb78d9bb66..4f991b9ca2 100644 --- a/keyboards/dz60/keymaps/LEdiodes/config.h +++ b/keyboards/dz60/keymaps/LEdiodes/config.h @@ -41,9 +41,6 @@ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* prevent stuck modifiers */ -#define PREVENT_STUCK_MODIFIERS - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 -- cgit v1.2.1 From cb8d352cb3902612b118bf813d0459a2cd68473e Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Mon, 17 Sep 2018 15:10:00 -0700 Subject: Keymap: dz60/macos_arrow: fix rev3 broken media layer (#3928) Last rev broke the media layer because of a typo in layer definition. Switched to an enum to avoid similar future typos. --- keyboards/dz60/keymaps/macos_arrow/keymap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/macos_arrow/keymap.c b/keyboards/dz60/keymaps/macos_arrow/keymap.c index 9a3120afd3..7106092a47 100644 --- a/keyboards/dz60/keymaps/macos_arrow/keymap.c +++ b/keyboards/dz60/keymaps/macos_arrow/keymap.c @@ -1,9 +1,11 @@ #include QMK_KEYBOARD_H -#define _BL 0 // Base layer -#define _FL 1 // Function layer -#define _ML 2 // Media layer -#define _NL 2 // Numpad layer +enum dz60_layers { + _BL, // Base layer + _FL, // Function layer + _ML, // Media layer + _NL // Numpad layer +}; enum my_keycodes { BR_UP = SAFE_RANGE, -- cgit v1.2.1 From abcf64ecbdadc226350d457dfdc5079ce51fd72c Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 1 Oct 2018 20:35:09 -0700 Subject: Keyboard: DZ60 cleanup (#3994) * DZ60: Deleted K214 from LAYOUT_all * DZ60: Delete matrix LAYOUT_2_shifts; replace with LAYOUT_all After the deletion of K214 from LAYOUT_all, LAYOUT_all and LAYOUT_2_shifts are identical. Deprecated LAYOUT_2_shifts in favor of LAYOUT_all. * DZ60: refactor 256k_HHKB and itsaferbie keymaps to use LAYOUT_60_hhkb macro Both keymaps previously used the LAYOUT_hhkb macro. After comparing the macros, the only difference between them was that LAYOUT_hhkb included the place of the ISO Backslash key. Neither keymap used this key, so both were refactored to use LAYOUT_60_hhkb instead. LAYOUT_hhkb is now essentially unused by any keymaps in the repo. (More on that in a moment.) * DZ60: bugfix for dbroqua keymap This keymap had two layers that used the LAYOUT_true_hhkb macro and a third that used LAYOUT_hhkb. These macros have the same number of keys, but represent different physical layouts. As the "main" layers used LAYOUT_true_hhkb, switched the third layer to LAYOUT_true_hhkb as well. The LAYOUT_hhkb macro is now unused by any DZ60 keymaps in the repo, and can be safely deleted. * DZ60: bugfix for 60_ansi_arrow_fkeys, 60_plus_arrows, and stephengrier keymaps All three keymaps had one layer in LAYOUT_all and one in LAYOUT_directional. Only difference between these macros is LAYOUT_all excludes the ISO Backslash position. As none of the keymaps used this position, all layers were switched to use LAYOUT_directional. * DZ60: added layout mock-ups to dz60.h Documenting the physical layouts that go with each matrix. * DZ60: replace TMK SHIFT_ESC with QMK Grave Escape Replaced all instances of keycodes that called TMK's ACTION_FUNCTION(SHIFT_ESC) with QMK's KC_GESC, and added config.h files so KC_GESC behaves as the deprecated TMK function did, except for the default keymap, which I thought should have the QMK standard behavior. * DZ60: delete SHIFT_ESC code blocks Deleted ACTION_FUNCTION(SHIFT_ESC) code blocks from keymaps that didn't use the functionality it provided. * DZ60: deleted unused MODS_CTRL_MASk definitions Was used in the now-deleted SHIFT_ESC code blocks. Interestingly named MODS_CTRL_MASK when it was actually checking the Shift keys. *shrug* * DZ60: refactor jkbone keymap to use process_record_user Replaced TMK action_function keycodes with QMK process_record_user equivalents. * DZ60: delete unused layout macros The macros LAYOUT_hhkb, LAYOUT_directional_625_space, and LAYOUT_60_ansi_split_bs_rshift_5x1u were unused by any keymaps in the repo, and have thus been deleted. * DZ60: refactor iso_6u_space and iso_7u_space keymaps Both keymaps refactored to use the LAYOUT_60_iso macro. * DZ60: refactor dz60.h Updated the notation of the switch arguments. Format is now: `k` where `` is `[0-4]` and `` is `[0-9a-e]`. * DZ60: refactor LAYOUT_60_iso_5x1u matrix Updated matrix so `KC_ENT` belongs on the home row, which is consistent with LAYOUT_60_iso for the DZ60 as well as the ISO community layouts. * DZ60: fix white space in dz60.h I hate when indentation is inconsistent within a file. --- keyboards/dz60/keymaps/256k_HHKB/keymap.c | 20 ++-- .../dz60/keymaps/60_ansi_arrow_fkeys/config.h | 1 + .../dz60/keymaps/60_ansi_arrow_fkeys/keymap.c | 42 +------- keyboards/dz60/keymaps/60_plus_arrows/keymap.c | 40 +------- .../dz60/keymaps/Ansi_plus_fn_arrows/config.h | 1 + .../dz60/keymaps/Ansi_plus_fn_arrows/keymap.c | 38 +------ keyboards/dz60/keymaps/dbroqua/keymap.c | 2 +- keyboards/dz60/keymaps/default/keymap.c | 38 +------ keyboards/dz60/keymaps/eric/keymap.c | 36 ------- keyboards/dz60/keymaps/f3d3/keymap.c | 40 +------- keyboards/dz60/keymaps/frogger/keymap.c | 8 +- keyboards/dz60/keymaps/hailbreno/keymap.c | 16 +-- keyboards/dz60/keymaps/iso_6u_space/keymap.c | 106 +++++++------------- keyboards/dz60/keymaps/iso_7u_space/keymap.c | 109 ++++++++------------- keyboards/dz60/keymaps/iso_uk/keymap.c | 36 ------- keyboards/dz60/keymaps/iso_vim_arrow/keymap.c | 44 +-------- keyboards/dz60/keymaps/itsaferbie/keymap.c | 12 +-- keyboards/dz60/keymaps/jkbone/keymap.c | 53 +++++----- keyboards/dz60/keymaps/krusli/keymap.c | 1 - keyboards/dz60/keymaps/macos_arrow/keymap.c | 8 +- keyboards/dz60/keymaps/stephengrier/config.h | 1 + keyboards/dz60/keymaps/stephengrier/keymap.c | 42 +------- keyboards/dz60/keymaps/weeheavy/keymap.c | 6 +- 23 files changed, 156 insertions(+), 544 deletions(-) create mode 100644 keyboards/dz60/keymaps/60_ansi_arrow_fkeys/config.h create mode 100644 keyboards/dz60/keymaps/Ansi_plus_fn_arrows/config.h create mode 100644 keyboards/dz60/keymaps/stephengrier/config.h (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/256k_HHKB/keymap.c b/keyboards/dz60/keymaps/256k_HHKB/keymap.c index f426e3d1fb..1448e4ddce 100644 --- a/keyboards/dz60/keymaps/256k_HHKB/keymap.c +++ b/keyboards/dz60/keymaps/256k_HHKB/keymap.c @@ -29,11 +29,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [_DEFAULT] = LAYOUT_hhkb( + [_DEFAULT] = LAYOUT_60_hhkb( KC_ESC, 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_GRV, 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_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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, MO(_ALTFN), MO(_LIGHTS)), @@ -55,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------------------------------------------------------------' */ - [_ALTFN] = LAYOUT_hhkb( + [_ALTFN] = LAYOUT_60_hhkb( MO(_MOUSEFN), 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_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, KC_VOLD, KC_VOLU, KC_DEL, ______, ______, ______, ______, ______, ______, ______, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MNXT, KC_MPLY, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MNXT, KC_MPLY, ______, ______, ______, ______, ______, ______, ______), @@ -85,12 +85,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [_MOUSEFN] = LAYOUT_hhkb( + [_MOUSEFN] = LAYOUT_60_hhkb( ______, KC_ACL0, KC_ACL1, KC_ACL2, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), @@ -116,11 +116,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_FN] = LAYOUT_hhkb( + [_FN] = LAYOUT_60_hhkb( ______, 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_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, KC_DEL, ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, - ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, + ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, ______, ______, ______, ______, ______), @@ -146,11 +146,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LIGHTS] = LAYOUT_hhkb( + [_LIGHTS] = LAYOUT_60_hhkb( RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, ______, ______, ______, ______, ______, ______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RGB_HUD, RGB_SAD, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), }; diff --git a/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/config.h b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/config.h new file mode 100644 index 0000000000..9560d51a6f --- /dev/null +++ b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c index 76804670c8..0d3b653638 100644 --- a/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c +++ b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - #define ______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -20,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( - F(0), 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, + LAYOUT_directional( + 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, 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_DEL, + 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_DEL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -50,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/60_plus_arrows/keymap.c b/keyboards/dz60/keymaps/60_plus_arrows/keymap.c index a4b2dc29e1..f38cdb2853 100644 --- a/keyboards/dz60/keymaps/60_plus_arrows/keymap.c +++ b/keyboards/dz60/keymaps/60_plus_arrows/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - #define ______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -20,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( + LAYOUT_directional( 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, MO(1), + 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(1), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -50,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/config.h b/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/config.h new file mode 100644 index 0000000000..9560d51a6f --- /dev/null +++ b/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/keymap.c b/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/keymap.c index 778a5ac038..4c6552675a 100644 --- a/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/keymap.c +++ b/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/keymap.c @@ -1,11 +1,9 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( - F(0), 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_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_NO, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, @@ -25,37 +23,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/dbroqua/keymap.c b/keyboards/dz60/keymaps/dbroqua/keymap.c index c6c77210d8..0b4deae51e 100644 --- a/keyboards/dz60/keymaps/dbroqua/keymap.c +++ b/keyboards/dz60/keymaps/dbroqua/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | * `-----------------------------------------------------------------' */ - [_SFX] = LAYOUT_hhkb( + [_SFX] = LAYOUT_true_hhkb( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, BL_TOGG,BL_STEP,BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ diff --git a/keyboards/dz60/keymaps/default/keymap.c b/keyboards/dz60/keymaps/default/keymap.c index 426b10989d..1d375a3c63 100644 --- a/keyboards/dz60/keymaps/default/keymap.c +++ b/keyboards/dz60/keymaps/default/keymap.c @@ -1,11 +1,9 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( - F(0), 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_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_NO, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, @@ -25,37 +23,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/eric/keymap.c b/keyboards/dz60/keymaps/eric/keymap.c index d2cabebe74..a384de480c 100644 --- a/keyboards/dz60/keymaps/eric/keymap.c +++ b/keyboards/dz60/keymaps/eric/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 @@ -56,37 +54,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/f3d3/keymap.c b/keyboards/dz60/keymaps/f3d3/keymap.c index 85bb05a1d4..1e92aabc18 100644 --- a/keyboards/dz60/keymaps/f3d3/keymap.c +++ b/keyboards/dz60/keymaps/f3d3/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 @@ -18,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( + LAYOUT_all( KC_ESC, 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_GRV, 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, @@ -42,44 +40,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - LAYOUT_2_shifts( + LAYOUT_all( KC_PWR, 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_TRNS, KC_DEL, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/frogger/keymap.c b/keyboards/dz60/keymaps/frogger/keymap.c index 86a4687913..75e805cd91 100644 --- a/keyboards/dz60/keymaps/frogger/keymap.c +++ b/keyboards/dz60/keymaps/frogger/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - #define ______ KC_TRNS #define LAYER_1 1 @@ -24,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( + LAYOUT_all( KC_GRAVE, 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, @@ -52,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_MPLY, KC_MNXT, */ - LAYOUT_2_shifts( + 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_DEL, ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, ______, ______, KC_UP, ______, ______, ______, ______, ______, @@ -78,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( + LAYOUT_all( RESET, 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, ______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, diff --git a/keyboards/dz60/keymaps/hailbreno/keymap.c b/keyboards/dz60/keymaps/hailbreno/keymap.c index cc718c3935..edc22a5a24 100644 --- a/keyboards/dz60/keymaps/hailbreno/keymap.c +++ b/keyboards/dz60/keymaps/hailbreno/keymap.c @@ -44,7 +44,7 @@ enum keycodes { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------------' - [LAYOUT] = LAYOUT_2_shifts( + [LAYOUT] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_2_shifts( +[_QWERTY] = LAYOUT_all( KC_ESC, 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_GRV, 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_DEL, LT(_FUNC,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, @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT_2_shifts( +[_COLEMAK] = LAYOUT_all( KC_ESC, 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_GRV, 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_DEL, LT(_FUNC,KC_CAPS), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT_2_shifts( +[_DVORAK] = LAYOUT_all( KC_ESC, 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_BSLS, KC_GRV, KC_TAB, KC_QUOTE, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_DEL, LT(_FUNC,KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Home| PgDn| End | * `-----------------------------------------------------------------------------------------' */ -[_FUNC] = LAYOUT_2_shifts( +[_FUNC] = LAYOUT_all( _______, 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_PGUP, KC_UP, KC_PGDN, KC_CIRC, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_TILD, _______, @@ -147,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ -[_FUNC2] = LAYOUT_2_shifts( +[_FUNC2] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -167,7 +167,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ -[_RGB] = LAYOUT_2_shifts( +[_RGB] = LAYOUT_all( _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -187,7 +187,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | |Qwerty|Colemk|Dvorak| * `-----------------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_2_shifts( +[_ADJUST] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/dz60/keymaps/iso_6u_space/keymap.c b/keyboards/dz60/keymaps/iso_6u_space/keymap.c index 15ad72f3e4..e0085b4904 100644 --- a/keyboards/dz60/keymaps/iso_6u_space/keymap.c +++ b/keyboards/dz60/keymaps/iso_6u_space/keymap.c @@ -1,74 +1,44 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * _______ can be used in place of KC_TRNS (transparent) * + * XXXXXXX can be used in place of KC_NO (No Operation) * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* ISO 6u layout layer 0 -* ,-----------------------------------------------------------------------------------------. -* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC | -* |-----------------------------------------------------------------------------------------+ -* | Tab | Q | W | E | R | T | Z | U | I | O | P | P | Ü | * | | -* |-------------------------------------------------------------------------------------| + -* | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ä | # |Enter | -* |-----------------------------------------------------------------------------------------+ -* | Shift| < | Y | X | C | V | B | N | M | , | . | . | - | RShift | -* |-----------------------------------------------------------------------------------------+ -* | LCtrl | LGUI | LAlt | Space | RAlt | RGUI | Layer_2 | RCtrl | -* `-----------------------------------------------------------------------------------------' -*/ - LAYOUT( - KC_ESC, 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_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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT,KC_RGUI, KC_NO, MO(2), KC_RCTL), + /* ISO 6u layout layer 0 (UK Layout shown) + * ,-----------------------------------------------------------. + * |Esc|1 !|2 "|3 £|4 $|5 %|6 ^|7 &|8 *|9 (|0 )|- _|= +| Bksp | + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |[ {|] }|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L |; :|' @|# ~| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|/ ?| Shift | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Alt |GUI|Fn2|Ctrl | + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_iso( + KC_ESC, 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, + 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_NUHS, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(2), KC_RCTL), + + + [1] = LAYOUT_60_iso( + 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, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LGUI, XXXXXXX, KC_RALT, KC_RGUI, _______, KC_RCTL), + + [2] = LAYOUT_60_iso( + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX), - - LAYOUT( - 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_NO, KC_DEL, - KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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_LSFT, KC_NO, KC_NO, KC_NO, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LCTL, KC_LGUI, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_NO, KC_RCTL), - - LAYOUT( - KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_NO, KC_DEL, - KC_NO, KC_NO, KC_UP, 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_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), -}; - -enum function_id { - SHIFT_ESC, }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/iso_7u_space/keymap.c b/keyboards/dz60/keymaps/iso_7u_space/keymap.c index 2de2445987..016fe9a6a5 100644 --- a/keyboards/dz60/keymaps/iso_7u_space/keymap.c +++ b/keyboards/dz60/keymaps/iso_7u_space/keymap.c @@ -1,76 +1,47 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * _______ can be used in place of KC_TRNS (transparent) * + * XXXXXXX can be used in place of KC_NO (No Operation) * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* ISO 7u layout layer 0 -* ,-----------------------------------------------------------------------------------------. -* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC | -* |-----------------------------------------------------------------------------------------+ -* | Tab | Q | W | E | R | T | Z | U | I | O | P | P | Ü | * | | -* |-------------------------------------------------------------------------------------| + -* | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ä | # |Enter | -* |-----------------------------------------------------------------------------------------+ -* | Shift| < | Y | X | C | V | B | N | M | , | . | . | - | RShift | -* |-----------------------------------------------------------------------------------------+ -* | LCtrl | LGUI | LAlt | Space | RAlt | Layer_2 | RCtrl | -* `-----------------------------------------------------------------------------------------' -*/ + /* ISO 7u layout layer 0 + * ,-----------------------------------------------------------. + * |Esc|1 !|2 "|3 £|4 $|5 %|6 ^|7 &|8 *|9 (|0 )|- _|= +| Bksp | + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |[ {|] }|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L |; :|' @|# ~| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|/ ?| Shift | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Alt |Fn2|Ctrl | + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_iso( + KC_ESC, 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, + 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_BSLS, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, KC_RALT, MO(2), KC_RCTL + ), + + [1] = LAYOUT_60_iso( + 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, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_PGDN, KC_LGUI, KC_LGUI, XXXXXXX, XXXXXXX, KC_RGUI, _______, KC_RCTL + ), + + [2] = LAYOUT_60_iso( + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX + ), - LAYOUT( - KC_ESC, 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_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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_RALT, KC_NO, MO(2), KC_RCTL), - - - LAYOUT( - 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_NO, KC_DEL, - KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_PGDOWN, KC_LGUI, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_NO, KC_RCTL), - - LAYOUT( - KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, - KC_NO, KC_NO, KC_UP, 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_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), -}; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), }; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/iso_uk/keymap.c b/keyboards/dz60/keymaps/iso_uk/keymap.c index 1c15a59df8..13e6e18594 100644 --- a/keyboards/dz60/keymaps/iso_uk/keymap.c +++ b/keyboards/dz60/keymaps/iso_uk/keymap.c @@ -18,8 +18,6 @@ #define MO_FN MO(1) #define MO_FN MO(1) -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_60_iso( @@ -50,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c b/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c index 9e85a89eee..4dad9e19f5 100644 --- a/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c +++ b/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ISO 5x1u layout (ISO German keyboard layout shown) @@ -23,8 +21,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_60_iso_5x1u( KC_ESC, 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_ENT, - 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_BSLS, + 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, + 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_BSLS, KC_ENT, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -32,44 +30,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_60_iso_5x1u( 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, - KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_DEL, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_DEL, KC_NO, KC_NO, KC_LSFT, BL_TOGG, KC_APP, KC_PAUS, KC_INS, KC_NO, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/itsaferbie/keymap.c b/keyboards/dz60/keymaps/itsaferbie/keymap.c index ecc99cc751..de30e05382 100644 --- a/keyboards/dz60/keymaps/itsaferbie/keymap.c +++ b/keyboards/dz60/keymaps/itsaferbie/keymap.c @@ -9,25 +9,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_DEFAULT] = LAYOUT_hhkb( + [_DEFAULT] = LAYOUT_60_hhkb( KC_ESC, 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_GRV, 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_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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_LIGHTS)), - [_FN] = LAYOUT_hhkb( + [_FN] = LAYOUT_60_hhkb( ______, 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_DEL, KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, RESET, ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, - ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, + ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, ______, ______, ______, ______, ______), - [_LIGHTS] = LAYOUT_hhkb( + [_LIGHTS] = LAYOUT_60_hhkb( RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, ______, ______, ______, ______, ______, ______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RGB_HUD, RGB_SAD, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, - ______, ______, ______, ______, BL_DEC, BL_TOGG, BL_INC, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, BL_DEC, BL_TOGG, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), }; diff --git a/keyboards/dz60/keymaps/jkbone/keymap.c b/keyboards/dz60/keymaps/jkbone/keymap.c index ecc391785f..1efcbe38f4 100644 --- a/keyboards/dz60/keymaps/jkbone/keymap.c +++ b/keyboards/dz60/keymaps/jkbone/keymap.c @@ -1,7 +1,6 @@ #include QMK_KEYBOARD_H #define ____ KC_TRNS -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define FL_ESC LT(_FL, KC_ESC) #define FL MO(_FL) @@ -11,60 +10,56 @@ enum layers_idx { _FL // Functions }; +enum custom_keycodes { + RGB_VAZ = SAFE_RANGE, + RGB_OAZ, + RGB_WAN, + RGB_000 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_60_iso_5x1u( KC_ESC, 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_ENT, - FL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, + 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, + FL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS,KC_ENT, KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, FL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT ), [_ML] = LAYOUT_60_iso_5x1u( ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_LGUI, KC_LALT, KC_LCTL, ____, ____, ____, ____, ____, ____ ), [_FL] = LAYOUT_60_iso_5x1u( RESET, 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, - ____, ____, DF(_BL), DF(_ML), ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ____, ____, ____, - ____, F(3), F(2), F(1), F(0), ____, ____, ____, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, ____, + ____, ____, DF(_BL), DF(_ML), ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ____, ____, ____, ____, + ____, RGB_000, RGB_WAN, RGB_OAZ, RGB_VAZ, ____, ____, ____, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ) }; -enum function_id { - RGB_VAZ, - RGB_OAZ, - RGB_WAN, - RGB_000 -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(RGB_VAZ), - [1] = ACTION_FUNCTION(RGB_OAZ), - [2] = ACTION_FUNCTION(RGB_WAN), - [3] = ACTION_FUNCTION(RGB_000) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGB_VAZ: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case RGB_VAZ: rgblight_enable(); rgblight_setrgb(0, 204, 33); break; - case RGB_OAZ: + case RGB_OAZ: rgblight_enable(); rgblight_setrgb(229, 65, 0); break; - case RGB_WAN: + case RGB_WAN: rgblight_enable(); rgblight_setrgb(255, 255, 255); break; - case RGB_000: + case RGB_000: rgblight_disable(); break; + } } -} + return true; +}; diff --git a/keyboards/dz60/keymaps/krusli/keymap.c b/keyboards/dz60/keymaps/krusli/keymap.c index 36e7b801a3..0ad6f1b2b5 100644 --- a/keyboards/dz60/keymaps/krusli/keymap.c +++ b/keyboards/dz60/keymaps/krusli/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/dz60/keymaps/macos_arrow/keymap.c b/keyboards/dz60/keymaps/macos_arrow/keymap.c index 7106092a47..81d61a59ae 100644 --- a/keyboards/dz60/keymaps/macos_arrow/keymap.c +++ b/keyboards/dz60/keymaps/macos_arrow/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Space / _NL |Gui/_ML| Alt | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ - [_BL] = LAYOUT_2_shifts( + [_BL] = LAYOUT_all( 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_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, LT(_FL, 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, @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ - [_FL] = LAYOUT_2_shifts( + [_FL] = LAYOUT_all( _______, 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_NO, KC_DEL, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ - [_ML] = LAYOUT_2_shifts( + [_ML] = LAYOUT_all( KC_MEDIA_EJECT, BR_DOWN, BR_UP, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ - [_NL] = LAYOUT_2_shifts( + [_NL] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, KC_PERCENT, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LEFT_ANGLE_BRACKET, KC_RIGHT_ANGLE_BRACKET, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, KC_ASTERISK, KC_0, KC_1, KC_2, KC_3, _______, RESET, _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_MINS, KC_4, KC_5, KC_6, _______, diff --git a/keyboards/dz60/keymaps/stephengrier/config.h b/keyboards/dz60/keymaps/stephengrier/config.h new file mode 100644 index 0000000000..9560d51a6f --- /dev/null +++ b/keyboards/dz60/keymaps/stephengrier/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/stephengrier/keymap.c b/keyboards/dz60/keymaps/stephengrier/keymap.c index d9403f59e2..f6bbe78932 100644 --- a/keyboards/dz60/keymaps/stephengrier/keymap.c +++ b/keyboards/dz60/keymaps/stephengrier/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - #define ______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -20,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( - F(0), 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, + LAYOUT_directional( + 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, 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, MO(1), + 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(1), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -50,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/weeheavy/keymap.c b/keyboards/dz60/keymaps/weeheavy/keymap.c index a98e3eeb20..cb9697e107 100644 --- a/keyboards/dz60/keymaps/weeheavy/keymap.c +++ b/keyboards/dz60/keymaps/weeheavy/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Base layer - ANSI QWERTY -[L0] = LAYOUT_2_shifts( +[L0] = LAYOUT_all( 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, XXXX, 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, @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(L1), KC_SPC, KC_RALT, MO(L2), KC_LEFT, KC_DOWN, KC_RIGHT), // Utility layer - RGB and multimedia control -[L1] = LAYOUT_2_shifts( +[L1] = LAYOUT_all( ____, 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, RGB_MOD, RGB_M_K, RGB_M_R, ____, ____, KC_PSCR, ____, KC_PAUS, ____, ____, ____, ____, ____, RGB_HUI, RGB_HUD, ____, ____, ____, ____, KC_INS, KC_HOME, KC_PGUP, ____, ____, ____, @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, RGB_VAI, RGB_VAD, ____, ____, ____, ____, ____, KC_MPRV, KC_VOLD, KC_MNXT), // Setup layer - Reset an additional "b" button -[L2] = LAYOUT_2_shifts( +[L2] = LAYOUT_all( RESET, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_B, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, RESET, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, -- cgit v1.2.1 From 5c2ac733afe9f6d68d2ad42c9d58fbff466a7874 Mon Sep 17 00:00:00 2001 From: Jarred Steenvoorden Date: Wed, 3 Oct 2018 01:14:37 +1000 Subject: Keymap: Adding my DZ60, Satan, XD75 kemaps and updates to userspace (#4039) * Update userspace with common config.h * Add my dz60, satan and xd75 keyboard keymaps * Fixing executable bits changed during last upstream merge * Cleanup unnecessary files and defines * Remove unnecessary defines from userspace config --- keyboards/dz60/keymaps/jarred/keymap.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 keyboards/dz60/keymaps/jarred/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/jarred/keymap.c b/keyboards/dz60/keymaps/jarred/keymap.c new file mode 100644 index 0000000000..9e68506831 --- /dev/null +++ b/keyboards/dz60/keymaps/jarred/keymap.c @@ -0,0 +1,21 @@ +#include QMK_KEYBOARD_H + +#define _QW 0 +#define _NV 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, 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, + MO(_NV), 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, XXXXXXX,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,XXXXXXX, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT,KC_RGUI, XXXXXXX,KC_APP, KC_RCTL), + + [_NV] = LAYOUT( + 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 ,KC_BSPC,_______,KC_HOME,KC_UP ,KC_END ,KC_INS ,_______,_______,_______, + _______,_______,_______,KC_LSFT,KC_LCTL,KC_ENT ,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_DEL ,KC_DEL , _______, + _______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,_______,_______,_______, + _______,_______,_______, _______,_______,_______, _______,_______,_______, RESET, _______) +}; -- cgit v1.2.1 From 27e216fc1a481bb3e65832458bd2b199cb499e0b Mon Sep 17 00:00:00 2001 From: thomasviaud Date: Fri, 5 Oct 2018 21:00:24 +0200 Subject: Keymap: Add french iso layout for dz60 (thomasviaud) (#4080) --- keyboards/dz60/keymaps/thomasviaud/README.md | 4 ++++ keyboards/dz60/keymaps/thomasviaud/keymap.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 keyboards/dz60/keymaps/thomasviaud/README.md create mode 100644 keyboards/dz60/keymaps/thomasviaud/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/thomasviaud/README.md b/keyboards/dz60/keymaps/thomasviaud/README.md new file mode 100644 index 0000000000..f5bf221a22 --- /dev/null +++ b/keyboards/dz60/keymaps/thomasviaud/README.md @@ -0,0 +1,4 @@ +## French ISO Layout + +Here is a very simple version of a French ISO Layout (handled by OS). +Feel free to take this as base for your own layout. diff --git a/keyboards/dz60/keymaps/thomasviaud/keymap.c b/keyboards/dz60/keymaps/thomasviaud/keymap.c new file mode 100644 index 0000000000..02fdb5a4a0 --- /dev/null +++ b/keyboards/dz60/keymaps/thomasviaud/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_60_iso( + KC_ESC, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS , KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + + LAYOUT_60_iso( + 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, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, + _______, _______, _______, RESET, _______, _______, _______, _______), +}; \ No newline at end of file -- cgit v1.2.1 From 6c55e8cab5a1cc43c0c024344727ceb243d98f5a Mon Sep 17 00:00:00 2001 From: Boris Burger Date: Wed, 10 Oct 2018 23:17:42 +0200 Subject: Keymap: DZ60 layout based on stephengrier's with PgUp/PgDn/Home/End, Insert, etc. (#4110) * DZ60 layout based on stephengrier's with customisations. * CapsLock is used as Fn key. * Del is available as Fn+Backspace & Shift+Backspace (using a macro) * PgUp / PgDn / Home / End = Fn+Arrows (as on macOS, Microsoft Surface) * Tilde = Shift+Esc * Backtick = Fn+Esc * Underglow toggle and mode selection are available as Fn+Q and Fn+W * Reset (bootloader mode) = Fn+B * Standardised layout formatting and Ctrl+Del & Shift+Del support. Using 7 underscores for KC_TRNS in layouts and aligning the keycodes according to LAYOUT_directional. Del is now only Fn+Del, Ctrl+Backspace translates to Ctrl+Del, Shift+Backspace translates to Shift+Del. * Documented new Backspace/Del related macros. Del is now just Fn+Backspace, pressing Ctrl+Backspace sends Ctrl+Del, pressing Shift+Backspace sends Shift+Del --- keyboards/dz60/keymaps/boris_burger/README.md | 52 ++++++++++++++++ keyboards/dz60/keymaps/boris_burger/config.h | 1 + keyboards/dz60/keymaps/boris_burger/keymap.c | 87 +++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 keyboards/dz60/keymaps/boris_burger/README.md create mode 100644 keyboards/dz60/keymaps/boris_burger/config.h create mode 100644 keyboards/dz60/keymaps/boris_burger/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/boris_burger/README.md b/keyboards/dz60/keymaps/boris_burger/README.md new file mode 100644 index 0000000000..64062f823a --- /dev/null +++ b/keyboards/dz60/keymaps/boris_burger/README.md @@ -0,0 +1,52 @@ +### boris_burger's DZ60 layout + +This layout is for a DZ60 with a 2U left shift, 1U right shift and an arrow cluster in +the bottom right. + +It is based off stephengrier's layout adding support for Home/End/PgUp/PgDn using Fn+arrows +as used on macOS and Microsoft Surface. It has Insert instead of Fn near the arrow cluster +and other smaller tweaks: +- CapsLock is the only Fn key (CapsLock by itself is not available) +- Del is available as Fn+Backspace +- Ctrl+Del is available as Ctrl+Backspace (e.g. deleting word to the right of the cursor) +- Shift+Del is available as Shift+Backspace (e.g. permanently deleting file or e-mail) +- PgUp = Fn+Up +- PgDn = Fn+Down +- Home = Fn+Left +- End = Fn+Right +- Tilde = Shift+Esc +- Backtick = Fn+Esc +- Underglow toggle and mode selection are available as Fn+Q and Fn+W +- Reset (bootloader mode) = Fn+B + +### 0 Qwerty +``` +,-----------------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | +|-----------------------------------------------------------------------------------------+ +| 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 | , | . | / | RSh | U | Ins | +|-----------------------------------------------------------------------------------------+ +| Ctrl | Win | Alt | Space | Alt | Menu | L | D | R | +`-----------------------------------------------------------------------------------------' +``` + +### 1 Fn Layer +``` +FN Layer +,-----------------------------------------------------------------------------------------. +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | +|-----------------------------------------------------------------------------------------+ +| |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | +|-----------------------------------------------------------------------------------------+ +| | BL T| BL M| BL+ | BL- | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | |RESET| | | | | | | PgUp| | +|-----------------------------------------------------------------------------------------+ +| | | | | | | Home| PgDn| End | +`-----------------------------------------------------------------------------------------' +``` + diff --git a/keyboards/dz60/keymaps/boris_burger/config.h b/keyboards/dz60/keymaps/boris_burger/config.h new file mode 100644 index 0000000000..9560d51a6f --- /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 0000000000..5dcadf34c1 --- /dev/null +++ b/keyboards/dz60/keymaps/boris_burger/keymap.c @@ -0,0 +1,87 @@ +#include QMK_KEYBOARD_H + +/* Holds state of modifiers when Backspace was pressed. + * Used to ensure that the correct keycode is unregistered when Backspace is released. + */ +static uint8_t bspc_mods = 0; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | 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 | , | . | / | RSh | U | Ins | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | Alt | Menu | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + LAYOUT_directional( + 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, + 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_INS , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | BL T| BL M| BL+ | BL- | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | |RESET| | | | | | | PgUp| | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | Home| PgDn| End | + * `-----------------------------------------------------------------------------------------' + */ + LAYOUT_directional( + 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 , + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_STEP, BL_INC , BL_DEC , _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, RESET , _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_BSPC: { + if (record->event.pressed) { + const uint8_t current_mods = get_mods(); + const uint8_t shift = current_mods & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)); + const uint8_t ctrl = current_mods & (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTL)); + bspc_mods = current_mods; + if(shift || ctrl) { + add_key(KC_DEL); + add_mods(current_mods); + send_keyboard_report(); + } else { + return true; + } + } + else { + if(bspc_mods & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTL))) { + // if Shift or Ctrl was pressed with Backspace, than that was intepreted as Del, so we need + // to unregister the Del key + del_key(KC_DEL); + } else { + // Either Backspace was pressed without mods, or with a modifier other than Shift or Ctrl + // so it is simply taken as Backspace + del_key(KC_BSPC); + } + send_keyboard_report(); + } + return false; + } + default: + return true; + } +} -- cgit v1.2.1 From ae489efee4512790e38f173bcd2e2f1e2547da07 Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Thu, 11 Oct 2018 17:00:53 -0700 Subject: Keymap: Add crd's simple layout (#4117) * Add crd's simple layout * Fix transparent mapping in crd's config * Add secondary navigation to fn layer --- keyboards/dz60/keymaps/crd/keymap.c | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 keyboards/dz60/keymaps/crd/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/crd/keymap.c b/keyboards/dz60/keymaps/crd/keymap.c new file mode 100644 index 0000000000..5e9242c9d9 --- /dev/null +++ b/keyboards/dz60/keymaps/crd/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl/Esc| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Cmd | FN | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + 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, + 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, + CTL_T(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, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | RESET | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | BL T| BL M| BL+ | BL- | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | |PgUp | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | |Home |PgDn | End | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + 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_TRNS, RESET, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END + ), +}; -- cgit v1.2.1 From 4930e22dda408420332831781c4fde002a89915e Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Mon, 15 Oct 2018 10:44:55 -0700 Subject: Keymap: Move multimedia events to dedicated layer and format config (#4136) --- keyboards/dz60/keymaps/crd/keymap.c | 48 +++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 13 deletions(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/crd/keymap.c b/keyboards/dz60/keymaps/crd/keymap.c index 5e9242c9d9..a17d32caaf 100644 --- a/keyboards/dz60/keymaps/crd/keymap.c +++ b/keyboards/dz60/keymaps/crd/keymap.c @@ -12,25 +12,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL | * |-----------------------------------------------------------------------------------------+ - * | Ctrl | Alt | Cmd | Space | Cmd | FN | L | D | R | + * | FN2 | Alt | Cmd | Space | Cmd | FN1 | L | D | R | * `-----------------------------------------------------------------------------------------' */ LAYOUT_directional( - 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, - 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, - CTL_T(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, KC_RSFT, KC_UP, KC_DEL, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + 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, + 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, + CTL_T(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, KC_RSFT, KC_UP, KC_DEL, + MO(2), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT ), - /* FN Layer + /* FN1 Layer * ,-----------------------------------------------------------------------------------------. - * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | RESET | + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | * |-----------------------------------------------------------------------------------------+ - * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | + * | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------+ - * | | BL T| BL M| BL+ | BL- | | | | | | | | | + * | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | | | | | |PgUp | | * |-----------------------------------------------------------------------------------------+ @@ -39,10 +39,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_directional( - 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_TRNS, RESET, - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, - _______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, _______, + 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_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END ), + + /* FN2 Layer (Media) + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | |Pl/Ps|Vol+ |Mute | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | |Prev |Vol- |Next | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), }; -- cgit v1.2.1 From 423b419138f78118a0fde0144053284ab64ab88e Mon Sep 17 00:00:00 2001 From: jshuf <44121348+jshuf@users.noreply.github.com> Date: Mon, 15 Oct 2018 16:27:09 -0400 Subject: Keymap: 60_ansi keymap for DZ60 (#4139) * 60_ansi keymap for DZ60 * 60_ansi keymap for DZ60 Amend author * 60_ansi keymap for DZ60 --- keyboards/dz60/keymaps/60_ansi/keymap.c | 18 ++++++++++++++++++ keyboards/dz60/keymaps/60_ansi/readme.md | 9 +++++++++ 2 files changed, 27 insertions(+) create mode 100644 keyboards/dz60/keymaps/60_ansi/keymap.c create mode 100644 keyboards/dz60/keymaps/60_ansi/readme.md (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/60_ansi/keymap.c b/keyboards/dz60/keymaps/60_ansi/keymap.c new file mode 100644 index 0000000000..9a9e11ac91 --- /dev/null +++ b/keyboards/dz60/keymaps/60_ansi/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_60_ansi( + 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, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + + LAYOUT_60_ansi( + 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, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/dz60/keymaps/60_ansi/readme.md b/keyboards/dz60/keymaps/60_ansi/readme.md new file mode 100644 index 0000000000..edbc16c042 --- /dev/null +++ b/keyboards/dz60/keymaps/60_ansi/readme.md @@ -0,0 +1,9 @@ +![60_ansi DZ60 base layer](https://i.imgur.com/MqBLh3D.png) + +![60_ansi DZ60 fn layer](https://i.imgur.com/ml1djHi.png) + +# 60_ansi DZ60 Layout + +This is a basic keymap for the 60_ansi layout of the DZ60. +The default layer is normal ANSI and the Fn layer is used for RGB +and backlighting functions. -- cgit v1.2.1 From 4a7baaaf50bc9cce3886ff7e1b6455e028d92ab9 Mon Sep 17 00:00:00 2001 From: TheOneTrueTrench <38593283+TheOneTrueTrench@users.noreply.github.com> Date: Thu, 18 Oct 2018 00:38:24 -0400 Subject: Keymap: Adding new functionality to personal keymap, smart macros (#4159) * Added base keymap * Added initial layers and mirrored most of Pok3r behavior. * Some stuff for Space Captain * Added new Marianas keymap for DZ60 * Included suggestions to remove unnecessary line regarding MODS_CTRL_MASK, and added names for layers. Added enum to define names for layers, and removed unused #DEFINE * Added DVORAK and COLEMAK * Caps + enter + space for flashing mode. * Added RGB status * added flash script * Changed lighting modes to make layers more apparent * fixed issue with not being able to exit gaming mode. * Added abbreviation constructor * Changed lighting modes to make layers more apparent * fixed issue with not being able to exit gaming mode. * Added abbreviation constructor * Fixed bug with SQL Table Macro generator. * restructured file. No Logical changes. * literals only for smart macros * removed extraneous pointer declaration. * Smart Macros * Added Makefile and header file * extended smart macros to be able to cover the whole alphas. * removed non-relavent keymaps. * didn't mean to include this guy. --- keyboards/dz60/keymaps/marianas/keymap.c | 592 ++++++++++++++++++++++++++++--- keyboards/dz60/keymaps/marianas/keymap.h | 103 ++++++ keyboards/dz60/keymaps/marianas/rules.mk | 17 + 3 files changed, 657 insertions(+), 55 deletions(-) create mode 100644 keyboards/dz60/keymaps/marianas/keymap.h create mode 100644 keyboards/dz60/keymaps/marianas/rules.mk (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/marianas/keymap.c b/keyboards/dz60/keymaps/marianas/keymap.c index dfc83fb508..e40bc6897b 100644 --- a/keyboards/dz60/keymaps/marianas/keymap.c +++ b/keyboards/dz60/keymaps/marianas/keymap.c @@ -1,71 +1,553 @@ #include QMK_KEYBOARD_H +#include "keymap.h" enum marianas_layers { - BASE, + QWERTY, +/* + COLEMAK, + DVORAK, +*/ NAV_CLUSTER, - RGB, - MOUSE, GAMING, - FN_LAYER, - LAYER_SEL + SQLMACROS, + SQLNAMES, + FN_LAYER +}; + +enum sql_macros { + S_LFTJN = SAFE_RANGE, // L + S_INRJN, // I + S_SLCT, // S + S_FROM, // F + S_DSNCT, // D + S_ORDER, // O + S_WHERE, // W + S_ALTER, // Esc + S_ASTRK, // * + + TD_A, + TD_B, + TD_C, // Corp, Corporation, Company + TD_D, // Distribution, Dist, Distributor + TD_E, + TD_F, + TD_G, // GlobalLookup + TD_H, + TD_I, // Instance, Item + TD_J, + TD_K, + TD_L, + TD_M, + TD_N, // NadRate + TD_O, + TD_P, // Product, Person, + TD_Q, // Darden + TD_R, + TD_S, // Supplier, Step + TD_T, // Task, Type + TD_U, + TD_V, + TD_W, // Workflow, + TD_X, + TD_Y, + TD_Z, + TD_BSPC, + TD_ENT, + TD_ESC +}; + +uint16_t *macroTaps = 0; + +char *tableNameList = 0; + +uint8_t *charCount = 0; +uint8_t countPointer = 0; + +bool shifted = false; + +bool sendAbbr = false; + + +void initStringData(void) +{ + if (macroTaps == 0) + { + macroTaps = malloc(macroTapsLen*sizeof(uint16_t)); + for(int i = 0; i < macroTapsLen; i++) + { + macroTaps[i] = 0; + } + } + if (tableNameList == 0) + { + tableNameList = malloc(tableNameListLen*sizeof(char)); + for(int i = 0; i < tableNameListLen; i++) + { + tableNameList[i] = 0; + } + } + if (charCount == 0) + { + charCount = malloc(charCountLen*sizeof(uint8_t)); + for (int i = 0; i < charCountLen; i++) + { + charCount[i] = 0; + } + } +} + + +uint32_t layer_state_set_user(uint32_t state) +{ + switch (biton32(state)) + { + case QWERTY: + rgblight_mode(9); + break; + case NAV_CLUSTER: + rgblight_mode(29); + break; + case GAMING: + rgblight_mode(26); + break; + case SQLMACROS: + rgblight_mode(1); + rgblight_setrgb(0x00, 0xFF, 0x80); + break; + case SQLNAMES: + rgblight_mode(1); + rgblight_setrgb(0x80, 0xFF, 0x00); + break; + case FN_LAYER: + rgblight_mode(1); + rgblight_setrgb(0x00, 0x80, 0xFF); + break; + } + return state; +} + +bool containsCode(uint16_t kc) +{ + for (int i = 0; i < macroTapsLen && macroTaps[i] > 0; i++) + { + if (macroTaps[i] == kc) return true; + } + return false; +} + +bool lastCodeIs(uint16_t kc) +{ + for (int i = 0; i < macroTapsLen-1 && macroTaps[i] > 0; i++) + { + if (macroTaps[i] == kc && macroTaps[i+1] == 0) return true; + } + return false; +} + +bool last2CodeAre(uint16_t kc) +{ + for (int i = 0; i < macroTapsLen-2 && macroTaps[i] > 0; i++) + { + if (macroTaps[i] == kc && macroTaps[i+1] == kc && macroTaps[i+2] == 0) return true; + } + return false; +} + +bool last2CodesAre(uint16_t kc, uint16_t kc2) +{ + for (int i = 0; i < macroTapsLen-2 && macroTaps[i] > 0; i++) + { + if (macroTaps[i] == kc && macroTaps[i+1] == kc2 && macroTaps[i+2] == 0) return true; + } + return false; +} + +void addKeyCode(uint16_t kc) +{ + int i = 0; + while (i < macroTapsLen-2 && macroTaps[i] > 0) i++; + if (macroTaps[i] == 0) + { + macroTaps[i] = kc; + macroTaps[i+1] = 0; + } +} + +void eraseKeyCodes(void) +{ + int i = 0; + while (i < macroTapsLen && macroTaps[i] > 0) macroTaps[i++] = 0; +} + +void eraseCharCounts(void) +{ + int i = 0; + while (i < charCountLen) + { + charCount[i] = 0; + } +} + +void printTableAbbreviation(void) +{ + initStringData(); + if (tableNameList[0] == 0) + { + return; + } + send_char(0x20); + int i = 0; + for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) + { + if (tableNameList[i] >= 65 && tableNameList[i] <= 90) + { + send_char(tableNameList[i]+32); + } + else + { + send_char(tableNameList[i]); + } + } + send_char(0x20); +} + +void eraseTableAbbreviation(void) +{ + initStringData(); + for (int i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) + { + tableNameList[i] = '\0'; + } +} + +void printString(char* str) +{ + + if (str[0] != '\0') + { + int i = 0; + while (true) + { + if (str[i] == 0) + { + break; + } + send_char(str[i++]); + charCount[countPointer]++; + } + } +} + +void printStringAndQueueChar(char* str) +{ + initStringData(); + if (charCount[countPointer] != 0) + { + countPointer++; + } + sendAbbr = true; + if (str[0] != '\0') + { + printString(str); + + for (int i = 0; i < tableNameListLen-1; i++) + { + if (tableNameList[i] == '\0') + { + tableNameList[i] = str[0]; + tableNameList[i+1] = '\0'; + break; + } + else if (i == tableNameListLen-2) + { + printTableAbbreviation(); + break; + } + } + //for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) + //{ + // send_char(tableNameList[i]); + //} + //send_string_P("Darden"); + //send_string_P(&myarray); + //send_string_P(str); + } +} + +void ReplaceString(char *orig, char *repl) +{ + int i = 0; + while((orig[i] != 0x0 && repl[i] != 0x0) && orig[i] == repl[i]) + i++; + + if(orig[i] != 0x0) + { + int o = i; + while (orig[o++] != 0x0) { + charCount[countPointer]--; + register_code(KC_BSPC); + unregister_code(KC_BSPC); + } + } + printString(repl+i); +} + +void deletePrev(void) +{ + for (int i = 0; i < charCount[countPointer]; i++) + { + register_code(KC_BSPC); + unregister_code(KC_BSPC); + } + charCount[countPointer] = 0; + countPointer--; + int i = 1; + for (;i < tableNameListLen-1; i++) + { + if (tableNameList[i] == 0x0) + { + break; + } + } + tableNameList[i-1] = 0x0; +} + +void processSmartMacroTap(uint16_t kc) +{ + initStringData(); + switch(kc) + { + case TD_C: + if (containsCode(TD_D)) + { + printString("ribution"); + printStringAndQueueChar("Center"); + } + else if (last2CodeAre(TD_C)) + { + ReplaceString("Corporation", "Contact"); + } + else if(lastCodeIs(TD_C)) + { + printString("oration"); + } + else + { + printStringAndQueueChar("Corp"); + } + break; + case TD_D: + if (last2CodeAre(TD_D)) + { + ReplaceString("Distribution", "Distributor"); + } + else if(lastCodeIs(TD_D)) + { + printString("ribution"); + } + else + { + printStringAndQueueChar("Dist"); + } + break; + case TD_G: + printStringAndQueueChar("Global"); + printStringAndQueueChar("Lookup"); + break; + case TD_I: + if (containsCode(TD_W)) + printStringAndQueueChar("Instance"); + else + printStringAndQueueChar("Item"); + break; + case TD_N: + printStringAndQueueChar("NadRate"); + break; + case TD_P: + if (last2CodesAre(TD_D, TD_C)) + { + ReplaceString("DistributionCenter", "DistCenter"); + printStringAndQueueChar("Pricing"); + } + else if (last2CodeAre(TD_P)) + { + } + else if(lastCodeIs(TD_P)) + { + ReplaceString("Product", "Person"); + } + else + { + printStringAndQueueChar("Product"); + } + break; + case TD_Q: + printStringAndQueueChar("Darden"); + break; + case TD_S: + if (containsCode(TD_W)) + if (containsCode(TD_S) || containsCode(TD_D)) + printStringAndQueueChar("Step"); + else + printStringAndQueueChar("Session"); + else + printStringAndQueueChar("Supplier"); + break; + case TD_T: + if (containsCode(TD_W)) + printStringAndQueueChar("Task"); + else + printStringAndQueueChar("Type"); + break; + case TD_W: + printStringAndQueueChar("Workflow"); + break; + } + addKeyCode(kc); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (record->event.pressed) + { + switch (keycode) + { + case KC_LSPO: + case KC_RSPC: + shifted = true; + return true; + + case S_LFTJN: SEND_STRING("LEFT JOIN"); return false; + case S_INRJN: SEND_STRING("INNER JOIN "); return false; + case S_SLCT: SEND_STRING("SELECT "); return false; + case S_FROM: SEND_STRING("FROM "); return false; + case S_DSNCT: SEND_STRING("DISTINCT "); return false; + case S_ORDER: SEND_STRING("ORDER "); return false; + case S_WHERE: SEND_STRING("WHERE "); return false; + case S_ALTER: SEND_STRING("ALTER SESSION SET CURRENT_SCHEMA = "); return false; + case S_ASTRK: SEND_STRING("* "); return false; + + case KC_BSLS: + initStringData(); + layer_on(SQLNAMES); + return false; + + case TD_BSPC: + if (!shifted){ + deletePrev(); + } + else { + register_code(KC_BSPC); + unregister_code(KC_BSPC); + } + return false; + + case TD_A: + case TD_B: + case TD_C: + case TD_D: + case TD_E: + case TD_F: + case TD_G: + case TD_H: + case TD_I: + case TD_J: + case TD_K: + case TD_L: + case TD_M: + case TD_N: + case TD_O: + case TD_P: + case TD_Q: + case TD_R: + case TD_S: + case TD_T: + case TD_U: + case TD_V: + case TD_W: + case TD_X: + case TD_Y: + case TD_Z: + processSmartMacroTap(keycode); + return false; + + case TD_ENT: + printTableAbbreviation(); + case TD_ESC: + eraseKeyCodes(); + eraseTableAbbreviation(); + layer_off(SQLNAMES); + return true; + } + } + else + { + switch (keycode) + { + + case KC_BSLS: + if (macroTaps[0] == 0) + { + SEND_STRING("\\"); + layer_off(SQLNAMES); + } + return true; + case KC_LSPO: + case KC_RSPC: + shifted = false; + return true; + } + } + return true; }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE]= - LAYOUT( - KC_ESC, 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_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(FN_LAYER), 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_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_LGUI, KC_NO, KC_APP, KC_RCTL), + [QWERTY]= + LAYOUT_60_ansi( + ESCAP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MNUS, EQUL, BACKSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LBRC, RBRC, BSLASH, + MO_FNLR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, COLN, QUOT, ENTER_OR_SQL, + LEFTSHFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, CMMA, PRRD, SLSH, RIGHT_SHIFT__PAREN, + CTLL, WINL, ALTL, SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE, ALTR, WINR, APPR, CTLR), [NAV_CLUSTER]= - LAYOUT( - KC_TRNS, KC_PSCREEN, KC_SCROLLLOCK, KC_PAUSE, KC_INSERT, KC_HOME, KC_PGUP, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_UP, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS, KC_TRNS, KC_TRNS), - - [RGB]= - LAYOUT( - KC_TRNS, RGB_TOG, RGB_MOD, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [MOUSE]= - LAYOUT( - KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + LAYOUT_60_ansi( + _____, PSCR, SCRL, PAUS, NSRT, HOME, PGUP, NMLK, KSSH, STAR, KMIN, ____, ____, ______, + ______, ____, ____, ____, DELT, END_, PGDN, KP_7, KP_8, KP_9, PLUS, ____, ____, _____, + _______, ____, ____, ____, ____, UPUP, UPUP, KP_4, KP_5, KP_6, PLUS, ____, ___________, + ________, ____, ____, ____, LEFT, D_WN, RGHT, KP_1, KP_2, KP_3, KNTR, _________________, + ____, ____, ____, /*-----------------*/KC_KP_0/*-----------------*/, KDOT, KNTR, ____, ____), [GAMING]= - LAYOUT( - KC_ESC, 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_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_TRNS, 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_LSHIFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, KC_NO, - KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_NO, KC_NO, TO(BASE)), + LAYOUT_60_ansi( + _____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ______, + ______, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, _____, + KCNO, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ___________, + ________, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, _________________, + ____, KCNO, ____, /*------------------*/_____/*------------------*/, ____, KCNO, ____, QWRTY), - [FN_LAYER]= - LAYOUT( - 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_TRNS, KC_DEL, - KC_CAPSLOCK, KC_MPRV, KC_MPLY, KC_MNXT, LWIN(KC_R), KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_BRK, KC_TRNS, - KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, MO(LAYER_SEL), - 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_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HYPR, KC_TRNS, KC_MEH, KC_TRNS), - - [LAYER_SEL]= - LAYOUT( - TO(BASE), TO(NAV_CLUSTER), TO(RGB), TO(MOUSE), TO(GAMING), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + [SQLMACROS]= + LAYOUT_60_ansi( + S_ALTER, ____, ____, ____, ____, ____, ____, ____, S_ASTRK, ____, ____, ____, ____, ___________, + ______, ____, S_WHERE, ____, ____, ____, ____, ____, S_INRJN, S_ORDER, ____, ____, ____, ______, + _______, KC_LBRC, S_SLCT, KC_PAST,S_FROM, ____, ____, ____, ____, S_LFTJN, ____, RBRC, ___________, + ________, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, _________________, + ____, ____, ____, /*------------------*/_____/*------------------*/, ____, ____, ____, ____), + [SQLNAMES]= + LAYOUT_60_ansi( + TD_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, TD_BSPC, + ________, TD_Q, TD_W, TD_E, TD_R, TD_T, TD_Y, TD_U, TD_I, TD_O, TD_P, ____, ____, _____, + ___________, TD_A, TD_S, TD_D, TD_F, TD_G, TD_H, TD_J, TD_K, TD_L, ____, ____, TD_ENT, + ___________, TD_Z, TD_X, TD_C, TD_V, TD_B, TD_N, TD_M, ____, ____, ____, _________________, + ____, ____, ____, /*----------------------*/TD_ENT/*-----------------------*/, ____, ____, ____, RESET), + + [FN_LAYER]= + LAYOUT_60_ansi( + 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, + KC_CAPSLOCK, KC_MPRV, KC_MPLY, KC_MNXT, LWIN(KC_R), ____, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_BRK, ____, + ____, KC_VOLD, KC_MUTE, KC_VOLU, ____, ____, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, ____, + ____, ____, ____, ____, ____, ____, KC_END, ____, QWRTY, NAVS, GAME, ____, + ____, ____, ____, _________________, ____, KC_HYPR, KC_MEH, ____) }; diff --git a/keyboards/dz60/keymaps/marianas/keymap.h b/keyboards/dz60/keymaps/marianas/keymap.h new file mode 100644 index 0000000000..01de5c6e2c --- /dev/null +++ b/keyboards/dz60/keymaps/marianas/keymap.h @@ -0,0 +1,103 @@ +//Control +#define MO_FNLR MO(FN_LAYER) +#define BACKSPC KC_BSPC +#define ENTER_OR_SQL LT(SQLMACROS,KC_ENT) +#define ESCAP KC_ESC +#define PSCR KC_PSCREEN +#define SCRL KC_SCROLLLOCK +#define PAUS KC_PAUSE +#define NSRT KC_INSERT +#define HOME KC_HOME +#define PGUP KC_PGUP +#define PGDN KC_PGDN +#define END_ KC_END +#define DELT KC_DELETE +#define UPUP KC_UP +#define D_WN KC_DOWN +#define LEFT KC_LEFT +#define RGHT KC_RIGHT + +//KEYPAD +#define KP_1 KC_KP_1 +#define KP_2 KC_KP_2 +#define KP_3 KC_KP_3 +#define KP_4 KC_KP_4 +#define KP_5 KC_KP_5 +#define KP_6 KC_KP_6 +#define KP_7 KC_KP_7 +#define KP_8 KC_KP_8 +#define KP_9 KC_KP_9 +#define KP_0 KC_KP_0 +#define NMLK KC_NUMLOCK +#define STAR KC_KP_ASTERISK +#define KSSH KC_KP_SLASH +#define KMIN KC_KP_MINUS +#define PLUS KC_KP_PLUS +#define KNTR KC_KP_ENTER +#define KDOT KC_KP_DOT + +//Modifiers +#define CTLL KC_LCTL +#define LEFTSHFT KC_LSPO +#define WINL KC_LGUI +#define ALTL KC_LALT +#define CTLR KC_RCTL +#define RIGHT_SHIFT__PAREN KC_RSPC +#define WINR KC_RGUI +#define ALTR KC_RALT +#define APPR KC_APP + + +//Punctuation +#define CMMA KC_COMM +#define PRRD KC_DOT +#define SLSH KC_SLSH +#define QUOT KC_QUOT +#define COLN KC_SCLN +#define LBRC KC_LBRC +#define RBRC KC_RBRC +#define EQUL KC_EQL +#define MNUS KC_MINS +#define BSLASH KC_BSLS + +//Layers +#define QWRTY TO(QWERTY) +#define NAVS TO(NAV_CLUSTER) +#define GAME TO(GAMING) + +//Space +#define ____ KC_TRNS +#define _____ KC_TRNS +#define ______ KC_TRNS +#define _______ KC_TRNS +#define ________ KC_TRNS +#define ___________ KC_TRNS +#define _________________ KC_TRNS +#define SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE KC_SPC +#define KCNO KC_NO + + + + + +#define macroTapsLen 32 +#define tableNameListLen 32 +#define charCountLen 32 + +void initStringData(void); +uint32_t layer_state_set_user(uint32_t state); +bool containsCode(uint16_t kc); +bool lastCodeIs(uint16_t kc); +bool last2CodeAre(uint16_t kc); +bool last2CodesAre(uint16_t kc, uint16_t kc2); +void addKeyCode(uint16_t kc); +void eraseKeyCodes(void); +void eraseCharCounts(void); +void printTableAbbreviation(void); +void eraseTableAbbreviation(void); +void printString(char* str); +void printStringAndQueueChar(char* str); +void ReplaceString(char *orig, char *repl); +void deletePrev(void); +void processSmartMacroTap(uint16_t kc); +bool process_record_user(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/dz60/keymaps/marianas/rules.mk b/keyboards/dz60/keymaps/marianas/rules.mk new file mode 100644 index 0000000000..ab188f3b2c --- /dev/null +++ b/keyboards/dz60/keymaps/marianas/rules.mk @@ -0,0 +1,17 @@ +# 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = no +AUTO_SHIFT_ENABLE = no -- cgit v1.2.1 From 53a43dbe995640632be834f406007a72f8fa4d3e Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Thu, 18 Oct 2018 13:53:40 -0700 Subject: Keymap: Swap func layer keys and add vim navigation to navigation layer (#4163) --- keyboards/dz60/keymaps/crd/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/crd/keymap.c b/keyboards/dz60/keymaps/crd/keymap.c index a17d32caaf..2aedc0b728 100644 --- a/keyboards/dz60/keymaps/crd/keymap.c +++ b/keyboards/dz60/keymaps/crd/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL | * |-----------------------------------------------------------------------------------------+ - * | FN2 | Alt | Cmd | Space | Cmd | FN1 | L | D | R | + * | FN1 | Alt | Cmd | Space | Cmd | FN2 | L | D | R | * `-----------------------------------------------------------------------------------------' */ @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, CTL_T(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, KC_RSFT, KC_UP, KC_DEL, - MO(2), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT ), /* FN1 Layer @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | + * | | | | | | | L | D | U | R | | | | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | | | | | |PgUp | | * |-----------------------------------------------------------------------------------------+ @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_directional( 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END ), -- cgit v1.2.1 From 9ca73a9edcb8cfaeba13baae16b8c8cc5c9fafe6 Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 19 Oct 2018 19:57:44 +0200 Subject: Keymap: Add dz60 iso-de layout (#4173) --- keyboards/dz60/keymaps/iso_de_andys8/README.md | 3 ++ keyboards/dz60/keymaps/iso_de_andys8/keymap.c | 38 ++++++++++++++++++++++++++ keyboards/dz60/keymaps/iso_de_andys8/rules.mk | 15 ++++++++++ 3 files changed, 56 insertions(+) create mode 100644 keyboards/dz60/keymaps/iso_de_andys8/README.md create mode 100644 keyboards/dz60/keymaps/iso_de_andys8/keymap.c create mode 100644 keyboards/dz60/keymaps/iso_de_andys8/rules.mk (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/iso_de_andys8/README.md b/keyboards/dz60/keymaps/iso_de_andys8/README.md new file mode 100644 index 0000000000..504726adf5 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_andys8/README.md @@ -0,0 +1,3 @@ +# ISO DE layout + +This layout is ISO-DE and similar to a standard 60 ISO layout. There are vim style arrow keys on the function layer. The bottom right is the expected default. diff --git a/keyboards/dz60/keymaps/iso_de_andys8/keymap.c b/keyboards/dz60/keymaps/iso_de_andys8/keymap.c new file mode 100644 index 0000000000..3039914c6f --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_andys8/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* ISO 60 layout by andys8 (ISO German keyboard layout shown) + * + * This layout starts from a standard ISO 60% layout, and adds a function layer. + * + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 ! | 2 " | 3 § | 4 $ | 5 % | 6 & | 7 / | 8 ( | 9 ) | 0 = | ß ? | ´ ` | Backspace | + * |-----------------------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Z | U | I | O | P | Ä | + * | Enter | + * |---------------------------------------------------------------------------------- | + * | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ü | # ' | | + * |-----------------------------------------------------------------------------------------| + * | Shift | < > | Y | X | C | V | B | N | M | , ; | . : | - _ | Shift | + * |-----------------------------------------------------------------------------------------| + * | LCtl | LGUI | LAlt | Space | RAlt | RGUI | App | RCtl | + * `-----------------------------------------------------------------------------------------' + */ + LAYOUT_60_iso( + KC_ESC, 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, + 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_BSLS, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + + + LAYOUT_60_iso( + 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, + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_DEL, KC_NO, KC_NO, + KC_LSFT, BL_TOGG, KC_APP, KC_PAUS, KC_INS, KC_NO, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + +}; diff --git a/keyboards/dz60/keymaps/iso_de_andys8/rules.mk b/keyboards/dz60/keymaps/iso_de_andys8/rules.mk new file mode 100644 index 0000000000..b5f45d7aa8 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_andys8/rules.mk @@ -0,0 +1,15 @@ +# 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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no +AUTO_SHIFT_ENABLE = no # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted +TAP_DANCE_ENABLE = no -- cgit v1.2.1 From 0d1e0a0d972c77231062e2ff84742f168a6010a6 Mon Sep 17 00:00:00 2001 From: mcarni Date: Fri, 19 Oct 2018 21:05:34 +0200 Subject: added an ISO split spacebar layout, keymap and readme files (#4165) --- .../dz60/keymaps/iso_split-spacebar/README.md | 69 ++++++++ keyboards/dz60/keymaps/iso_split-spacebar/keymap.c | 193 +++++++++++++++++++++ 2 files changed, 262 insertions(+) create mode 100644 keyboards/dz60/keymaps/iso_split-spacebar/README.md create mode 100644 keyboards/dz60/keymaps/iso_split-spacebar/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/README.md b/keyboards/dz60/keymaps/iso_split-spacebar/README.md new file mode 100644 index 0000000000..7d96f2225f --- /dev/null +++ b/keyboards/dz60/keymaps/iso_split-spacebar/README.md @@ -0,0 +1,69 @@ +# iso layout with a split spacebar + +i needed to have an ISO layout +and i wanted to have a split spacebar +i couldn't find anything ready so i cobbled this together + + + +---- Layer 0 - BL +this is basically the standard iso layout with the addition of the split spacebar +menu key (KC_APP) is used to move to the next layer +the key in between the two spacebars is the function key + *,-----------------------------------------------------------. + *| ' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp | + *|-----------------------------------------------------------| + *| Tab | q | w | e | r | t | y | u | i | o | p | [ | ] |enter| + *|------------------------------------------------------ | + *| Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | | + *|-----------------------------------------------------------| + *|Shft| < | z | x | c | v | b | n | m | , | . | / | Shift | + *|-----------------------------------------------------------| + *|Ctrl|Gui |Alt | Space | FN | Space |Alt |Gui | NL |Ctrl | + *`-----------------------------------------------------------' + +---- Layer 1 - FL +quite standard function layer +arrow keys and mouse movement/buttons on the home row + *,-----------------------------------------------------------. + *|ESC|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | + *|-----------------------------------------------------------| + *| | | | | | | | | | |prt| | | | + *|------------------------------------------------------ | + *| |m l|m d|m u|m r| | | l | d | u | r | | | | + *|-----------------------------------------------------------| + *| | | | | |mb1|mb2| |hm |pgd|pgu|end| | + *|-----------------------------------------------------------| + *| | | | | | | | | | | + *`-----------------------------------------------------------' + +---- Layer 2 - NL +numbers numbers numbers... +first key (top left) to return to BL +menu key (KC_APP) is used to move to the next layer + *,-----------------------------------------------------------. + *|BL | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | + *|-----------------------------------------------------------| + *| | 4 | 5 | 6 | * | / | | 4 | 5 | 6 | * | / | ] | | + *|------------------------------------------------------ | + *| | 7 | 8 | 9 | + | - | | 1 | 2 | 3 | + | - | | | + *|-----------------------------------------------------------| + *| | | 0 | , | . | = | | | 0 | , | . | = | | + *|-----------------------------------------------------------| + *| | | | | | | | | RL | | + *`-----------------------------------------------------------' + +---- Layer 3 - BL +all the fancy lights +and useful reset button (top right) + *,-----------------------------------------------------------. + *|BL | | | | | | | | | | | | |Reset | + *|-----------------------------------------------------------| + *| |tog|mod|hui|hud| | |sai|sad|vai|vad| | | | + *|------------------------------------------------------ | + *| |sta|bre|rai|swi| | |sna|kni|gra|xms| | | | + *|-----------------------------------------------------------| + *| | |bd |bt |bi |bs | | | | | | | | + *|-----------------------------------------------------------| + *| | | | | | | | | BL | | + *`-----------------------------------------------------------' diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c new file mode 100644 index 0000000000..7c17a6f5f8 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c @@ -0,0 +1,193 @@ +// using as reference +// https://docs.qmk.fm/#/keymap + +// thanks to atlacat, hailbreno, itsaferbie and weeheavy... + +// and special thanks to AGausmann and drashna for the layer-activated RGB underglow +// https://www.reddit.com/r/olkb/comments/6t1vdu/update_layeractivated_rgb_underglow/ +// https://github.com/AGausmann/qmk_firmware/blob/agausmann-v3.x/keyboards/nyquist/keymaps/agausmann/keymap.c + +#include QMK_KEYBOARD_H + + +// Helpful defines +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +/* +* Each layer gets a name for readability. +* The underscores don't mean anything - you can +* have a layer called STUFF or any other name. +* Layer names don't all need to be of the same +* length, and you can also skip them entirely +* and just use numbers. +* +*/ +#define BL 0 // Base Layer +#define FL 1 // Function Layer +#define NL 2 // Numpad Layer +#define RL 3 // RGB Layer + +/* +* Let's give an easier name to the RGB modes +* and assign the ones we want to the different layer +* these will then be used by the function below +* +*/ +#define RGB_STA RGB_M_P //rgb static +#define RGB_BRE RGB_M_B //rgb breathe +#define RGB_RAI RGB_M_R //rgb rainbow +#define RGB_SWI RGB_M_SW //rgb swirl +#define RGB_SNA RGB_M_SN //rgb snake +#define RGB_KNI RGB_M_K //rgb knight +#define RGB_GRA RGB_M_G //rgb gradient +#define RGB_XMS RGB_M_X //rgb christmas +// +#define RGB_BL_MODE rgblight_mode_noeeprom(3) //rgb mode for BL layer +#define RGB_BL_LIGHT rgblight_sethsv_noeeprom_turquoise() //rgb light for BL layer +// +#define RGB_FL_MODE rgblight_mode_noeeprom(1) //rgb mode for FL layer +#define RGB_FL_LIGHT rgblight_sethsv_noeeprom_orange() //rgb light for FL layer +// +#define RGB_NL_MODE rgblight_mode_noeeprom(12) //rgb mode for NL layer +#define RGB_NL_LIGHT rgblight_sethsv_noeeprom_turquoise() //rgb light for NL layer +// +#define RGB_RL_MODE rgblight_mode_noeeprom(22) //rgb mode for RL layer +#define RGB_RL_LIGHT rgblight_sethsv_noeeprom_red() //rgb light for RL layer + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Keymap BL: Base Layer (Default Layer) + * + * ,-----------------------------------------------------------. + * | ' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp | + * |-----------------------------------------------------------| + * | Tab | q | w | e | r | t | y | u | i | o | p | [ | ] |enter| + * |------------------------------------------------------ | + * | Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | | + * |-----------------------------------------------------------| + * |Shft| < | z | x | c | v | b | n | m | , | . | / | Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space | FN | Space |Alt |Gui | NL |Ctrl | + * `-----------------------------------------------------------' + */ + [BL] = LAYOUT_60_iso_split( + // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(FL), KC_SPC, KC_RALT, KC_RGUI, TO(NL), KC_RCTL), + + /* Keymap FL: Function Layer + * + * ,-----------------------------------------------------------. + * |ESC|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | + * |-----------------------------------------------------------| + * | | | | | | | | | | |prt| | | | + * |------------------------------------------------------ | + * | |m l|m d|m u|m r| | | l | d | u | r | | | | + * |-----------------------------------------------------------| + * | | | | | |mb1|mb2| |hm |pgd|pgu|end| | + * |-----------------------------------------------------------| + * | | | | | | | | | | | + * `-----------------------------------------------------------' + */ + [FL] = LAYOUT_60_iso_split( + // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + 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_PSCR, _______, _______, + _______, KC_MS_LEFT,KC_MS_DOWN,KC_MS_UP, KC_MS_RIGHT,_______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MS_BTN1,KC_MS_BTN2,_______, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Keymap NL: Numpad Layer + * + * ,-----------------------------------------------------------. + * |BL | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | + * |-----------------------------------------------------------| + * | | 4 | 5 | 6 | * | / | | 4 | 5 | 6 | * | / | ] | | + * |------------------------------------------------------ | + * | | 7 | 8 | 9 | + | - | | 1 | 2 | 3 | + | - | | | + * |-----------------------------------------------------------| + * | | | 0 | , | . | = | | | 0 | , | . | = | | + * |-----------------------------------------------------------| + * | | | | | | | | | RL | | + * `-----------------------------------------------------------' + */ + [NL] = LAYOUT_60_iso_split( + // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + TG(NL), 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_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______, KC_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______, + _______, KC_7, KC_8, KC_9, KC_PPLS, KC_PMNS, _______, KC_1, KC_2, KC_3, KC_PPLS, KC_PMNS, _______, _______, + _______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______, + _______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______), + + /* Keymap RL: RGB Layer + * + * ,-----------------------------------------------------------. + * |BL | | | | | | | | | | | | |Reset | + * |-----------------------------------------------------------| + * | |tog|mod|hui|hud| | |sai|sad|vai|vad| | | | + * |------------------------------------------------------ | + * | |sta|bre|rai|swi| | |sna|kni|gra|xms| | | | + * |-----------------------------------------------------------| + * | | |bd |bt |bi |bs | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | BL | | + * `-----------------------------------------------------------' + */ + [RL] = LAYOUT_60_iso_split( + // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + TG(RL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, + _______, RGB_STA, RGB_BRE, RGB_RAI, RGB_SWI, _______, _______, RGB_SNA, RGB_KNI, RGB_GRA, RGB_XMS, _______, _______, _______, + _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, MO(FL), _______, _______, _______, TO(BL), _______), + + +}; + + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + + +// layer-activated RGB underglow + +void matrix_scan_user(void) { + + #ifdef RGBLIGHT_ENABLE + + static uint8_t old_layer = 1; + uint8_t new_layer = biton32(layer_state); + + if (old_layer != new_layer) { + switch (new_layer) { + case BL: + RGB_BL_MODE; + RGB_BL_LIGHT; + break; + case FL: + RGB_FL_MODE; + RGB_FL_LIGHT; + break; + case NL: + RGB_NL_MODE; + // RGB_NL_LIGHT; + break; + case RL: + RGB_RL_MODE; + // RGB_RL_LIGHT; + break; + } + + old_layer = new_layer; + } + + #endif //RGBLIGHT_ENABLE + +} -- cgit v1.2.1 From cb1e45b4efdc685134c0dbc35100e2fb99c5b006 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 22 Oct 2018 14:07:18 -0700 Subject: Include quantum.h to fix travis CI errors --- keyboards/dz60/keymaps/marianas/keymap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/marianas/keymap.h b/keyboards/dz60/keymaps/marianas/keymap.h index 01de5c6e2c..00e51cea2c 100644 --- a/keyboards/dz60/keymaps/marianas/keymap.h +++ b/keyboards/dz60/keymaps/marianas/keymap.h @@ -1,3 +1,5 @@ +#include "quantum.h" + //Control #define MO_FNLR MO(FN_LAYER) #define BACKSPC KC_BSPC -- cgit v1.2.1 From b0a021c07aa38905090058bd57b9304425594557 Mon Sep 17 00:00:00 2001 From: Ajax Date: Tue, 23 Oct 2018 15:44:48 -0400 Subject: Made a userspace that allows you to use your keyboard as an order of operations based calculator (#2864) * Made DZ60 layout with calculator * Cleaned up and commented, preparing to fix bug with negative in front of open parenthesis as first character * Fixed bug where negative sign infront of parenthesis as first character was parsed incorrectly * Made a better solution for the bug from the previous commit * Modularized and added a userfile so that this code can be used on various keyboards, found in doogle999 * Removed commented code from keymap * Made the layer that is used for calculations a define so that it can be changed per keyboard * Made the readme * Made the readme in the correct place * Revert "Made the readme in the correct place" This reverts commit 7f8b59ed9e59c77401a48be3a7ac1e8fd8e84e32. * Manually synced with qmk upstream * Stopped repeat, made keys print character that they are defined as rather than what the keyboard wants them to do * Added support for numpad, might make all keycodes custom so that there is no need to change doogle999.c if you want to change the keycode that is associated with a function, also made numpad automatically activating an option * Fixed some bugs with backspacing, updated the readme * Fixed some bugs with numlock turning on at the wrong times when a shift key was down * Made the return to layer work automatically instead of just forcing it to layer 0 * fixes and style changes, 20% decreased binary size * Fixed some bugs with double printing and compilation errors on my side * Fixed bug with exceeding the buffer size * Removed changes that added const-ness * Made changes so that backspace does not repeat to remove backspace bugs, still some bugs with recalculating without having typed anything * Fixed obo error with calc main loop * Made includes more accurate in keymap for dz60 * Moved flags to user makefile --- keyboards/dz60/keymaps/doogle999/keymap.c | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 keyboards/dz60/keymaps/doogle999/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/doogle999/keymap.c b/keyboards/dz60/keymaps/doogle999/keymap.c new file mode 100644 index 0000000000..deea641f70 --- /dev/null +++ b/keyboards/dz60/keymaps/doogle999/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H + +#include "doogle999.h" + +#define ______ KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base layer + * ,-----------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |-----------------------------------------------------------------------------------------+ + * | 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 | U | Del | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Cmd | Alt | Space | / | Fn | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + KC_ESC, 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, + 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_RSFT, KC_UP, KC_DELETE, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SLSH, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + +/* Fn layer + * ,-----------------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10 | F11 | F12 | Backspace | + * |-----------------------------------------------------------------------------------------+ + * | Reset | NP1 | NP2 | NP3 | NP4 | NP5 | NP6 | NP7 | NP8 | NP9 | NP0 |VolD |VolU | Mute | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | BlD | BlI | BlT | Menu | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Cyc+| Cyc-| Val+| Val-| Hue+| Hue-| Sat+| Sat-| Tog | Shift | Pup | Ins | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Cmd | Alt | Space |HwCal| |Home | Pdn | End | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + 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_CALC, + RESET, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, KC_VOLD, KC_VOLU, KC_MUTE, + ______, ______, ______, ______, ______, ______, ______, ______, ______, BL_DEC, BL_INC, BL_TOGG, KC_APP, + KC_LSFT, ______, RGB_MOD, RGB_RMOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_TOG, KC_RSFT, KC_PGUP, KC_INSERT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, TO(2), ______, KC_HOME, KC_PGDOWN, KC_END + ), + + /* Hardware calculator layer + * ,-----------------------------------------------------------------------------------------. + * |EndCa| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |-----------------------------------------------------------------------------------------+ + * | | Q | | E | | T | | | | | P | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | S | | | | | | | L | | | Calc | + * |-----------------------------------------------------------------------------------------+ + * | Shift | | | | C | | | | | . | Shift | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | / | | | | | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + ENDCALC, 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_Q, ______, KC_E, ______, KC_T, ______, ______, ______, ______, KC_P, ______, ______, ______, + ______, ______, KC_S, ______, ______, ______, ______, ______, ______, KC_L, ______, ______, CALC, + KC_LSFT, ______, ______, ______, KC_C, ______, ______, ______, ______, ______, KC_DOT, KC_RSFT, ______, ______, + ______, ______, ______, ______, ______, ______, KC_SLSH, ______, ______, ______, ______ + ), +}; \ No newline at end of file -- cgit v1.2.1 From 569545a78f24644b1b130369d53932f7f46a588a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDan=20Pevec?= Date: Sat, 27 Oct 2018 17:30:47 +0200 Subject: Keymap: Personal dz60 keymap (#4251) * Personal dz60 keymap * Replacing unused macros Co-Authored-By: pevecyan * Fixes on keymap --- keyboards/dz60/keymaps/pevecyan/keymap.c | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 keyboards/dz60/keymaps/pevecyan/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/pevecyan/keymap.c b/keyboards/dz60/keymaps/pevecyan/keymap.c new file mode 100644 index 0000000000..897b6260ba --- /dev/null +++ b/keyboards/dz60/keymaps/pevecyan/keymap.c @@ -0,0 +1,41 @@ + +#include QMK_KEYBOARD_H +#include "keymap_slovenian.h" + + +#define CARON LT(3, SI_CIRC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( \ + KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QOT, SI_PLUS,XXXXXXX,KC_BSPC, \ + KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \ + MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN,KC_QUOT,KC_ENT, \ + KC_LSFT,XXXXXXX,SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM,SI_DOT, SI_MINS, KC_RSFT,XXXXXXX, \ + KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \ + ), + + [1] = LAYOUT( \ + 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, \ + _______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,RESET, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,BL_DEC, BL_TOGG,BL_INC, BL_STEP,_______,_______,_______,_______, _______,_______, \ + _______,_______, _______,_______, _______, _______, _______,_______,_______,_______,_______ \ + ), + + [2] = LAYOUT( \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, KC_BSPC,KC_UP, KC_DEL, _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME, KC_END, \ + _______, KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______,_______, _______,_______, _______, _______, _______,_______,_______,_______,_______ \ + ), + + [3] = LAYOUT( \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,_______,_______,_______,_______,SI_ZV, _______,_______,_______,_______,_______,_______,_______, \ + _______, _______,SI_SV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,SI_CV, _______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______,_______, _______,_______, _______, _______, _______,_______,_______,_______,_______ \ + ), +}; -- cgit v1.2.1 From 31ff5f219ddcbdac183c7f3ad6cea8eca1b9d398 Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Tue, 30 Oct 2018 08:22:25 -0700 Subject: Move grave to top layer (caps is esc) (#4288) --- keyboards/dz60/keymaps/crd/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/crd/keymap.c b/keyboards/dz60/keymaps/crd/keymap.c index 2aedc0b728..148b03b995 100644 --- a/keyboards/dz60/keymaps/crd/keymap.c +++ b/keyboards/dz60/keymaps/crd/keymap.c @@ -4,7 +4,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | * |-----------------------------------------------------------------------------------------+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | * |-----------------------------------------------------------------------------------------+ @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_directional( - 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, + 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, CTL_T(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, KC_RSFT, KC_UP, KC_DEL, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FN1 Layer * ,-----------------------------------------------------------------------------------------. - * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------+ @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_directional( - 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, -- cgit v1.2.1 From f2fda1bd56c97019777fb2a028d088ae37693b0f Mon Sep 17 00:00:00 2001 From: Jarred Steenvoorden Date: Mon, 5 Nov 2018 19:05:48 +1100 Subject: Keymap update Adding RGB underglow controls. (#4358) * Update userspace with common config.h * Add my dz60, satan and xd75 keyboard keymaps * Fixing executable bits changed during last upstream merge * Cleanup unnecessary files and defines * Remove unnecessary defines from userspace config * Add underglow controls to dz60 function layer * Fixing merge conflicts * Fixing exectable bits changed during merge --- keyboards/dz60/keymaps/jarred/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/jarred/keymap.c b/keyboards/dz60/keymaps/jarred/keymap.c index 9e68506831..2ef6794934 100644 --- a/keyboards/dz60/keymaps/jarred/keymap.c +++ b/keyboards/dz60/keymaps/jarred/keymap.c @@ -13,9 +13,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT,KC_RGUI, XXXXXXX,KC_APP, KC_RCTL), [_NV] = LAYOUT( - 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 ,KC_BSPC,_______,KC_HOME,KC_UP ,KC_END ,KC_INS ,_______,_______,_______, - _______,_______,_______,KC_LSFT,KC_LCTL,KC_ENT ,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_DEL ,KC_DEL , _______, - _______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,_______,_______,_______, - _______,_______,_______, _______,_______,_______, _______,_______,_______, RESET, _______) + 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 ,XXXXXXX,_______, + _______,RGB_TOG,RGB_MOD,_______,KC_DEL ,KC_BSPC,_______,KC_HOME,KC_UP ,KC_END ,KC_INS ,_______,_______,_______, + _______,RGB_HUI,RGB_HUD,KC_LSFT,KC_LCTL,KC_ENT ,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_DEL ,KC_DEL , _______, + _______,XXXXXXX,RGB_SAD,RGB_SAI,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,_______,_______,XXXXXXX, + _______,RGB_VAD,RGB_VAI, _______,_______,_______, _______,_______,XXXXXXX, RESET,_______) }; -- cgit v1.2.1 From 8f5ac39fb90e9036a9df60f286888e02daf3fd1b Mon Sep 17 00:00:00 2001 From: TheOneTrueTrench <38593283+TheOneTrueTrench@users.noreply.github.com> Date: Tue, 6 Nov 2018 20:01:18 +0000 Subject: separated all my changes into separate files, working on generalizing my relativity macros. (#4368) * Updating to my local changes. * Added auto-complete for joins. * Added lights to imply current state better --- keyboards/dz60/keymaps/marianas/customLogic.c | 138 ++++++ keyboards/dz60/keymaps/marianas/customLogic.h | 10 + keyboards/dz60/keymaps/marianas/keyDefinitions.h | 124 ++++++ keyboards/dz60/keymaps/marianas/keymap.c | 521 +---------------------- keyboards/dz60/keymaps/marianas/keymap.h | 114 +---- keyboards/dz60/keymaps/marianas/relativity.c | 510 ++++++++++++++++++++++ keyboards/dz60/keymaps/marianas/relativity.h | 32 ++ keyboards/dz60/keymaps/marianas/rules.mk | 4 + 8 files changed, 839 insertions(+), 614 deletions(-) create mode 100644 keyboards/dz60/keymaps/marianas/customLogic.c create mode 100644 keyboards/dz60/keymaps/marianas/customLogic.h create mode 100644 keyboards/dz60/keymaps/marianas/keyDefinitions.h create mode 100644 keyboards/dz60/keymaps/marianas/relativity.c create mode 100644 keyboards/dz60/keymaps/marianas/relativity.h (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/marianas/customLogic.c b/keyboards/dz60/keymaps/marianas/customLogic.c new file mode 100644 index 0000000000..b7dbcac95b --- /dev/null +++ b/keyboards/dz60/keymaps/marianas/customLogic.c @@ -0,0 +1,138 @@ +#include QMK_KEYBOARD_H +#include "customLogic.h" +#include "keymap.h" +#include "keyDefinitions.h" +#include "relativity.h" +#include "timer.h" + +static int16_t fnTimer = 0; + + + +uint32_t layer_state_set_user(uint32_t state) +{ + switch (biton32(state)) + { + case QWERTY: + rgblight_mode(9); + break; + case NAV_CLUSTER: + rgblight_mode(29); + break; + case GAMING: + rgblight_mode(26); + break; + case SQLMACROS: + rgblight_mode(1); + break; + case FN_LAYER: + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL+5); + break; + } + return state; +} + + + +bool printSqlVerbs(uint16_t keycode, keyrecord_t *record) +{ + if (record->event.pressed) + { + switch (keycode) + { + case S_LFTJN: + SEND_STRING("LEFT JOIN"); + activateRelativity(); + return false; + case S_INRJN: + SEND_STRING("INNER JOIN "); + activateRelativity(); + return false; + case S_SLCT: + SEND_STRING("SELECT "); return + false; + case S_FROM: + SEND_STRING("FROM "); return + false; + case S_DSNCT: + SEND_STRING("DISTINCT "); return + false; + case S_ORDER: + SEND_STRING("ORDER BY "); return + false; + case S_WHERE: + SEND_STRING("WHERE "); return + false; + case S_ALTER: + SEND_STRING("ALTER SESSION SET CURRENT_SCHEMA = SUPPLY;"); return false; + case S_ASTRK: + SEND_STRING("* "); return false; + + } + } + return true; +} + + +bool isFn = false; +bool didFn = false; + + +bool updateLayerState(uint16_t keycode, keyrecord_t *record) +{ + + if (record->event.pressed) + { + switch (keycode) + { + case FN_QT: + fnTimer = timer_read(); + layer_on(FN_LAYER); + isFn = true; + return false; + } + if (isFn) + { + didFn = true; + return true; + } + } + else + { + switch(keycode) + { + case FN_QT: + layer_off(FN_LAYER); + if (!didFn) + { + #if fnTimeout + if (TIMER_DIFF_16(timer_read(), fnTimer) <= fnTimeout) + { + activateRelativity(); + } + else + { + deactivateRelativity(); + } + #else + activateRelativity(); + #endif + } + didFn = false; + isFn = false; + return false; + } + } + return true; +} + + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + return + storeShiftState(keycode, record) && + printSqlVerbs(keycode, record) && + updateLayerState(keycode, record) && + handleSmartMacros(keycode, record); +} diff --git a/keyboards/dz60/keymaps/marianas/customLogic.h b/keyboards/dz60/keymaps/marianas/customLogic.h new file mode 100644 index 0000000000..f0e6ecdcac --- /dev/null +++ b/keyboards/dz60/keymaps/marianas/customLogic.h @@ -0,0 +1,10 @@ +#define fnTimeout 500 + + +uint32_t layer_state_set_user(uint32_t state); + +bool printSqlVerbs(uint16_t keycode, keyrecord_t *record); + +bool updateLayerState(uint16_t keycode, keyrecord_t *record); + +bool process_record_user(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/dz60/keymaps/marianas/keyDefinitions.h b/keyboards/dz60/keymaps/marianas/keyDefinitions.h new file mode 100644 index 0000000000..010ace7694 --- /dev/null +++ b/keyboards/dz60/keymaps/marianas/keyDefinitions.h @@ -0,0 +1,124 @@ + +//Control +#define MO_FNLR MO(FN_LAYER) +#define BACKSPC KC_BSPC +#define ENTER_OR_SQL LT(SQLMACROS,KC_ENT) +#define ESCAP KC_ESC +#define PSCR KC_PSCREEN +#define SCRL KC_SCROLLLOCK +#define PAUS KC_PAUSE +#define NSRT KC_INSERT +#define HOME KC_HOME +#define PGUP KC_PGUP +#define PGDN KC_PGDN +#define END_ KC_END +#define DELT KC_DELETE +#define UPUP KC_UP +#define D_WN KC_DOWN +#define LEFT KC_LEFT +#define RGHT KC_RIGHT + +//KEYPAD +#define KP_1 KC_KP_1 +#define KP_2 KC_KP_2 +#define KP_3 KC_KP_3 +#define KP_4 KC_KP_4 +#define KP_5 KC_KP_5 +#define KP_6 KC_KP_6 +#define KP_7 KC_KP_7 +#define KP_8 KC_KP_8 +#define KP_9 KC_KP_9 +#define KP_0 KC_KP_0 +#define NMLK KC_NUMLOCK +#define STAR KC_KP_ASTERISK +#define KSSH KC_KP_SLASH +#define KMIN KC_KP_MINUS +#define PLUS KC_KP_PLUS +#define KNTR KC_KP_ENTER +#define KDOT KC_KP_DOT + +//Modifiers +#define CTLL KC_LCTL +#define LEFTSHFT KC_LSPO +#define WINL KC_LGUI +#define ALTL KC_LALT +#define CTLR KC_RCTL +#define RIGHT_SHIFT__PAREN KC_RSPC +#define WINR KC_RGUI +#define ALTR KC_RALT +#define APPR KC_APP + + +//Punctuation +#define CMMA KC_COMM +#define PRRD KC_DOT +#define SLSH KC_SLSH +#define QUOT KC_QUOT +#define COLN KC_SCLN +#define LBRC KC_LBRC +#define RBRC KC_RBRC +#define EQUL KC_EQL +#define MNUS KC_MINS +#define BSLASH KC_BSLS + +//Layers +#define QWRTY TO(QWERTY) +#define NAVS TO(NAV_CLUSTER) +#define GAME TO(GAMING) + +//Space +#define ____ KC_TRNS +#define _____ KC_TRNS +#define ______ KC_TRNS +#define _______ KC_TRNS +#define ________ KC_TRNS +#define ___________ KC_TRNS +#define _________________ KC_TRNS +#define SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE KC_SPC +#define KCNO KC_NO + +enum sql_macros { + S_LFTJN = SAFE_RANGE, // L + S_INRJN, // I + S_SLCT, // S + S_FROM, // F + S_DSNCT, // D + S_ORDER, // O + S_WHERE, // W + S_ALTER, // Esc + S_ASTRK, // * + + TD_A, + TD_B, + TD_C, // Corp, Corporation, Company + TD_D, // Distribution, Dist, Distributor + TD_E, + TD_F, + TD_G, // GlobalLookup + TD_H, + TD_I, // Instance, Item + TD_J, + TD_K, + TD_L, + TD_M, + TD_N, // NadRate + TD_O, + TD_P, // Product, Person, + TD_Q, // Darden + TD_R, + TD_S, // Supplier, Step + TD_T, // Task, Type + TD_U, + TD_V, + TD_W, // Workflow, + TD_X, + TD_Y, + TD_Z, + TD_BSPC, + TD_ENT, + TD_ESC, + + FN_QT +}; + +bool isShifted(void); diff --git a/keyboards/dz60/keymaps/marianas/keymap.c b/keyboards/dz60/keymaps/marianas/keymap.c index e40bc6897b..f86074b9c2 100644 --- a/keyboards/dz60/keymaps/marianas/keymap.c +++ b/keyboards/dz60/keymaps/marianas/keymap.c @@ -1,505 +1,10 @@ #include QMK_KEYBOARD_H #include "keymap.h" +#include "relativity.h" +#include "keyDefinitions.h" +#include "customLogic.h" -enum marianas_layers { - QWERTY, -/* - COLEMAK, - DVORAK, -*/ - NAV_CLUSTER, - GAMING, - SQLMACROS, - SQLNAMES, - FN_LAYER -}; - -enum sql_macros { - S_LFTJN = SAFE_RANGE, // L - S_INRJN, // I - S_SLCT, // S - S_FROM, // F - S_DSNCT, // D - S_ORDER, // O - S_WHERE, // W - S_ALTER, // Esc - S_ASTRK, // * - - TD_A, - TD_B, - TD_C, // Corp, Corporation, Company - TD_D, // Distribution, Dist, Distributor - TD_E, - TD_F, - TD_G, // GlobalLookup - TD_H, - TD_I, // Instance, Item - TD_J, - TD_K, - TD_L, - TD_M, - TD_N, // NadRate - TD_O, - TD_P, // Product, Person, - TD_Q, // Darden - TD_R, - TD_S, // Supplier, Step - TD_T, // Task, Type - TD_U, - TD_V, - TD_W, // Workflow, - TD_X, - TD_Y, - TD_Z, - TD_BSPC, - TD_ENT, - TD_ESC -}; - -uint16_t *macroTaps = 0; - -char *tableNameList = 0; - -uint8_t *charCount = 0; -uint8_t countPointer = 0; - -bool shifted = false; - -bool sendAbbr = false; - - -void initStringData(void) -{ - if (macroTaps == 0) - { - macroTaps = malloc(macroTapsLen*sizeof(uint16_t)); - for(int i = 0; i < macroTapsLen; i++) - { - macroTaps[i] = 0; - } - } - if (tableNameList == 0) - { - tableNameList = malloc(tableNameListLen*sizeof(char)); - for(int i = 0; i < tableNameListLen; i++) - { - tableNameList[i] = 0; - } - } - if (charCount == 0) - { - charCount = malloc(charCountLen*sizeof(uint8_t)); - for (int i = 0; i < charCountLen; i++) - { - charCount[i] = 0; - } - } -} - - -uint32_t layer_state_set_user(uint32_t state) -{ - switch (biton32(state)) - { - case QWERTY: - rgblight_mode(9); - break; - case NAV_CLUSTER: - rgblight_mode(29); - break; - case GAMING: - rgblight_mode(26); - break; - case SQLMACROS: - rgblight_mode(1); - rgblight_setrgb(0x00, 0xFF, 0x80); - break; - case SQLNAMES: - rgblight_mode(1); - rgblight_setrgb(0x80, 0xFF, 0x00); - break; - case FN_LAYER: - rgblight_mode(1); - rgblight_setrgb(0x00, 0x80, 0xFF); - break; - } - return state; -} - -bool containsCode(uint16_t kc) -{ - for (int i = 0; i < macroTapsLen && macroTaps[i] > 0; i++) - { - if (macroTaps[i] == kc) return true; - } - return false; -} - -bool lastCodeIs(uint16_t kc) -{ - for (int i = 0; i < macroTapsLen-1 && macroTaps[i] > 0; i++) - { - if (macroTaps[i] == kc && macroTaps[i+1] == 0) return true; - } - return false; -} - -bool last2CodeAre(uint16_t kc) -{ - for (int i = 0; i < macroTapsLen-2 && macroTaps[i] > 0; i++) - { - if (macroTaps[i] == kc && macroTaps[i+1] == kc && macroTaps[i+2] == 0) return true; - } - return false; -} - -bool last2CodesAre(uint16_t kc, uint16_t kc2) -{ - for (int i = 0; i < macroTapsLen-2 && macroTaps[i] > 0; i++) - { - if (macroTaps[i] == kc && macroTaps[i+1] == kc2 && macroTaps[i+2] == 0) return true; - } - return false; -} - -void addKeyCode(uint16_t kc) -{ - int i = 0; - while (i < macroTapsLen-2 && macroTaps[i] > 0) i++; - if (macroTaps[i] == 0) - { - macroTaps[i] = kc; - macroTaps[i+1] = 0; - } -} - -void eraseKeyCodes(void) -{ - int i = 0; - while (i < macroTapsLen && macroTaps[i] > 0) macroTaps[i++] = 0; -} - -void eraseCharCounts(void) -{ - int i = 0; - while (i < charCountLen) - { - charCount[i] = 0; - } -} - -void printTableAbbreviation(void) -{ - initStringData(); - if (tableNameList[0] == 0) - { - return; - } - send_char(0x20); - int i = 0; - for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) - { - if (tableNameList[i] >= 65 && tableNameList[i] <= 90) - { - send_char(tableNameList[i]+32); - } - else - { - send_char(tableNameList[i]); - } - } - send_char(0x20); -} - -void eraseTableAbbreviation(void) -{ - initStringData(); - for (int i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) - { - tableNameList[i] = '\0'; - } -} - -void printString(char* str) -{ - - if (str[0] != '\0') - { - int i = 0; - while (true) - { - if (str[i] == 0) - { - break; - } - send_char(str[i++]); - charCount[countPointer]++; - } - } -} - -void printStringAndQueueChar(char* str) -{ - initStringData(); - if (charCount[countPointer] != 0) - { - countPointer++; - } - sendAbbr = true; - if (str[0] != '\0') - { - printString(str); - - for (int i = 0; i < tableNameListLen-1; i++) - { - if (tableNameList[i] == '\0') - { - tableNameList[i] = str[0]; - tableNameList[i+1] = '\0'; - break; - } - else if (i == tableNameListLen-2) - { - printTableAbbreviation(); - break; - } - } - //for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) - //{ - // send_char(tableNameList[i]); - //} - //send_string_P("Darden"); - //send_string_P(&myarray); - //send_string_P(str); - } -} - -void ReplaceString(char *orig, char *repl) -{ - int i = 0; - while((orig[i] != 0x0 && repl[i] != 0x0) && orig[i] == repl[i]) - i++; - - if(orig[i] != 0x0) - { - int o = i; - while (orig[o++] != 0x0) { - charCount[countPointer]--; - register_code(KC_BSPC); - unregister_code(KC_BSPC); - } - } - printString(repl+i); -} - -void deletePrev(void) -{ - for (int i = 0; i < charCount[countPointer]; i++) - { - register_code(KC_BSPC); - unregister_code(KC_BSPC); - } - charCount[countPointer] = 0; - countPointer--; - int i = 1; - for (;i < tableNameListLen-1; i++) - { - if (tableNameList[i] == 0x0) - { - break; - } - } - tableNameList[i-1] = 0x0; -} - -void processSmartMacroTap(uint16_t kc) -{ - initStringData(); - switch(kc) - { - case TD_C: - if (containsCode(TD_D)) - { - printString("ribution"); - printStringAndQueueChar("Center"); - } - else if (last2CodeAre(TD_C)) - { - ReplaceString("Corporation", "Contact"); - } - else if(lastCodeIs(TD_C)) - { - printString("oration"); - } - else - { - printStringAndQueueChar("Corp"); - } - break; - case TD_D: - if (last2CodeAre(TD_D)) - { - ReplaceString("Distribution", "Distributor"); - } - else if(lastCodeIs(TD_D)) - { - printString("ribution"); - } - else - { - printStringAndQueueChar("Dist"); - } - break; - case TD_G: - printStringAndQueueChar("Global"); - printStringAndQueueChar("Lookup"); - break; - case TD_I: - if (containsCode(TD_W)) - printStringAndQueueChar("Instance"); - else - printStringAndQueueChar("Item"); - break; - case TD_N: - printStringAndQueueChar("NadRate"); - break; - case TD_P: - if (last2CodesAre(TD_D, TD_C)) - { - ReplaceString("DistributionCenter", "DistCenter"); - printStringAndQueueChar("Pricing"); - } - else if (last2CodeAre(TD_P)) - { - } - else if(lastCodeIs(TD_P)) - { - ReplaceString("Product", "Person"); - } - else - { - printStringAndQueueChar("Product"); - } - break; - case TD_Q: - printStringAndQueueChar("Darden"); - break; - case TD_S: - if (containsCode(TD_W)) - if (containsCode(TD_S) || containsCode(TD_D)) - printStringAndQueueChar("Step"); - else - printStringAndQueueChar("Session"); - else - printStringAndQueueChar("Supplier"); - break; - case TD_T: - if (containsCode(TD_W)) - printStringAndQueueChar("Task"); - else - printStringAndQueueChar("Type"); - break; - case TD_W: - printStringAndQueueChar("Workflow"); - break; - } - addKeyCode(kc); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - if (record->event.pressed) - { - switch (keycode) - { - case KC_LSPO: - case KC_RSPC: - shifted = true; - return true; - - case S_LFTJN: SEND_STRING("LEFT JOIN"); return false; - case S_INRJN: SEND_STRING("INNER JOIN "); return false; - case S_SLCT: SEND_STRING("SELECT "); return false; - case S_FROM: SEND_STRING("FROM "); return false; - case S_DSNCT: SEND_STRING("DISTINCT "); return false; - case S_ORDER: SEND_STRING("ORDER "); return false; - case S_WHERE: SEND_STRING("WHERE "); return false; - case S_ALTER: SEND_STRING("ALTER SESSION SET CURRENT_SCHEMA = "); return false; - case S_ASTRK: SEND_STRING("* "); return false; - - case KC_BSLS: - initStringData(); - layer_on(SQLNAMES); - return false; - - case TD_BSPC: - if (!shifted){ - deletePrev(); - } - else { - register_code(KC_BSPC); - unregister_code(KC_BSPC); - } - return false; - - case TD_A: - case TD_B: - case TD_C: - case TD_D: - case TD_E: - case TD_F: - case TD_G: - case TD_H: - case TD_I: - case TD_J: - case TD_K: - case TD_L: - case TD_M: - case TD_N: - case TD_O: - case TD_P: - case TD_Q: - case TD_R: - case TD_S: - case TD_T: - case TD_U: - case TD_V: - case TD_W: - case TD_X: - case TD_Y: - case TD_Z: - processSmartMacroTap(keycode); - return false; - - case TD_ENT: - printTableAbbreviation(); - case TD_ESC: - eraseKeyCodes(); - eraseTableAbbreviation(); - layer_off(SQLNAMES); - return true; - } - } - else - { - switch (keycode) - { - - case KC_BSLS: - if (macroTaps[0] == 0) - { - SEND_STRING("\\"); - layer_off(SQLNAMES); - } - return true; - case KC_LSPO: - case KC_RSPC: - shifted = false; - return true; - } - } - return true; -}; +// planned change: store previous table names and abbreviations to allow scrolling for inner joins on table name+id and abbreviation+id. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -507,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_60_ansi( ESCAP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MNUS, EQUL, BACKSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LBRC, RBRC, BSLASH, - MO_FNLR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, COLN, QUOT, ENTER_OR_SQL, + FN_QT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, COLN, QUOT, ENTER_OR_SQL, LEFTSHFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, CMMA, PRRD, SLSH, RIGHT_SHIFT__PAREN, CTLL, WINL, ALTL, SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE, ALTR, WINR, APPR, CTLR), @@ -531,23 +36,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_60_ansi( S_ALTER, ____, ____, ____, ____, ____, ____, ____, S_ASTRK, ____, ____, ____, ____, ___________, ______, ____, S_WHERE, ____, ____, ____, ____, ____, S_INRJN, S_ORDER, ____, ____, ____, ______, - _______, KC_LBRC, S_SLCT, KC_PAST,S_FROM, ____, ____, ____, ____, S_LFTJN, ____, RBRC, ___________, - ________, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, _________________, + _______, KC_LBRC, S_SLCT, S_ASTRK ,S_FROM, ____, ____, ____, ____, S_LFTJN, ____, RBRC, ___________, + ________, RGB_VAI, RGB_VAD, ____, ____, ____, ____, ____, ____, ____, ____, _________________, ____, ____, ____, /*------------------*/_____/*------------------*/, ____, ____, ____, ____), - [SQLNAMES]= - LAYOUT_60_ansi( - TD_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, TD_BSPC, - ________, TD_Q, TD_W, TD_E, TD_R, TD_T, TD_Y, TD_U, TD_I, TD_O, TD_P, ____, ____, _____, - ___________, TD_A, TD_S, TD_D, TD_F, TD_G, TD_H, TD_J, TD_K, TD_L, ____, ____, TD_ENT, - ___________, TD_Z, TD_X, TD_C, TD_V, TD_B, TD_N, TD_M, ____, ____, ____, _________________, - ____, ____, ____, /*----------------------*/TD_ENT/*-----------------------*/, ____, ____, ____, RESET), - [FN_LAYER]= LAYOUT_60_ansi( 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, KC_CAPSLOCK, KC_MPRV, KC_MPLY, KC_MNXT, LWIN(KC_R), ____, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_BRK, ____, ____, KC_VOLD, KC_MUTE, KC_VOLU, ____, ____, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, ____, - ____, ____, ____, ____, ____, ____, KC_END, ____, QWRTY, NAVS, GAME, ____, - ____, ____, ____, _________________, ____, KC_HYPR, KC_MEH, ____) + ____, RGB_HUI, RGB_SAI, RGB_SAD, ____, ____, KC_END, QWRTY, GAME, NAVS, ____, ____, + ____, ____, ____, _________________, ____, KC_HYPR, KC_MEH, RESET) }; diff --git a/keyboards/dz60/keymaps/marianas/keymap.h b/keyboards/dz60/keymaps/marianas/keymap.h index 00e51cea2c..bb1ea68c77 100644 --- a/keyboards/dz60/keymaps/marianas/keymap.h +++ b/keyboards/dz60/keymaps/marianas/keymap.h @@ -1,105 +1,15 @@ -#include "quantum.h" +#include QMK_KEYBOARD_H -//Control -#define MO_FNLR MO(FN_LAYER) -#define BACKSPC KC_BSPC -#define ENTER_OR_SQL LT(SQLMACROS,KC_ENT) -#define ESCAP KC_ESC -#define PSCR KC_PSCREEN -#define SCRL KC_SCROLLLOCK -#define PAUS KC_PAUSE -#define NSRT KC_INSERT -#define HOME KC_HOME -#define PGUP KC_PGUP -#define PGDN KC_PGDN -#define END_ KC_END -#define DELT KC_DELETE -#define UPUP KC_UP -#define D_WN KC_DOWN -#define LEFT KC_LEFT -#define RGHT KC_RIGHT -//KEYPAD -#define KP_1 KC_KP_1 -#define KP_2 KC_KP_2 -#define KP_3 KC_KP_3 -#define KP_4 KC_KP_4 -#define KP_5 KC_KP_5 -#define KP_6 KC_KP_6 -#define KP_7 KC_KP_7 -#define KP_8 KC_KP_8 -#define KP_9 KC_KP_9 -#define KP_0 KC_KP_0 -#define NMLK KC_NUMLOCK -#define STAR KC_KP_ASTERISK -#define KSSH KC_KP_SLASH -#define KMIN KC_KP_MINUS -#define PLUS KC_KP_PLUS -#define KNTR KC_KP_ENTER -#define KDOT KC_KP_DOT +enum marianas_layers { + QWERTY, +/* + COLEMAK, + DVORAK, +*/ + NAV_CLUSTER, + GAMING, + SQLMACROS, + FN_LAYER +}; -//Modifiers -#define CTLL KC_LCTL -#define LEFTSHFT KC_LSPO -#define WINL KC_LGUI -#define ALTL KC_LALT -#define CTLR KC_RCTL -#define RIGHT_SHIFT__PAREN KC_RSPC -#define WINR KC_RGUI -#define ALTR KC_RALT -#define APPR KC_APP - - -//Punctuation -#define CMMA KC_COMM -#define PRRD KC_DOT -#define SLSH KC_SLSH -#define QUOT KC_QUOT -#define COLN KC_SCLN -#define LBRC KC_LBRC -#define RBRC KC_RBRC -#define EQUL KC_EQL -#define MNUS KC_MINS -#define BSLASH KC_BSLS - -//Layers -#define QWRTY TO(QWERTY) -#define NAVS TO(NAV_CLUSTER) -#define GAME TO(GAMING) - -//Space -#define ____ KC_TRNS -#define _____ KC_TRNS -#define ______ KC_TRNS -#define _______ KC_TRNS -#define ________ KC_TRNS -#define ___________ KC_TRNS -#define _________________ KC_TRNS -#define SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE KC_SPC -#define KCNO KC_NO - - - - - -#define macroTapsLen 32 -#define tableNameListLen 32 -#define charCountLen 32 - -void initStringData(void); -uint32_t layer_state_set_user(uint32_t state); -bool containsCode(uint16_t kc); -bool lastCodeIs(uint16_t kc); -bool last2CodeAre(uint16_t kc); -bool last2CodesAre(uint16_t kc, uint16_t kc2); -void addKeyCode(uint16_t kc); -void eraseKeyCodes(void); -void eraseCharCounts(void); -void printTableAbbreviation(void); -void eraseTableAbbreviation(void); -void printString(char* str); -void printStringAndQueueChar(char* str); -void ReplaceString(char *orig, char *repl); -void deletePrev(void); -void processSmartMacroTap(uint16_t kc); -bool process_record_user(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/dz60/keymaps/marianas/relativity.c b/keyboards/dz60/keymaps/marianas/relativity.c new file mode 100644 index 0000000000..96a5eb4e6f --- /dev/null +++ b/keyboards/dz60/keymaps/marianas/relativity.c @@ -0,0 +1,510 @@ +#include "relativity.h" +#include "keymap.h" +#include "keyDefinitions.h" + + +uint16_t *macroTaps = 0; + +char *tableNameList = 0; + +uint8_t *charCount = 0; +uint8_t countPointer = 0; + +bool relativityActive = false; + + +bool sendAbbr = false; + + +static int16_t relativityTimer = 0; + + +bool tempOff = false; + + + + +void initStringData() +{ + if (macroTaps == 0) + { + macroTaps = malloc(macroTapsLen*sizeof(uint16_t)); + for(int i = 0; i < macroTapsLen; i++) + { + macroTaps[i] = 0; + } + } + if (tableNameList == 0) + { + tableNameList = malloc(tableNameListLen*sizeof(char)); + for(int i = 0; i < tableNameListLen; i++) + { + tableNameList[i] = 0; + } + } + if (charCount == 0) + { + charCount = malloc(charCountLen*sizeof(uint8_t)); + for (int i = 0; i < charCountLen; i++) + { + charCount[i] = 0; + } + } +} + +void activateRelativity(void) +{ + initStringData(); + rgblight_mode(RGBLIGHT_MODE_KNIGHT); + relativityTimer = timer_read(); + relativityActive = true; +} + +bool deactivateRelativity(void) +{ + rgblight_mode(9); + eraseKeyCodes(); + eraseTableAbbreviation(); + eraseCharCounts(); + relativityActive = false; + tempOff = false; + return false; +} + +bool containsCode(uint16_t kc) +{ + for (int i = 0; i < macroTapsLen && macroTaps[i] > 0; i++) + { + if (macroTaps[i] == kc) return true; + } + return false; +} + +bool lastCodeIs(uint16_t kc) +{ + for (int i = 0; i < macroTapsLen-1 && macroTaps[i] > 0; i++) + { + if (macroTaps[i] == kc && macroTaps[i+1] == 0) return true; + } + return false; +} + +bool last2CodeAre(uint16_t kc) +{ + for (int i = 0; i < macroTapsLen-2 && macroTaps[i] > 0; i++) + { + if (macroTaps[i] == kc && macroTaps[i+1] == kc && macroTaps[i+2] == 0) return true; + } + return false; +} + +bool last2CodesAre(uint16_t kc, uint16_t kc2) +{ + for (int i = 0; i < macroTapsLen-2 && macroTaps[i] > 0; i++) + { + if (macroTaps[i] == kc && macroTaps[i+1] == kc2 && macroTaps[i+2] == 0) return true; + } + return false; +} + +void addKeyCode(uint16_t kc) +{ + int i = 0; + while (i < macroTapsLen-2 && macroTaps[i] > 0) i++; + if (macroTaps[i] == 0) + { + macroTaps[i] = kc; + macroTaps[i+1] = 0; + } +} + +void eraseKeyCodes(void) +{ + int i = 0; + while (i < macroTapsLen && macroTaps[i] > 0) macroTaps[i++] = 0; +} + +void eraseCharCounts(void) +{ + while (countPointer > 0) + { + charCount[countPointer] = 0; + countPointer--; + } + charCount[countPointer] = 0; +} + +void printTableAbbreviationLimited(void) +{ + if (tableNameList[0] == 0) + { + return; + } + int i = 0; + for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) + { + if (tableNameList[i] >= 65 && tableNameList[i] <= 90) + { + send_char(tableNameList[i]+32); + } + else + { + send_char(tableNameList[i]); + } + } +} + +void printTableAbbreviation(void) +{ + if (tableNameList[0] == 0) + { + return; + } + send_char(0x20); + int i = 0; + for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) + { + if (tableNameList[i] >= 65 && tableNameList[i] <= 90) + { + send_char(tableNameList[i]+32); + } + else + { + send_char(tableNameList[i]); + } + } + send_char(0x20); +} + +void eraseTableAbbreviation(void) +{ + for (int i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) + { + tableNameList[i] = '\0'; + } +} + +void printString(char* str) +{ + + if (str[0] != '\0') + { + int i = 0; + while (true) + { + if (str[i] == 0) + { + break; + } + send_char(str[i++]); + charCount[countPointer]++; + } + } +} + +void printStringAndQueueChar(char* str) +{ + if (charCount[countPointer] > 0 && countPointer < charCountLen) + { + countPointer++; + } + sendAbbr = true; + if (str[0] != '\0') + { + printString(str); + + for (int i = 0; i < tableNameListLen-1; i++) + { + if (tableNameList[i] == '\0') + { + tableNameList[i] = str[0]; + tableNameList[i+1] = '\0'; + break; + } + else if (i == tableNameListLen-2) + { + printTableAbbreviation(); + break; + } + } + //for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++) + //{ + // send_char(tableNameList[i]); + //} + //send_string_P("Darden"); + //send_string_P(&myarray); + //send_string_P(str); + } +} + +void ReplaceString(char *orig, char *repl) +{ + int i = 0; + while((orig[i] != 0x0 && repl[i] != 0x0) && orig[i] == repl[i]) + i++; + + if(orig[i] != 0x0) + { + int o = i; + while (orig[o++] != 0x0) { + charCount[countPointer]--; + register_code(KC_BSPC); + unregister_code(KC_BSPC); + } + } + printString(repl+i); +} + +void deletePrev(void) +{ + if (countPointer == 0 && charCount[countPointer] == 0) + return; + for (int i = 0; i < charCount[countPointer]; i++) + { + register_code(KC_BSPC); + unregister_code(KC_BSPC); + } + charCount[countPointer] = 0; + int i = 1; + for (;i < tableNameListLen-1; i++) + { + if (tableNameList[i] == 0x0) + { + break; + } + } + tableNameList[i-1] = 0x0; + if (countPointer > 0) + { + countPointer--; + } +} + +bool processSmartMacroTap(uint16_t kc) +{ + if (relativityTimer > 0 && TIMER_DIFF_16(timer_read(), relativityTimer) >= relTimeout) + { + deactivateRelativity(); + return true; + } + relativityTimer = 0; + switch(kc) + { + case KC_C: + if (containsCode(KC_D)) + { + printString("ribution"); + printStringAndQueueChar("Center"); + } + else if (last2CodeAre(KC_C)) + { + ReplaceString("Corporation", "Contact"); + } + else if(lastCodeIs(KC_C)) + { + printString("oration"); + } + else + { + printStringAndQueueChar("Corp"); + } + break; + case KC_D: + if (last2CodeAre(KC_D)) + { + ReplaceString("Distribution", "Distributor"); + } + else if(lastCodeIs(KC_D)) + { + printString("ribution"); + } + else + { + printStringAndQueueChar("Dist"); + } + break; + case KC_G: + printStringAndQueueChar("Global"); + printStringAndQueueChar("Lookup"); + break; + case KC_I: + if (containsCode(KC_W)) + printStringAndQueueChar("Instance"); + else + printStringAndQueueChar("Item"); + break; + case KC_N: + printStringAndQueueChar("NadRate"); + break; + case KC_P: + if (last2CodesAre(KC_D, KC_C)) + { + ReplaceString("DistributionCenter", "DistCenter"); + printStringAndQueueChar("Pricing"); + } + else if (last2CodeAre(KC_P)) + { + } + else if(lastCodeIs(KC_P)) + { + ReplaceString("Product", "Person"); + } + else + { + printStringAndQueueChar("Product"); + } + break; + case KC_Q: + printStringAndQueueChar("Darden"); + break; + case KC_S: + if (containsCode(KC_W)) + if (containsCode(KC_S) || containsCode(KC_D)) + printStringAndQueueChar("Step"); + else + printStringAndQueueChar("Session"); + else + printStringAndQueueChar("Supplier"); + break; + case KC_T: + if (containsCode(KC_W)) + printStringAndQueueChar("Task"); + else + printStringAndQueueChar("Type"); + break; + case KC_W: + printStringAndQueueChar("Workflow"); + break; + } + addKeyCode(kc); + return false; +} + + +bool shifted = false; +bool isShifted() +{ + return shifted; +} + +void setShifted(bool val) +{ + shifted = val; +} + + +bool storeShiftState(uint16_t keycode, keyrecord_t *record) +{ + + if (record->event.pressed) + { + switch (keycode) + { + case KC_LSPO: + case KC_RSPC: + shifted = true; + } + } + else + { + switch (keycode) + { + + case KC_LSPO: + case KC_RSPC: + shifted = false; + return true; + } + } + return true; +} + +bool handleSmartMacros(uint16_t keycode, keyrecord_t *record) +{ + if (relativityActive != true) return true; + if (record->event.pressed) + { + switch (keycode) + { + case KC_BSPC: + if (!isShifted()){ + deletePrev(); + } + else { + register_code(KC_BSPC); + unregister_code(KC_BSPC); + } + return false; + case KC_A: + case KC_B: + case KC_C: + case KC_D: + case KC_E: + case KC_F: + case KC_G: + case KC_H: + case KC_I: + case KC_J: + case KC_K: + case KC_L: + case KC_M: + case KC_N: + case KC_O: + case KC_P: + case KC_Q: + case KC_R: + case KC_S: + case KC_T: + case KC_U: + case KC_V: + case KC_W: + case KC_X: + case KC_Y: + case KC_Z: + return processSmartMacroTap(keycode); + + case PRRD: + if (tempOff) + { + SEND_STRING("Id = "); + printTableAbbreviationLimited(); + SEND_STRING(".Id"); + return deactivateRelativity(); + } + else + { + printTableAbbreviation(); + SEND_STRING("ON "); + printTableAbbreviationLimited(); + eraseKeyCodes(); + eraseTableAbbreviation(); + eraseCharCounts(); + tempOff = true; + return true; + } + + + case KC_SPC: + printTableAbbreviation(); + return deactivateRelativity(); + case ENTER_OR_SQL: + if (tempOff) + { + SEND_STRING("Id = "); + printTableAbbreviationLimited(); + SEND_STRING(".Id"); + deactivateRelativity(); + return true; + } + else + { + printTableAbbreviation(); + deactivateRelativity(); + return true; + } + case KC_ESC: + return deactivateRelativity(); + } + } + return true; +} diff --git a/keyboards/dz60/keymaps/marianas/relativity.h b/keyboards/dz60/keymaps/marianas/relativity.h new file mode 100644 index 0000000000..c917b1a4dc --- /dev/null +++ b/keyboards/dz60/keymaps/marianas/relativity.h @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_H +#define macroTapsLen 32 +#define tableNameListLen 32 +#define charCountLen 32 + +#define relTimeout 1500 + + +void activateRelativity(void); +bool deactivateRelativity(void); +void initStringData(void); +bool containsCode(uint16_t kc); +bool lastCodeIs(uint16_t kc); +bool last2CodeAre(uint16_t kc); +bool last2CodesAre(uint16_t kc, uint16_t kc2); +void addKeyCode(uint16_t kc); +void eraseKeyCodes(void); +void eraseCharCounts(void); +void printTableAbbreviation(void); +void eraseTableAbbreviation(void); +void printString(char* str); +void printStringAndQueueChar(char* str); +void ReplaceString(char *orig, char *repl); +void deletePrev(void); +bool processSmartMacroTap(uint16_t kc); +bool isShifted(void); +void setShifted(bool); + + + +bool handleSmartMacros(uint16_t keycode, keyrecord_t *record); +bool storeShiftState(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/dz60/keymaps/marianas/rules.mk b/keyboards/dz60/keymaps/marianas/rules.mk index ab188f3b2c..230d194ab8 100644 --- a/keyboards/dz60/keymaps/marianas/rules.mk +++ b/keyboards/dz60/keymaps/marianas/rules.mk @@ -15,3 +15,7 @@ AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = no AUTO_SHIFT_ENABLE = no + + +SRC += relativity.c +SRC += customLogic.c -- cgit v1.2.1 From a5d22424f40cf386120008b5d44d810c62d0ffcb Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 6 Nov 2018 12:04:25 -0800 Subject: Commit my DZ60 keymap (#4375) * default mechmerlin keymap initial commit * fix up the keymap * cleanup keymap * add rgb sleep functionality * add the beginning of a readme * fix that compile error * fixup formatting * spruce up that readme * add RGB lighting controls to _CL layer * update readme * set rgb underglow color * update readme * fix formatting --- keyboards/dz60/keymaps/mechmerlin/config.h | 6 +++ keyboards/dz60/keymaps/mechmerlin/keymap.c | 40 +++++++++++++++++ keyboards/dz60/keymaps/mechmerlin/readme.md | 68 +++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 keyboards/dz60/keymaps/mechmerlin/config.h create mode 100644 keyboards/dz60/keymaps/mechmerlin/keymap.c create mode 100644 keyboards/dz60/keymaps/mechmerlin/readme.md (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/mechmerlin/config.h b/keyboards/dz60/keymaps/mechmerlin/config.h new file mode 100644 index 0000000000..92d4cfb50a --- /dev/null +++ b/keyboards/dz60/keymaps/mechmerlin/config.h @@ -0,0 +1,6 @@ +#pragma once + +// Turn off RGB when computer goes to sleep +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SLEEP +#endif // RGBLIGHT_ENABLE diff --git a/keyboards/dz60/keymaps/mechmerlin/keymap.c b/keyboards/dz60/keymaps/mechmerlin/keymap.c new file mode 100644 index 0000000000..1a8593ef16 --- /dev/null +++ b/keyboards/dz60/keymaps/mechmerlin/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTCP LCTL_T(KC_CAPS) +#define KC_RSSH RSFT_T(KC_SLSH) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_b_ansi( + KC_ESC, 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_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_CTCP, 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_RSSH, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [_FL] = LAYOUT_60_b_ansi( + 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, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_PGUP, MO(_CL), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), + + [_CL] = LAYOUT_60_b_ansi( + RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +// Set underglow RGB leds to yellow +// Find the list of available colors in quantum/rgblight_list.h +void matrix_init_user(void) { + rgblight_sethsv_noeeprom_yellow(); +} diff --git a/keyboards/dz60/keymaps/mechmerlin/readme.md b/keyboards/dz60/keymaps/mechmerlin/readme.md new file mode 100644 index 0000000000..76ff54de54 --- /dev/null +++ b/keyboards/dz60/keymaps/mechmerlin/readme.md @@ -0,0 +1,68 @@ +# MechMerlin's DZ60 Keymap + +The purpose of this keymap is to provide examples on how to do some common QMK features. + +Make example for this keyboard (after setting up your build environment): + + make dz60:mechmerlin + +## Merlin's DZ60 Hardware Info +--- + +The DZ60 is a 60% pcb produced by KBDFans. It comes in two variants, USB Mini B and USB C. It supports many many layouts. It also supports both backlight and RGB underglow. The USB C variant does not have a hardware reset switch. USB C to C is not supported. + +Merlin's DZ60 uses +- Layout B, in QMK this is LAYOUT_60_b_ansi. +- USB C +- 50g Zilents +- Arrows are 78g Zilents +- KPRepublic XD64 Case + +## Layers +--- + +Merlin's keymap has three different layers. To switch layers you can use the `MO(X)` keycode, where `X` is the layer you want to switch to. + +### _BL + +This is the base layer also known as layer 0. It is a standard QWERTY layout. It has the `_FL` layer switch key. + +### _FL + +This is the function layer also known as layer 1. It utiizes the following: +- Function Keys +- Navigation Keys +- Audio keys such as Mute, Volume Down and Volume Up. +- `_CL` layer switch key + +### _CL + +This is the control layer also known as layer 2. It utilizes the following: +- RGB Controls +- `RESET` key + +## Non Standard Keycodes +--- +### RESET + +As long `BOOTMAGIC_ENABLE` is set to `yes` in `rules.mk`, the DZ60 can be put into bootloader mode by holding the `space` key and the `b` key while plugging in. However sometmes this doesn't work or is troublesome to do, might as well use the `RESET` keycode to accomplish this. + +### RSFT_T(KC_SLSH) + +Layout B is missing the `?` key and is instead replaced with a `right shift`. This keycode makes it so that the key can be tapped for `?` and held for `right shift`. + +### LCTL_T(KC_CAPS) + +`Caps Lock` is only ever used by tapping, why not use it as a `control` key when held? This keycode makes it so that the key can be tapped for `caps lock` and held for `control`. + + +## RGB Lighting +--- + +### RGBLIGHT_SLEEP + +This is set in `mechmerlin/config.h` so that when the computer goes to sleep, the RGB lights will also go to sleep on the keyboard. They will turn back on when the computer wakes. + +### RGB Underglow Color: Yellow + +This is set in `mechmerlin/keymap.c` in the `matrix_init_user` function. The list of available colors can be found in [`quantum/rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/388df5359b913eaf1ce6fb0ef624e430ad010ea5/quantum/rgblight_list.h#L59-L121). -- cgit v1.2.1 From 6ae409dd55133e25e103aa974080ce127790357f Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Fri, 9 Nov 2018 08:49:29 -0800 Subject: Add my new ANSI layout dz60 setup (#4397) * minor additions to alps64 and dz60 * Rename crd keymap to represent 2u lshift layout * Add crd's new ANSI layout dz60 with preferred layers --- keyboards/dz60/keymaps/crd/keymap.c | 70 --------------------------- keyboards/dz60/keymaps/crd_2u_lshift/keymap.c | 70 +++++++++++++++++++++++++++ keyboards/dz60/keymaps/crd_ansi/keymap.c | 25 ++++++++++ 3 files changed, 95 insertions(+), 70 deletions(-) delete mode 100644 keyboards/dz60/keymaps/crd/keymap.c create mode 100644 keyboards/dz60/keymaps/crd_2u_lshift/keymap.c create mode 100644 keyboards/dz60/keymaps/crd_ansi/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/crd/keymap.c b/keyboards/dz60/keymaps/crd/keymap.c deleted file mode 100644 index 148b03b995..0000000000 --- a/keyboards/dz60/keymaps/crd/keymap.c +++ /dev/null @@ -1,70 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Qwerty - * ,-----------------------------------------------------------------------------------------. - * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | - * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | - * |-----------------------------------------------------------------------------------------+ - * | Ctrl/Esc| A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL | - * |-----------------------------------------------------------------------------------------+ - * | FN1 | Alt | Cmd | Space | Cmd | FN2 | L | D | R | - * `-----------------------------------------------------------------------------------------' - */ - - LAYOUT_directional( - 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, - CTL_T(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, KC_RSFT, KC_UP, KC_DEL, - MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT - ), - - /* FN1 Layer - * ,-----------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | L | D | U | R | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | |PgUp | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | |Home |PgDn | End | - * `-----------------------------------------------------------------------------------------' - */ - - LAYOUT_directional( - _______, 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END - ), - - /* FN2 Layer (Media) - * ,-----------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | RESET | - * |-----------------------------------------------------------------------------------------+ - * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | |Pl/Ps|Vol+ |Mute | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | |Prev |Vol- |Next | - * `-----------------------------------------------------------------------------------------' - */ - - LAYOUT_directional( - KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT - ), -}; diff --git a/keyboards/dz60/keymaps/crd_2u_lshift/keymap.c b/keyboards/dz60/keymaps/crd_2u_lshift/keymap.c new file mode 100644 index 0000000000..4d2ca279c2 --- /dev/null +++ b/keyboards/dz60/keymaps/crd_2u_lshift/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl/Esc| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Home | U | End | + * |-----------------------------------------------------------------------------------------+ + * | FN1 | Alt | Cmd | Space | Cmd | FN2 | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + 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, + CTL_T(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, KC_HOME, KC_UP, KC_END, + MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* FN1 Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | Home | PgUp | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | L | D | U | R | End | PgDn| | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | |PgUp | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | |Home |PgDn | End | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + 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_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, KC_PGDOWN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END + ), + + /* FN2 Layer (Media) + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| |Mute | Vol- | Vol+ | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | |Bri- |Bri+ | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | |Pl/Ps|Vol+ |Mute | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | |Prev |Vol- |Next | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, + _______, _______, _______, DEBUG, _______, _______, _______, _______, _______, _______, KC_SCROLLLOCK, KC_PAUSE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), +}; diff --git a/keyboards/dz60/keymaps/crd_ansi/keymap.c b/keyboards/dz60/keymaps/crd_ansi/keymap.c new file mode 100644 index 0000000000..eac0f1e84c --- /dev/null +++ b/keyboards/dz60/keymaps/crd_ansi/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_60_ansi( + 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, + CTL_T(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, RSFT_T(KC_UP), + MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, RGUI_T(KC_LEFT), RALT_T(KC_DOWN), LT(2, KC_RIGHT) + ), + LAYOUT_60_ansi( + 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_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SCROLLLOCK, KC_PAUSE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; -- cgit v1.2.1 From 31298be2b17a1b9f203c8fd1d7bae8f923557cc0 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 18 Nov 2018 15:53:33 +0000 Subject: Add personal zvecr dz60 keymap (#4443) * Add Configurator support for dz60 ansi split space * Add keymap and fix layout macro --- keyboards/dz60/keymaps/zvecr/keymap.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 keyboards/dz60/keymaps/zvecr/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/zvecr/keymap.c b/keyboards/dz60/keymaps/zvecr/keymap.c new file mode 100644 index 0000000000..9127fa0a7e --- /dev/null +++ b/keyboards/dz60/keymaps/zvecr/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +/* +* Each layer gets a name for readability. +* The underscores don't mean anything - you can +* have a layer called STUFF or any other name. +* Layer names don't all need to be of the same +* length, and you can also skip them entirely +* and just use numbers. +* +*/ +#define BL 0 // Base Layer +#define FL 1 // Function Layer +#define ML 2 // Macro Layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BL] = LAYOUT_60_ansi_split( + 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, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(FL), KC_SPC, KC_RALT, KC_RGUI, MO(ML), KC_RCTL), + + [FL] = LAYOUT_60_ansi_split( + 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, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, KC_DEL, KC_END, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + + [ML] = LAYOUT_60_ansi_split( + _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; -- cgit v1.2.1 From d115abfd8d1e2a7e34cc7809165e413efc1eb9ce Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Wed, 5 Dec 2018 09:02:26 -0800 Subject: Keyboard: Add dz60 tsangan hhkb (#4529) * Add tsangan bottom row hhkb layout for dz60 * Add crd's tsangan hhkb layout for dz60 * Resort to native key aliases when they exist * Update crd's dz60 ansi keymap to match updates for hhkb fn layer * Add tsangan hhkb layout to dz60 info.json for KLE * Fix JSON nesting in dz60 layouts block * Minor adjustments to crd layouts to make them more consistent * Update layout naming to 60_tsangan_hhkb --- keyboards/dz60/keymaps/crd_ansi/keymap.c | 43 ++++++++++++++++------------- keyboards/dz60/keymaps/crd_tsangan/keymap.c | 30 ++++++++++++++++++++ 2 files changed, 54 insertions(+), 19 deletions(-) create mode 100644 keyboards/dz60/keymaps/crd_tsangan/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/crd_ansi/keymap.c b/keyboards/dz60/keymaps/crd_ansi/keymap.c index eac0f1e84c..52d1756be2 100644 --- a/keyboards/dz60/keymaps/crd_ansi/keymap.c +++ b/keyboards/dz60/keymaps/crd_ansi/keymap.c @@ -1,25 +1,30 @@ #include QMK_KEYBOARD_H +enum keyboard_layers { + _BL = 0, // Base Layer + _FL // Function Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTES CTL_T(KC_ESC) +#define KC_RSUP RSFT_T(KC_UP) +#define KC_FNLT LT(_FL, KC_LEFT) +#define KC_RADN RALT_T(KC_DOWN) +#define KC_RCRT RCTL_T(KC_RIGHT) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT_60_ansi( - 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, - CTL_T(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, RSFT_T(KC_UP), - MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, RGUI_T(KC_LEFT), RALT_T(KC_DOWN), LT(2, KC_RIGHT) - ), - LAYOUT_60_ansi( - 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_PGUP, _______, - _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ + [_BL] = LAYOUT_60_ansi( + 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_CTES, 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_RSUP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_FNLT, KC_RADN, KC_RCRT ), - LAYOUT_60_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SCROLLLOCK, KC_PAUSE, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ + [_FL] =LAYOUT_60_ansi( + 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_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/dz60/keymaps/crd_tsangan/keymap.c b/keyboards/dz60/keymaps/crd_tsangan/keymap.c new file mode 100644 index 0000000000..320de07a17 --- /dev/null +++ b/keyboards/dz60/keymaps/crd_tsangan/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL // Function Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTES CTL_T(KC_ESC) +#define KC_RSUP RSFT_T(KC_UP) +#define KC_RGLT RGUI_T(KC_LEFT) +#define KC_RADN RALT_T(KC_DOWN) +#define KC_RCRT RCTL_T(KC_RIGHT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_tsangan_hhkb( + 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_ESC, + 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_CTES, 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_RSUP, MO(_FL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGLT, KC_RADN, KC_RCRT + ), + [_FL] = LAYOUT_60_tsangan_hhkb( + _______, 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_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; -- cgit v1.2.1 From 45dca4bc40bf403bc55f47c8c2091457582c9f53 Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Fri, 7 Dec 2018 07:52:31 -0800 Subject: crd alps64 updates (#4565) * Update alps64 aek layout to work I tried using the layout provided with my alp64 board in AEK configuration, but keys weren't mapping correctly until I made this fix. * Update crd's alps64 aek keymp to match other boards (inspired by mechmerlin) * Fix minor whitespace issue --- keyboards/dz60/keymaps/crd_ansi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/crd_ansi/keymap.c b/keyboards/dz60/keymaps/crd_ansi/keymap.c index 52d1756be2..5d7b24d187 100644 --- a/keyboards/dz60/keymaps/crd_ansi/keymap.c +++ b/keyboards/dz60/keymaps/crd_ansi/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_FNLT, KC_RADN, KC_RCRT ), - [_FL] =LAYOUT_60_ansi( + [_FL] = LAYOUT_60_ansi( 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_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, RESET, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______, -- cgit v1.2.1 From b11c3324774e50b8f17f5b4a3af63f1b6ae441e0 Mon Sep 17 00:00:00 2001 From: Twopidee <42394451+Twopidee@users.noreply.github.com> Date: Tue, 11 Dec 2018 16:24:17 -0600 Subject: Keymap: Added Drewsky DZ60 keymap (#4607) * Added Drewsky's DZ60 Keymap * Update keyboards/dz60/keymaps/drewsky/keymap.c Co-Authored-By: Twopidee <42394451+Twopidee@users.noreply.github.com> --- keyboards/dz60/keymaps/drewsky/Readme.md | 11 +++++++++++ keyboards/dz60/keymaps/drewsky/keymap.c | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100755 keyboards/dz60/keymaps/drewsky/Readme.md create mode 100755 keyboards/dz60/keymaps/drewsky/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/drewsky/Readme.md b/keyboards/dz60/keymaps/drewsky/Readme.md new file mode 100755 index 0000000000..115d9cf83b --- /dev/null +++ b/keyboards/dz60/keymaps/drewsky/Readme.md @@ -0,0 +1,11 @@ +# **DREWSKY'S DZ60 ANSI Layout** +![Imgur](https://i.imgur.com/v4zVbl7.jpg) + + +Layer 1 is default configuration, for the exception of the Space cadet shifts. Layer 2 is for WASD arrows and Media, which I have included both PREV and NEXT for Windows and macOS. Layer 3 is for RGB underglow. Legends in picture follow Layers. Modifier one is momentary, and the RGB layer is TT (TAP_TOGGLE) + +Make example for this keyboard (after setting up your build environment): + + make dz60:drewsky + +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/dz60/keymaps/drewsky/keymap.c b/keyboards/dz60/keymaps/drewsky/keymap.c new file mode 100755 index 0000000000..aba0d238f0 --- /dev/null +++ b/keyboards/dz60/keymaps/drewsky/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + +// Helpful defines +#define _L0 0 +#define _L1 1 +#define _L2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_L0] = LAYOUT_60_ansi( + 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, + 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TT(2), KC_RALT, MO(1), KC_RCTL), + + [_L1] = LAYOUT_60_ansi( + 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_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, + KC_NO, KC_MRWD, KC_MFFD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_MSTP, KC_VOLD, KC_VOLU, KC_MPLY, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_NO), + + [_L2] = LAYOUT_60_ansi( + KC_ESC, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, RGB_HUD, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, RGB_VAD, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPD, RGB_SPI, KC_NO, + KC_NO, KC_NO, KC_NO, RGB_TOG, KC_TRNS, KC_NO, KC_NO, DEBUG) +}; + + + + -- cgit v1.2.1 From 08e9fc142c89e783fdad3ecda0639bdf5c2e4c50 Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Mon, 24 Dec 2018 14:49:03 -0800 Subject: Add tsangan layout to dz60 with a "sane" default keymap (#4717) --- keyboards/dz60/keymaps/60_tsangan/keymap.c | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 keyboards/dz60/keymaps/60_tsangan/keymap.c (limited to 'keyboards/dz60/keymaps') diff --git a/keyboards/dz60/keymaps/60_tsangan/keymap.c b/keyboards/dz60/keymaps/60_tsangan/keymap.c new file mode 100644 index 0000000000..dfbc51dd99 --- /dev/null +++ b/keyboards/dz60/keymaps/60_tsangan/keymap.c @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_tsangan( + 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, + 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, MO(_FL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + [_FL] = LAYOUT_60_tsangan( + 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, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, _______, _______, + _______, _______, _______, _______, _______, MO(_CL), _______ + ), + [_CL] = LAYOUT_60_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; -- cgit v1.2.1