From 65c8ac9ac9ad66405eaf65f742bdbdd6a73685c2 Mon Sep 17 00:00:00 2001 From: Josef Adamcik Date: Sat, 2 May 2020 10:03:17 +0200 Subject: Add more improvements from PR --- keyboards/sofle/keymaps/default/keymap.c | 38 +++++++++++++++----------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'keyboards/sofle/keymaps') diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c index 9ef4de08d..1b332713e 100644 --- a/keyboards/sofle/keymaps/default/keymap.c +++ b/keyboards/sofle/keymaps/default/keymap.c @@ -22,8 +22,6 @@ enum custom_keycodes { KC_DLINE }; -#define ______ KC_TRNS -#define XXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* @@ -46,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_ENT, KC_SPC, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI \ ), /* @@ -69,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \ KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LGUI,KC_LALT,KC_LCTRL,KC_LOWER, KC_ENT, KC_SPC, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI \ ), /* LOWER @@ -87,11 +85,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------' '------''---------------------------' */ [_LOWER] = LAYOUT( \ - ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,\ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,\ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, \ - ______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ - ______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, ______, ______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______\ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ ), /* RAISE * ,----------------------------------------. ,-----------------------------------------. @@ -108,11 +106,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------' '------''---------------------------' */ [_RAISE] = LAYOUT( \ - ______, ______ , ______ , ______ , ______ , ______, ______, ______ , ______, ______ , ______ ,______, \ - ______, KC_INS, KC_PSCR, KC_APP, XXXXXX, XXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,KC_DLINE, KC_BSPC, \ - ______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, \ - ______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXX, ______, ______, XXXXXX, KC_LSTRT, XXXXXX, KC_LEND, XXXXXX, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ + _______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______, \ + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,KC_DLINE, KC_BSPC, \ + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, \ + _______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* ADJUST * ,-----------------------------------------. ,-----------------------------------------. @@ -129,11 +127,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------' '------''---------------------------' */ [_ADJUST] = LAYOUT( \ - XXXXXX , XXXXXX, XXXXXX , XXXXXX , XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ - RESET , XXXXXX,KC_QWERTY,KC_COLEMAK,CG_TOGG,XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ - XXXXXX , XXXXXX,CG_TOGG, XXXXXX, XXXXXX, XXXXXX, XXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXX, XXXXXX, \ - XXXXXX , XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXX, XXXXXX, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ + XXXXXXX , XXXXXXX, XXXXXXX , XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RESET , XXXXXXX,KC_QWERTY,KC_COLEMAK,CG_TOGG,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX , XXXXXXX,CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, \ + XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; @@ -160,7 +158,7 @@ static void print_status_narrow(void) { oled_write_ln_P(PSTR("WIN"), false); } - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY: oled_write_ln_P(PSTR("Qwrt"), false); break; @@ -173,7 +171,7 @@ static void print_status_narrow(void) { oled_write_P(PSTR("\n\n"), false); // Print current layer oled_write_ln_P(PSTR("LAYER"), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _COLEMAK: case _QWERTY: oled_write_P(PSTR("Base\n"), false); -- cgit v1.2.3-70-g09d2