keyboards/iris-ce/keymap.c

113 lines
5.9 KiB
C
Raw Normal View History

2024-06-26 10:33:54 -05:00
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Not sure this goes here...
#define PERMISSIVE_HOLD
// QWERTY
#define LQ 0
#define LG 1
#define LRG 2
#define LL 3
#define LR 4
#define LA 5
#define LC 6
2024-06-26 10:33:54 -05:00
#define ESC_CTL LCTL_T(KC_ESC)
#define LR_ENT LT(LR, KC_ENT)
2024-06-26 10:33:54 -05:00
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LQ] = LAYOUT(
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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
ESC_CTL, 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, MO(LC), MO(LC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LGUI, KC_SPC, MO(LL), LR_ENT, KC_SPC, KC_LALT
2024-06-26 10:33:54 -05:00
),
[LG] = LAYOUT(
2024-06-26 10:33:54 -05:00
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
2024-06-26 10:33:54 -05:00
),
[LRG] = LAYOUT(
2024-06-26 10:33:54 -05:00
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
2024-06-26 10:33:54 -05:00
),
[LL] = LAYOUT(
2024-06-26 10:33:54 -05:00
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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LT, KC_GT, KC_QUES, _______,
_______, MO(LA), _______, MO(LA), KC_ENT, _______
2024-06-26 10:33:54 -05:00
),
[LR] = LAYOUT(
2024-06-26 10:33:54 -05:00
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______,
_______, KC_LALT, MO(LA), _______, MO(LA), _______
2024-06-26 10:33:54 -05:00
),
[LA] = LAYOUT(
2024-06-26 10:33:54 -05:00
_______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_MPRV, KC_VOLD, KC_MPLY, KC_VOLU, KC_MNXT, _______,
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______,
_______, _______, _______, _______, _______, _______
2024-06-26 10:33:54 -05:00
),
[LC] = LAYOUT(
2024-06-26 10:33:54 -05:00
QK_BOOT, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, QK_BOOT,
_______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, DF(LQ), RGB_TOG, _______, DF(LG), DF(LRG)
2024-06-26 10:33:54 -05:00
)
};
layer_state_t layer_state_set_user(layer_state_t state) {
2024-06-27 10:44:39 -05:00
switch (get_highest_layer(state | default_layer_state)) {
case LL:
2024-06-27 10:44:39 -05:00
rgblight_mode_noeeprom(1);
2024-06-26 10:33:54 -05:00
rgblight_sethsv(HSV_BLUE);
break;
case LR:
2024-06-27 10:44:39 -05:00
rgblight_mode_noeeprom(1);
2024-06-26 10:33:54 -05:00
rgblight_sethsv(HSV_GREEN);
break;
case LA:
2024-06-27 10:44:39 -05:00
rgblight_mode_noeeprom(1);
2024-06-26 10:33:54 -05:00
rgblight_sethsv(HSV_PURPLE);
break;
case LC:
2024-06-27 10:44:39 -05:00
rgblight_mode_noeeprom(1);
2024-06-26 10:33:54 -05:00
rgblight_sethsv(HSV_ORANGE);
break;
2024-06-27 10:44:39 -05:00
default:
if (IS_LAYER_ON_STATE(state | default_layer_state, LG)) {
rgblight_mode_noeeprom(1);
rgblight_sethsv(HSV_RED);
} else if (IS_LAYER_ON_STATE(state | default_layer_state, LRG)) {
rgblight_mode_noeeprom(1);
rgblight_sethsv(HSV_YELLOW);
} else {
rgblight_mode_noeeprom(RGB_MATRIX_DEFAULT_MODE);
}
break;
2024-06-26 10:33:54 -05:00
}
return state;
}