keyboards/iris-ce/keymap.c

105 lines
5.7 KiB
C
Raw Normal View History

2024-06-26 10:33:54 -05:00
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
#define _QWERTY 0
#define _GAMER 1
#define _RETRO_GAMER 2
#define _LEFT 3
#define _RIGHT 4
#define _ADJUST 5
#define _CONFIG 6
#define ESC_CTL LCTL_T(KC_ESC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = 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(_CONFIG), MO(_CONFIG),KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LGUI, KC_SPC, MO(_LEFT), LT(_RIGHT,KC_ENT),KC_SPC, KC_LALT
),
[_GAMER] = LAYOUT(
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_RETRO_GAMER] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_LEFT] = 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_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(_ADJUST), _______, _______, KC_ENT, _______
),
[_RIGHT] = LAYOUT(
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(_ADJUST),_______
),
[_ADJUST] = LAYOUT(
_______, 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, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_CONFIG] = LAYOUT(
QK_BOOT, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, QK_BOOT,
_______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, DF(_QWERTY), RGB_TOG, _______, DF(_GAMER), DF(_RETRO_GAMER)
)
};
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _GAMER:
rgblight_mode(1);
rgblight_sethsv(HSV_RED);
break;
case _RETRO_GAMER:
rgblight_mode(1);
rgblight_sethsv(HSV_YELLOW);
break;
case _LEFT:
rgblight_mode(1);
rgblight_sethsv(HSV_BLUE);
break;
case _RIGHT:
rgblight_mode(1);
rgblight_sethsv(HSV_GREEN);
break;
case _ADJUST:
rgblight_mode(1);
rgblight_sethsv(HSV_PURPLE);
break;
case _CONFIG:
rgblight_mode(1);
rgblight_sethsv(HSV_ORANGE);
break;
}
return state;
}