44f3c614c2
* updates to my iris keymap * some rational updates to the keymap - let's see how this works * updates to my iris keymap * some rational updates to the keymap - let's see how this works * add mouse keys and remove unused keys and some cleanup * a little bit more cleanup * actually enable mousekeys * fix markdown lint complaints * fix capitalization * changes made per suggestions
117 lines
5.2 KiB
C
117 lines
5.2 KiB
C
#include QMK_KEYBOARD_H
|
|
|
|
extern keymap_config_t keymap_config;
|
|
|
|
enum layer_names {
|
|
_QWERTY,
|
|
_LOWER,
|
|
_RAISE,
|
|
_ADJUST
|
|
};
|
|
|
|
enum custom_keycodes {
|
|
LOWER = SAFE_RANGE,
|
|
RAISE,
|
|
};
|
|
|
|
#define KC_ KC_TRNS
|
|
|
|
#define KC_LOWR LOWER
|
|
#define KC_RASE RAISE
|
|
#define KC_RST RESET
|
|
#define KC_BL_S BL_STEP
|
|
|
|
// left control as a left key too - makes perfect sense
|
|
#define KC_LECL LCTL_T(KC_LEFT)
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
[_QWERTY] = LAYOUT_kc(
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
LSFT, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,RSFT,
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
LGUI,LOWR,ENT , SPC ,RASE,RALT
|
|
// `----+----+----' `----+----+----'
|
|
),
|
|
|
|
[_LOWER] = LAYOUT_kc(
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL ,
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
, , UP , , , , , ,BTN1, , , ,
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
,LEFT,DOWN,RGHT, , , MS_L,MS_D,MS_U,MS_R, , ,
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
, , , , , , , , , , , , , ,
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
, , , , ,
|
|
// `----+----+----' `----+----+----'
|
|
|
|
),
|
|
[_RAISE] = LAYOUT_kc(
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
, ,VOLU, , ,LBRC, RBRC,UNDS,PLUS, , ,MUTE,
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
,MPLY,VOLD,MNXT, ,LPRN, RPRN,MINS,EQL , , , ,
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
, , , , , , , , , , , , , ,
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
, , , , ,
|
|
// `----+----+----' `----+----+----'
|
|
),
|
|
|
|
[_ADJUST] = LAYOUT(
|
|
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
|
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
|
RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
|
|
//|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
|
|
BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
//`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
|
|
_______, _______, _______, _______, _______, _______
|
|
// `--------+--------+--------' `--------+--------+--------'
|
|
)
|
|
|
|
};
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
|
#endif
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
switch (keycode) {
|
|
case LOWER:
|
|
if (record->event.pressed) {
|
|
layer_on(_LOWER);
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
} else {
|
|
layer_off(_LOWER);
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
}
|
|
return false;
|
|
break;
|
|
case RAISE:
|
|
if (record->event.pressed) {
|
|
layer_on(_RAISE);
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
} else {
|
|
layer_off(_RAISE);
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
}
|
|
return false;
|
|
break;
|
|
}
|
|
return true;
|
|
}
|