diff options
| -rw-r--r-- | keyboards/crkbd/keymaps/bcat/keymap.c | 21 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/bcat/readme.md | 53 | ||||
| -rw-r--r-- | keyboards/lily58/keymaps/bcat/config.h | 3 | ||||
| -rw-r--r-- | keyboards/lily58/keymaps/bcat/keymap.c | 21 | ||||
| -rw-r--r-- | keyboards/lily58/keymaps/bcat/readme.md | 10 | ||||
| -rw-r--r-- | users/bcat/bcat.c | 39 | ||||
| -rw-r--r-- | users/bcat/bcat.h | 8 | ||||
| -rw-r--r-- | users/bcat/rules.mk | 5 |
8 files changed, 109 insertions, 51 deletions
diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index b4c347181..60375f676 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | 2 | ||
| 3 | #include "bcat.h" | ||
| 4 | |||
| 3 | enum layer { | 5 | enum layer { |
| 4 | LAYER_DEFAULT, | 6 | LAYER_DEFAULT, |
| 5 | LAYER_LOWER, | 7 | LAYER_LOWER, |
| @@ -10,28 +12,31 @@ enum layer { | |||
| 10 | #define LY_LWR MO(LAYER_LOWER) | 12 | #define LY_LWR MO(LAYER_LOWER) |
| 11 | #define LY_RSE MO(LAYER_RAISE) | 13 | #define LY_RSE MO(LAYER_RAISE) |
| 12 | 14 | ||
| 13 | #define KY_CESC LCTL_T(KC_ESC) | 15 | #define KY_CSPC LCTL(KC_SPC) |
| 16 | #define KY_LOCK LGUI(KC_L) | ||
| 17 | #define KY_WINL LGUI(KC_LEFT) | ||
| 18 | #define KY_WINR LGUI(KC_RGHT) | ||
| 14 | 19 | ||
| 15 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 16 | /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ | 21 | /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ |
| 17 | [LAYER_DEFAULT] = LAYOUT( | 22 | [LAYER_DEFAULT] = LAYOUT( |
| 18 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | 23 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, |
| 19 | KY_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | 24 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, |
| 20 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | 25 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, |
| 21 | KC_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI | 26 | KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT |
| 22 | ), | 27 | ), |
| 23 | 28 | ||
| 24 | /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ | 29 | /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ |
| 25 | [LAYER_LOWER] = LAYOUT( | 30 | [LAYER_LOWER] = LAYOUT( |
| 26 | KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, | 31 | MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, |
| 27 | _______, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, | 32 | KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, |
| 28 | _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, | 33 | _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, |
| 29 | _______, _______, _______, _______, _______, _______ | 34 | _______, _______, _______, _______, _______, _______ |
| 30 | ), | 35 | ), |
| 31 | 36 | ||
| 32 | /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7 */ | 37 | /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7 */ |
| 33 | [LAYER_RAISE] = LAYOUT( | 38 | [LAYER_RAISE] = LAYOUT( |
| 34 | _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, | 39 | KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, |
| 35 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, | 40 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, |
| 36 | _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, | 41 | _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, |
| 37 | _______, _______, _______, _______, _______, _______ | 42 | _______, _______, _______, _______, _______, _______ |
| @@ -46,6 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 46 | ), | 51 | ), |
| 47 | }; | 52 | }; |
| 48 | 53 | ||
| 49 | layer_state_t layer_state_set_user(layer_state_t state) { | 54 | layer_state_t layer_state_set_keymap(layer_state_t state) { |
| 50 | return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); | 55 | return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); |
| 51 | } | 56 | } |
diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md index fa6b5af37..21594f75c 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md | |||
| @@ -4,11 +4,11 @@ This is my favorite split ergo layout for typing, featuring the traditional | |||
| 4 | four ortho/ergo layers (Default, Lower, Raise, Adjust). It is loosely inspired | 4 | four ortho/ergo layers (Default, Lower, Raise, Adjust). It is loosely inspired |
| 5 | by the default Planck (numbers on Lower, symbols on Raise) and Crkbd (Space on | 5 | by the default Planck (numbers on Lower, symbols on Raise) and Crkbd (Space on |
| 6 | left, Enter on right) layouts, but has since been redesigned heavily according | 6 | left, Enter on right) layouts, but has since been redesigned heavily according |
| 7 | to the principles described below: | 7 | to the principles described below. |
| 8 | 8 | ||
| 9 | * Since most of the modifiers are on the left half, keys frequently pressed | 9 | * Since my most-frequently-used keyboard shortcuts involve Ctrl, which lives on |
| 10 | together with mods (e.g., numbers, function keys, etc.) are on the Raise layer | 10 | the left half of the keyboard, keys frequently used with it (numbers, function |
| 11 | activated by the right thumb. | 11 | keys, etc.) are on the Raise layer activated by the right thumb. |
| 12 | 12 | ||
| 13 | * Navigation can be done on the right half alone, to enable simultaneous | 13 | * Navigation can be done on the right half alone, to enable simultaneous |
| 14 | left-handed mousing. Additionally, Web pages can be scrolled with Space or | 14 | left-handed mousing. Additionally, Web pages can be scrolled with Space or |
| @@ -22,7 +22,7 @@ layer-switch keys to correct mistakes. | |||
| 22 | 22 | ||
| 23 | ## Default layer | 23 | ## Default layer |
| 24 | 24 | ||
| 25 |  | 25 |  |
| 26 | 26 | ||
| 27 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5)) | 27 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5)) |
| 28 | 28 | ||
| @@ -31,29 +31,26 @@ layer-switch keys to correct mistakes. | |||
| 31 | * Tab and Backspace are in familiar locations from my row-staggered boards | 31 | * Tab and Backspace are in familiar locations from my row-staggered boards |
| 32 | (almost all of which use HHKB-style split backspace). | 32 | (almost all of which use HHKB-style split backspace). |
| 33 | 33 | ||
| 34 | * The Esc key is next to the home row for convenience in Vim. | ||
| 35 | |||
| 34 | * Likewise, the Ctrl key is in the same place as on my row-staggered boards | 36 | * Likewise, the Ctrl key is in the same place as on my row-staggered boards |
| 35 | (where I've been remapping Caps Lock as Ctrl since before even using QMK). | 37 | (where I've been remapping Caps Lock as Ctrl since before even using QMK). |
| 36 | 38 | ||
| 37 | * There are two Shift keys, because I do use Right Shift on occasion (even | 39 | * There are two Shift keys, although I generally use Left Shift. (I've |
| 38 | though I'm predominately a Left Shift-er). | 40 | considered replacing Right Shift with another key, but haven't chosen one.) |
| 39 | 41 | ||
| 40 | * Lower and Raise layer-switch keys are below the left and right thumb, | 42 | * Lower and Raise layer-switch keys are in the resting position of my left and |
| 41 | respectively, when resting my fingers on the home row. | 43 | right thumbs, respectively. |
| 42 | 44 | ||
| 43 | * Space and Enter are on the big thumb keys so they're easy to press. | 45 | * Space and Enter are on the big thumb keys so they're easy to press. |
| 44 | 46 | ||
| 45 | * Alt is on the left so I can navigate back (Alt+Raise+H) and forward | 47 | * Ctrl is on the left for ease of chording, especially one-handed use of common |
| 46 | (Alt+Raise+L) without having to uncomfortably hit two thumb keys on the same | 48 | shortcuts like Ctrl+T and Ctrl+W. This puts Alt on the right by the process of |
| 47 | half. This puts Super on the right by the process of elimination. | 49 | elimination. |
| 48 | |||
| 49 | * Escape shares a mod-tap key with Ctrl, which is convenient for Vim, but not | ||
| 50 | something I'm totally in love with, as even after tweaking `TAPPING_TERM` I | ||
| 51 | still get occasional spurious Esc taps. (I might move Esc up a key and put Tab | ||
| 52 | on a layer, but that'd take some getting used to....) | ||
| 53 | 50 | ||
| 54 | ## Lower layer | 51 | ## Lower layer |
| 55 | 52 | ||
| 56 |  | 53 |  |
| 57 | 54 | ||
| 58 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) | 55 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) |
| 59 | 56 | ||
| @@ -74,17 +71,23 @@ bottom row. | |||
| 74 | right half, with the same relative positions as on a row-staggered HHKB layout. | 71 | right half, with the same relative positions as on a row-staggered HHKB layout. |
| 75 | And yup, the shifted versions are above the unshifted versions. | 72 | And yup, the shifted versions are above the unshifted versions. |
| 76 | 73 | ||
| 77 | * Caps Lock is bound in the same position as on an HHKB, for lack of an obvious | 74 | * Remaining keys from a TKL are placed out of the way on the bottom row of the |
| 78 | better location. | 75 | left half. |
| 79 | 76 | ||
| 80 | * Some extra keys are placed on the bottom row of the left half, ensuring every | 77 | * The home row on the left half contains handy shortcuts for window movement, |
| 81 | key on a TKL has a binding. | 78 | and browser navigation, and screen lock. |
| 82 | 79 | ||
| 83 | * The left-half home row is reversed for future use. (It's free real estate.) | 80 | * Lower+Esc is bound to Ctrl+Space because the Ctrl and Space keys are both on |
| 81 | the left thumb, so this key combination (which I use for tmux prefix and editor | ||
| 82 | autocomplete) is hard to press in its natural location. | ||
| 83 | |||
| 84 | * Lower+Tab is bound to a custom Alt+Tab macro that keeps the Alt modifier held | ||
| 85 | as long as the Lower key is held down. This means that window switching is on | ||
| 86 | Lower+Tab immediately next to browser tab switching (Ctrl+Tab). | ||
| 84 | 87 | ||
| 85 | ## Raise layer | 88 | ## Raise layer |
| 86 | 89 | ||
| 87 |  | 90 |  |
| 88 | 91 | ||
| 89 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7)) | 92 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7)) |
| 90 | 93 | ||
| @@ -106,6 +109,8 @@ keys (F1–F5) on the home row.) | |||
| 106 | * Insert and Delete are on the rightmost column, because there didn't seem to | 109 | * Insert and Delete are on the rightmost column, because there didn't seem to |
| 107 | be a better place to put them. | 110 | be a better place to put them. |
| 108 | 111 | ||
| 112 | * Caps Lock is bound in the same position as on an HHKB, for lack of an obvious better location. | ||
| 113 | |||
| 109 | ## Adjust layer | 114 | ## Adjust layer |
| 110 | 115 | ||
| 111 |  | 116 |  |
diff --git a/keyboards/lily58/keymaps/bcat/config.h b/keyboards/lily58/keymaps/bcat/config.h index f7f08d076..180926204 100644 --- a/keyboards/lily58/keymaps/bcat/config.h +++ b/keyboards/lily58/keymaps/bcat/config.h | |||
| @@ -1,6 +1,3 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #define EE_HANDS | 3 | #define EE_HANDS |
| 4 | |||
| 5 | /* Work around Elite-C v3 with broken VBUS detection. */ | ||
| 6 | #define SPLIT_USB_DETECT | ||
diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 7fa65b876..a194e1c9d 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | 2 | ||
| 3 | #include "bcat.h" | ||
| 4 | |||
| 3 | enum layer { | 5 | enum layer { |
| 4 | LAYER_DEFAULT, | 6 | LAYER_DEFAULT, |
| 5 | LAYER_LOWER, | 7 | LAYER_LOWER, |
| @@ -10,31 +12,34 @@ enum layer { | |||
| 10 | #define LY_LWR MO(LAYER_LOWER) | 12 | #define LY_LWR MO(LAYER_LOWER) |
| 11 | #define LY_RSE MO(LAYER_RAISE) | 13 | #define LY_RSE MO(LAYER_RAISE) |
| 12 | 14 | ||
| 13 | #define KY_CESC LCTL_T(KC_ESC) | 15 | #define KY_CSPC LCTL(KC_SPC) |
| 16 | #define KY_LOCK LGUI(KC_L) | ||
| 17 | #define KY_WINL LGUI(KC_LEFT) | ||
| 18 | #define KY_WINR LGUI(KC_RGHT) | ||
| 14 | 19 | ||
| 15 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 16 | /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ | 21 | /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ |
| 17 | [LAYER_DEFAULT] = LAYOUT( | 22 | [LAYER_DEFAULT] = LAYOUT( |
| 18 | KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, | 23 | KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, |
| 19 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | 24 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, |
| 20 | KY_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | 25 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, |
| 21 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_WBAK, KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | 26 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_WBAK, KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, |
| 22 | KC_LCTL, KC_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI, KC_APP | 27 | KC_LGUI, KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT, KC_APP |
| 23 | ), | 28 | ), |
| 24 | 29 | ||
| 25 | /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ | 30 | /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ |
| 26 | [LAYER_LOWER] = LAYOUT( | 31 | [LAYER_LOWER] = LAYOUT( |
| 27 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 28 | KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, | 33 | MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, |
| 29 | _______, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, | 34 | KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, |
| 30 | _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, | 35 | _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, |
| 31 | _______, _______, _______, _______, _______, _______, _______, _______ | 36 | _______, _______, _______, _______, _______, _______, _______, _______ |
| 32 | ), | 37 | ), |
| 33 | 38 | ||
| 34 | /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823 */ | 39 | /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823 */ |
| 35 | [LAYER_RAISE] = LAYOUT( | 40 | [LAYER_RAISE] = LAYOUT( |
| 36 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 41 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 37 | _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, | 42 | KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, |
| 38 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, | 43 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, |
| 39 | _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, | 44 | _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, |
| 40 | _______, _______, _______, _______, _______, _______, _______, _______ | 45 | _______, _______, _______, _______, _______, _______, _______, _______ |
| @@ -50,6 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 50 | ), | 55 | ), |
| 51 | }; | 56 | }; |
| 52 | 57 | ||
| 53 | layer_state_t layer_state_set_user(layer_state_t state) { | 58 | layer_state_t layer_state_set_keymap(layer_state_t state) { |
| 54 | return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); | 59 | return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); |
| 55 | } | 60 | } |
diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 57b7929d3..270e74731 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md | |||
| @@ -11,24 +11,24 @@ using layers for numbers and symbols, so in practice this goes unused. | |||
| 11 | placed in the same positions as on the ErgoDox EZ. (There's no real reason for | 11 | placed in the same positions as on the ErgoDox EZ. (There's no real reason for |
| 12 | this; I just had to do _something_ with those keys.) | 12 | this; I just had to do _something_ with those keys.) |
| 13 | 13 | ||
| 14 | * The extra thumb keys are used for dedicated Ctrl/Menu keys (not super useful) | 14 | * The extra thumb keys are used for dedicated Super/Menu keys, as well as |
| 15 | and browser back/forward navigation keys (actually more useful than expected). | 15 | browser back/forward navigation keys. |
| 16 | 16 | ||
| 17 | ## Default layer | 17 | ## Default layer |
| 18 | 18 | ||
| 19 |  | 19 |  |
| 20 | 20 | ||
| 21 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) | 21 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) |
| 22 | 22 | ||
| 23 | ## Lower layer | 23 | ## Lower layer |
| 24 | 24 | ||
| 25 |  | 25 |  |
| 26 | 26 | ||
| 27 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) | 27 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) |
| 28 | 28 | ||
| 29 | ## Raise layer | 29 | ## Raise layer |
| 30 | 30 | ||
| 31 |  | 31 |  |
| 32 | 32 | ||
| 33 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823)) | 33 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823)) |
| 34 | 34 | ||
diff --git a/users/bcat/bcat.c b/users/bcat/bcat.c index 2b250c10f..397d565da 100644 --- a/users/bcat/bcat.c +++ b/users/bcat/bcat.c | |||
| @@ -1,6 +1,43 @@ | |||
| 1 | #include "quantum.h" | 1 | #include "bcat.h" |
| 2 | 2 | ||
| 3 | #if defined(RGBLIGHT_ENABLE) | 3 | #if defined(RGBLIGHT_ENABLE) |
| 4 | /* Adjust RGB static hue ranges for shorter gradients than default. */ | 4 | /* Adjust RGB static hue ranges for shorter gradients than default. */ |
| 5 | const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15}; | 5 | const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15}; |
| 6 | #endif | 6 | #endif |
| 7 | |||
| 8 | static int8_t alt_tab_layer = -1; | ||
| 9 | |||
| 10 | __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 11 | |||
| 12 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 13 | if (!process_record_keymap(keycode, record)) { | ||
| 14 | return false; | ||
| 15 | } | ||
| 16 | switch (keycode) { | ||
| 17 | /* Alt+Tab that holds Alt until current layer is released: */ | ||
| 18 | case MC_ALTT: | ||
| 19 | if (record->event.pressed) { | ||
| 20 | if (alt_tab_layer < 0) { | ||
| 21 | alt_tab_layer = layer_switch_get_layer(record->event.key); | ||
| 22 | register_code(KC_LALT); | ||
| 23 | } | ||
| 24 | register_code(KC_TAB); | ||
| 25 | } else { | ||
| 26 | unregister_code(KC_TAB); | ||
| 27 | } | ||
| 28 | return false; | ||
| 29 | default: | ||
| 30 | return true; | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 35 | |||
| 36 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 37 | state = layer_state_set_keymap(state); | ||
| 38 | if (alt_tab_layer >= 0 && !layer_state_cmp(state, alt_tab_layer)) { | ||
| 39 | unregister_code(KC_LALT); | ||
| 40 | alt_tab_layer = -1; | ||
| 41 | } | ||
| 42 | return state; | ||
| 43 | } | ||
diff --git a/users/bcat/bcat.h b/users/bcat/bcat.h new file mode 100644 index 000000000..1ea05e5fa --- /dev/null +++ b/users/bcat/bcat.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "quantum.h" | ||
| 4 | |||
| 5 | enum user_keycodes { | ||
| 6 | MC_ALTT = SAFE_RANGE, | ||
| 7 | KEYMAP_SAFE_RANGE, | ||
| 8 | }; | ||
diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index f3c6f9ab2..f979c703f 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk | |||
| @@ -3,8 +3,10 @@ SRC += bcat.c | |||
| 3 | # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. | 3 | # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. |
| 4 | BOOTMAGIC_ENABLE = lite | 4 | BOOTMAGIC_ENABLE = lite |
| 5 | 5 | ||
| 6 | # Enable media keys on all keyboards. | 6 | # Enable media keys on all keyboards. (Even though I don't use mouse keys, they |
| 7 | # seem to be required for media keys to register on Chrome OS.) | ||
| 7 | EXTRAKEY_ENABLE = yes | 8 | EXTRAKEY_ENABLE = yes |
| 9 | MOUSEKEY_ENABLE = yes | ||
| 8 | 10 | ||
| 9 | # Enable link-time optimization to reduce binary size. | 11 | # Enable link-time optimization to reduce binary size. |
| 10 | LINK_TIME_OPTIMIZATION_ENABLE = yes | 12 | LINK_TIME_OPTIMIZATION_ENABLE = yes |
| @@ -12,7 +14,6 @@ LINK_TIME_OPTIMIZATION_ENABLE = yes | |||
| 12 | # Disable unused build options on all keyboards. | 14 | # Disable unused build options on all keyboards. |
| 13 | COMMAND_ENABLE = no | 15 | COMMAND_ENABLE = no |
| 14 | CONSOLE_ENABLE = no | 16 | CONSOLE_ENABLE = no |
| 15 | MOUSEKEY_ENABLE = no | ||
| 16 | NKRO_ENABLE = no | 17 | NKRO_ENABLE = no |
| 17 | TERMINAL_ENABLE = no | 18 | TERMINAL_ENABLE = no |
| 18 | 19 | ||
