diff options
Diffstat (limited to 'keyboards/kbdfans/kbd6x/keymaps')
-rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h | 3 | ||||
-rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | 181 | ||||
-rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk | 19 | ||||
-rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/wanleg/keymap.c | 82 | ||||
-rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk | 3 |
5 files changed, 0 insertions, 288 deletions
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h deleted file mode 100644 index 4b511eb848..0000000000 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#define LAYER_FN diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c deleted file mode 100644 index a8a369a611..0000000000 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ /dev/null @@ -1,181 +0,0 @@ -#include QMK_KEYBOARD_H -#include "konstantin.h" - -enum layers_keymap { - L_RCTRL = LAYERS_KEYMAP, -}; - -enum keycodes_keymap { - RCTRL = RANGE_KEYMAP, -}; - -static inline void reset_light(void) { - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); - rgblight_sethsv(MODERN_DOLCH_RED); -} - -static inline void fn_light(void) { - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val()); -} - -static inline void caps_light(void) { - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val()); -} - -static inline void restore_light(void) { - rgblight_config_t saved = { .raw = eeconfig_read_rgblight() }; - rgblight_mode_noeeprom(saved.mode); - rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val); -} - -static bool last_checked_layer; - -static void check_light_layer(layer_state_t state) { - if (IS_LAYER_ON_STATE(state, L_FN)) { - fn_light(); - } else if (host_keyboard_led_state().caps_lock) { - caps_light(); - } else { - restore_light(); - } - last_checked_layer = true; -} - -static void check_light_led(led_t led_state) { - if (led_state.caps_lock) { - caps_light(); - } else if (IS_LAYER_ON(L_FN)) { - fn_light(); - } else { - restore_light(); - } - last_checked_layer = false; -} - -static void inline check_light(void) { - last_checked_layer - ? check_light_layer(layer_state) - : check_light_led(host_keyboard_led_state()); -} - -void eeconfig_init_keymap(void) { - reset_light(); -} - -static bool skip_led = false; - -layer_state_t layer_state_set_keymap(layer_state_t state) { - static layer_state_t prev_state = L_BASE; - if (IS_LAYER_ON_STATE(state, L_FN) != IS_LAYER_ON_STATE(prev_state, L_FN)) { - check_light_layer(state); // Fn state changed since last time - skip_led = IS_LAYER_ON_STATE(state, L_FN); - // led_set_keymap will be called automatically after this - } - return prev_state = state; -} - -void led_set_keymap(uint8_t usb_led) { - if (skip_led) { - skip_led = false; - return; // Skip calls triggered by the Fn layer turning on - } - check_light_led(usb_led); -} - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RGB_TOG ... RGB_SPD: - if (record->event.pressed) { - // Shift+Toggle = reset RGB - if (keycode == RGB_TOG && get_mods() & MOD_MASK_SHIFT) { - reset_light(); - return false; - } - restore_light(); - } else { - check_light(); - } - break; - - // Combined RCtrl and layer - // Cannot use LM(L_RCTRL, MOD_RCTL) because it sends LCtrl instead of RCtrl - case RCTRL: - if (record->event.pressed) { - register_code(KC_RCTL); - layer_on(L_RCTRL); - } else { - unregister_code(KC_RCTL); - layer_off(L_RCTRL); - } - break; - } - - return true; -} - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │LCtCps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │LShiftFn│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│FnF│ - * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │LGu│LAlt │ Space │RAlGu│RCt│ - * └───┴─────┴───────────────────────────┴─────┴───┘ - */ - [L_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_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, - LCT_CPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - LSFT_FN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_FNLK, - XXXXXXX, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, RCTRL, XXXXXXX - ), - - /* Fn layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │Hom│ ↑ │End│PgU│ │ │ │ │M1 │M↑ │М2 │M3 │ Del │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ ← │ ↓ │ → │PgD│ │ │ │ │M← │M↓ │M→ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│App│MW↑│M4 │М5 │ │ │ - * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │ │ │ MW↓ │MAcl2│ │ - * └───┴─────┴───────────────────────────┴─────┴───┘ - */ - [L_FN] = LAYOUT( - _______, 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_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_APP, KC_WH_U, KC_BTN4, KC_BTN5, _______, _______, - XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX - ), - - /* RCtrl layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Clr│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │Top│Mv↑│Btm│TPr│ │ │ │ │ │ │ │ │DelNx│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │Mv←│Mv↓│Mv→│TNx│ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │RTg│RV-│RV+│RMd│ │ │ │ │ │ │ │ │ - * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │DPR│DstNA│ │RGui │ │ - * └───┴─────┴───────────────────────────┴─────┴───┘ - */ - [L_RCTRL] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, - _______, TOP, MV_UP, BOTTOM, TAB_PRV, _______, _______, _______, _______, _______, _______, _______, _______, DEL_NXT, - _______, MV_LEFT, MV_DOWN, MV_RGHT, TAB_NXT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, - XXXXXXX, DST_P_R, DST_N_A, _______, KC_RGUI, _______, XXXXXXX - ), -}; diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk deleted file mode 100644 index 9ce299ed68..0000000000 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ /dev/null @@ -1,19 +0,0 @@ -# Generic features -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODEMAP_ENABLE = no - -# Keyboard-specific features -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = yes -VIA_ENABLE = yes - -# Firmware size reduction -GRAVE_ESC_ENABLE = no -MAGIC_ENABLE = no -SPACE_CADET_ENABLE = no diff --git a/keyboards/kbdfans/kbd6x/keymaps/wanleg/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/wanleg/keymap.c deleted file mode 100644 index 75eb2f6074..0000000000 --- a/keyboards/kbdfans/kbd6x/keymaps/wanleg/keymap.c +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright 2018 wanleg - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include QMK_KEYBOARD_H -#include "wanleg.h" - - -#define LAYOUT_kbd6x_base( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ - ) \ - LAYOUT_wrapper( \ - 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_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_LBRC, KC_RBRC, KC_BSLS, \ - KC_CAPS, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, KC_ENT, \ - KC_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_LSFT, FUNCTION, \ - KC_LCTL, KC_LGUI, KC_LALT, LT(gDIR,KC_SPC), KC_RALT, KC_RGUI, KC_RCTL \ - ) -#define LAYOUT_kbd6x_base_wrapper(...) LAYOUT_kbd6x_base(__VA_ARGS__) - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[gGK] = LAYOUT_kbd6x_base_wrapper( - _______________Gherkin_Row_0_______________, - _______________Gherkin_Row_1_______________, - _______________Gherkin_Row_2_______________ -), - -[gNUM] = LAYOUT_kbd6x_base_wrapper( - _______________Gherkin_NUM_0_______________, - _______________Gherkin_NUM_1_______________, - _______________Gherkin_NUM_2_______________ -), - -[gDIR] = LAYOUT_kbd6x_base_wrapper( - _______________Gherkin_DIR_0_______________, - _______________Gherkin_DIR_1_______________, - _______________Gherkin_DIR_2_______________ -), - -[gETC] = LAYOUT_kbd6x_base_wrapper( - _______________Gherkin_ETC_0_______________, - _______________Gherkin_ETC_1_______________, - _______________Gherkin_ETC_2_______________ -), - -[_FN] = LAYOUT_kbd6x_base_wrapper( - _______________Gherkin_FN_0________________, - _______________Gherkin_FN_1________________, - _______________Gherkin_FN_2________________ -), - -//mac layout -[_QW] = LAYOUT_wrapper( - 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_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(ONE), - KC_LCTL, MO(ONE), KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT, KC_RCTL - ), - -[ONE] = LAYOUT_wrapper( - KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, - _______, BL_BRTG, BL_DOWN, BL_UP, BL_TOGG, BL_STEP, BL_ON, KC_PGUP, KC_HOME, _______, _______, _______, _______, _______, - _______, RGB_M_B, RGB_VAD, RGB_VAI, RGB_TOG, RGB_MOD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, - _______, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, KC_PGDN, KC_END, _______, gGHERKIN,_______, _______, - _______, _______, _______, _______, _______, _______, _______ - ), -}; diff --git a/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk deleted file mode 100644 index 76c2575819..0000000000 --- a/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400)
\ No newline at end of file |