diff options
author | George Petri <jaxartez@gmail.com> | 2019-07-22 12:14:43 +0300 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-07-22 02:14:43 -0700 |
commit | f1c89280d5035134fbdfc1643c37f8ecc92bec16 (patch) | |
tree | 294397afe6b751931d1eeb50e2cdc37909e7836d /keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c | |
parent | 46023610950e464b21f4b89edb8fffd6c1241c31 (diff) |
[Keymap] Update keymap for keebio/quefrency 65% version (#6388)
* minor keymap changes
* minor keymap changes update readme
* update rules.mk
* add rgb
* add add arrows in hjkl
* removed backslashes
* fix missing comma
* spacing fix
* minor cleanup
* add r layer
* impl navigation layer
* moved backspace nearby
* updated readme
Diffstat (limited to 'keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c')
-rw-r--r-- | keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c | 79 |
1 files changed, 63 insertions, 16 deletions
diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c index f08ab4f834..9ee3eb8102 100644 --- a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c @@ -2,43 +2,90 @@ extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// 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, obviously, and you can also skip them -// entirely and just use numbers. #define _BASE 0 -#define _FN1 1 +#define _L 1 +#define _R 2 enum custom_keycodes { QWERTY = SAFE_RANGE, }; +#define KC_TL LCTL(KC_PGUP) +#define KC_TR LCTL(KC_PGDN) +#define KC_TC LCTL(KC_W) +#define KC_TRO LCTL(LSFT(KC_T)) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65( // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ - 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_DEL, KC_HOME,\ + KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 , KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSPC ,KC_DEL ,KC_MINS ,KC_EQL ,KC_HOME, // ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC ,KC_RBRC ,KC_BSLS ,KC_END , // ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\ + KC_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_PGUP , // ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _______, KC_PGDN,\ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT, _______ ,KC_PGDN , // ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤ - KC_LCTL, KC_LGUI, KC_LALT, MO(_FN1), KC_SPC, KC_SPC ,_______, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_CAPS ,KC_LCTL ,KC_LALT ,MO(_L) ,KC_SPC , KC_SPC ,_______ ,KC_LGUI ,TG(_R) ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT // └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘ ), - [_FN1] = LAYOUT_65( + [_L] = LAYOUT_65( // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ - 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_BSPC, KC_DEL, KC_INS, \ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 , KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ ,_______ ,_______ ,_______ ,KC_INS , // ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS,\ + _______ ,KC_F11 ,KC_F12 ,_______ ,_______ ,_______ , _______ ,KC_MINS ,KC_EQL ,_______ ,_______ ,_______ ,_______ ,_______, KC_PAUS , // ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ ,_______ ,_______ ,_______ , // ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,KC_PGDN ,KC_PGUP ,KC_HOME ,KC_END ,_______ ,_______ ,_______ , // ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ +// └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_R] = LAYOUT_65( +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , +// ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ + _______ ,KC_TL ,KC_TR ,KC_TC ,KC_TRO ,_______ , _______ ,KC_TL , KC_TR , KC_TC , KC_TRO ,_______ ,_______ ,_______, _______ , +// ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ + _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ ,_______ ,_______ ,_______ , +// ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ + _______ ,KC_PGDN ,KC_PGUP ,KC_HOME ,KC_END ,_______ , _______ ,KC_PGDN ,KC_PGUP ,KC_HOME ,KC_END ,_______ ,_______ ,_______ , +// ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ // └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘ ) }; + +void keyboard_post_init_user(void) { + rgblight_sethsv_noeeprom(HSV_BLUE); +} + +void update_led(void) { + switch (biton32(layer_state)) { + case _BASE: + rgblight_sethsv_noeeprom(HSV_BLUE); + break; + case _L: + rgblight_sethsv_noeeprom(HSV_CORAL); + break; + case _R: + rgblight_sethsv_noeeprom(HSV_MAGENTA); + break; + } + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgblight_sethsv_range(HSV_WHITE,0,4); + rgblight_sethsv_range(HSV_WHITE,12,16); + } +} + +uint32_t layer_state_set_user(uint32_t state) { + update_led(); + return state; +} + +void led_set_user(uint8_t usb_led) { + update_led(); +} |