|
|
@ -4,88 +4,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
extern keymap_config_t keymap_config;
|
|
|
|
extern keymap_config_t keymap_config;
|
|
|
|
|
|
|
|
|
|
|
|
#define _QWERTY 0
|
|
|
|
#define _DVORAK 0
|
|
|
|
#define _LOWER 1
|
|
|
|
#define _QWERTY 1
|
|
|
|
#define _RAISE 2
|
|
|
|
#define _GAMING 13
|
|
|
|
|
|
|
|
#define _LOWER 14
|
|
|
|
|
|
|
|
#define _RAISE 15
|
|
|
|
#define _ADJUST 16
|
|
|
|
#define _ADJUST 16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum custom_keycodes {
|
|
|
|
enum custom_keycodes {
|
|
|
|
QWERTY = SAFE_RANGE,
|
|
|
|
DVORAK = SAFE_RANGE,
|
|
|
|
|
|
|
|
GAME,
|
|
|
|
|
|
|
|
DVPR,
|
|
|
|
|
|
|
|
QRTY,
|
|
|
|
|
|
|
|
QUIT,
|
|
|
|
LOWER,
|
|
|
|
LOWER,
|
|
|
|
RAISE,
|
|
|
|
RAISE,
|
|
|
|
ADJUST,
|
|
|
|
ADJUST,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#define KC_ KC_TRNS
|
|
|
|
//Definitions of Different Keys Go Here
|
|
|
|
#define _______ KC_TRNS
|
|
|
|
#define KC_ KC_TRNS
|
|
|
|
|
|
|
|
#define _______ KC_TRNS
|
|
|
|
#define KC_LOWR LOWER
|
|
|
|
|
|
|
|
#define KC_RASE RAISE
|
|
|
|
#define KC_LOWR LOWER
|
|
|
|
#define KC_RST RESET
|
|
|
|
#define KC_RASE RAISE
|
|
|
|
#define KC_BL_S BL_STEP
|
|
|
|
#define KC_RST RESET
|
|
|
|
#define KC_DBUG DEBUG
|
|
|
|
#define KC_BL_S BL_STEP
|
|
|
|
#define KC_RTOG RGB_TOG
|
|
|
|
#define KC_DBUG DEBUG
|
|
|
|
#define KC_RMOD RGB_MOD
|
|
|
|
#define KC_RTOG RGB_TOG
|
|
|
|
#define KC_RHUI RGB_HUI
|
|
|
|
#define KC_RMOD RGB_MOD
|
|
|
|
#define KC_RHUD RGB_HUD
|
|
|
|
#define KC_RHUI RGB_HUI
|
|
|
|
#define KC_RSAI RGB_SAI
|
|
|
|
#define KC_RHUD RGB_HUD
|
|
|
|
#define KC_RSAD RGB_SAD
|
|
|
|
#define KC_RSAI RGB_SAI
|
|
|
|
#define KC_RVAI RGB_VAI
|
|
|
|
#define KC_RSAD RGB_SAD
|
|
|
|
#define KC_RVAD RGB_VAD
|
|
|
|
#define KC_RVAI RGB_VAI
|
|
|
|
|
|
|
|
#define KC_RVAD RGB_VAD
|
|
|
|
|
|
|
|
#define KC_DVPR DF(_DVORAK)
|
|
|
|
|
|
|
|
#define KC_GAME DF(_GAMING)
|
|
|
|
|
|
|
|
#define KC_QRTY DF(_QWERTY)
|
|
|
|
|
|
|
|
#define KC_QUIT LSFT(LALT(KC_Q))
|
|
|
|
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// All custom layers should be placed below LOWER, RAISE, and ADJUST -- in that order.
|
|
|
|
|
|
|
|
// LOWER and RAISE have helpful keys on them. ADJUST is to adjust the keyboard's settings.
|
|
|
|
|
|
|
|
// I suppose that a pedestrian way of setting it up would be to make it as close to the old
|
|
|
|
|
|
|
|
// KB as possible and then slowly adjust things from there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//DVORAK (Base Layer)
|
|
|
|
|
|
|
|
[_DVORAK] = LAYOUT_kc(
|
|
|
|
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
|
|
|
|
ESC , 7 , 5 , 3 , 1 , 9 , 2 , 4 , 6 , 8 , 0 ,BSPC,
|
|
|
|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
|
|
|
|
TAB ,SCLN,COMM,DOT , P , Y , F , G , C , R , L ,DEL ,
|
|
|
|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
|
|
|
|
LSFT, A , O , E , U , I , D , H , T , N , S ,RSFT,
|
|
|
|
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
|
|
|
|
LCTL,QUOT, Q , J , K , X ,HOME, END , B , M , W , V , Z ,SLSH,
|
|
|
|
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
|
|
|
|
LALT,LOWR,ENT , SPC ,RASE,LGUI
|
|
|
|
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//QWERTY
|
|
|
|
[_QWERTY] = LAYOUT_kc(
|
|
|
|
[_QWERTY] = LAYOUT_kc(
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
|
|
|
|
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
TAB , ,COMM,DOT , P , Y , F , G , C , R , L ,DEL ,
|
|
|
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,QUOT,
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
LSFT, A , O , E , U , I , D , H , T , N , S ,INS ,
|
|
|
|
LSFT, A , S , D , F , G , H , J , K , L ,SCLN,ENT ,
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
LCTL,QUOT, Q , J , K , X ,HOME, END , B , M , W , V , Z ,RSFT,
|
|
|
|
LCTL, Z , X , C , V , B ,HOME, END , N , M ,COMM,DOT ,SLSH,RSFT,
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
LGUI,LOWR,ENT , SPC ,RASE,LALT
|
|
|
|
LALT,LOWR,SPC , SPC ,RASE,LGUI
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
[_LOWER] = LAYOUT_kc(
|
|
|
|
//GAMING
|
|
|
|
|
|
|
|
[_GAMING] = LAYOUT_kc(
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
|
|
|
|
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
|
|
|
|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
|
|
|
|
QUOT,TAB , Q , W , E , R , T , Y , U , I , O , P ,
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
|
|
|
|
INS ,LSFT, A , S , D , F , G , H , J , K , L ,SCLN,
|
|
|
|
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
|
|
|
|
DEL ,LCTL, Z , X , C , V ,SPC, ENT , B , N , M ,COMM,DOT ,SLSH,
|
|
|
|
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
|
|
|
|
LALT,LOWR,LCTL, SPC ,RASE,LGUI
|
|
|
|
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//GAMELOWER -- For one handed gaming
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//LOWER - MAYBE TRY AND MAKE IT RIGHT HANDED SINCE LOWER IS ON LT?
|
|
|
|
|
|
|
|
[_LOWER] = LAYOUT_kc(
|
|
|
|
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
|
|
|
|
, , , , , , , , , , , ,
|
|
|
|
|
|
|
|
//|----+----+---+----+----+----| |----+----+----+----+----+----|
|
|
|
|
|
|
|
|
, , , , , , , , , , , ,
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
|
|
|
|
, , , , , , ,LEFT, UP ,DOWN,RGHT, ,
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
|
|
|
|
, , , , , , , , , , , , , ,
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
, ,DEL , DEL , , P0
|
|
|
|
, , , , ,
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//RAISE - MAYBE TRY AND MAKE IT LEFT HANDED SINCE RAISE IS ON RT?
|
|
|
|
[_RAISE] = LAYOUT_kc(
|
|
|
|
[_RAISE] = LAYOUT_kc(
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
|
|
|
QUIT, , , , , , , , , , , ,
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
|
|
|
|
, , , , , , , , , , , ,
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
|
|
|
|
, , , , , , , , , , , ,
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
|
|
|
|
, , , , , , , , , , , , , ,
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
, , , , ,
|
|
|
|
, , , , ,
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//ADJUST
|
|
|
|
|
|
|
|
/*TOP ROW: Different custom defined layers, in order
|
|
|
|
|
|
|
|
* 2ND ROW:
|
|
|
|
|
|
|
|
* 3RD ROW:
|
|
|
|
|
|
|
|
* 4TH ROW:
|
|
|
|
|
|
|
|
* LTHUMBS:
|
|
|
|
|
|
|
|
* RTHUMBS:
|
|
|
|
|
|
|
|
*/
|
|
|
|
[_ADJUST] = LAYOUT_kc(
|
|
|
|
[_ADJUST] = LAYOUT_kc(
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
|
|
, , , , , , , , , , , ,
|
|
|
|
DVPR,QRTY, ,GAME, , , , , , , , ,
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , ,
|
|
|
|
BL_S, , , , , , , , , , , ,
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
|
|
,DBUG,RHUD,RSAD,RVAD, , , , , , , ,
|
|
|
|
, , , , , , , , , , , ,
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
|
|
BL_S,RST , , , , , , , , , , , , ,
|
|
|
|
, , , , , , , , , , , , ,RST ,
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
|
|
, , , , ,
|
|
|
|
, , , , ,
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
|
// `----+----+----' `----+----+----'
|
|
|
@ -93,6 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void persistent_default_layer_set(uint16_t default_layer) {
|
|
|
|
void persistent_default_layer_set(uint16_t default_layer) {
|
|
|
|
eeconfig_update_default_layer(default_layer);
|
|
|
|
eeconfig_update_default_layer(default_layer);
|
|
|
|
default_layer_set(default_layer);
|
|
|
|
default_layer_set(default_layer);
|
|
|
@ -100,37 +161,59 @@ void persistent_default_layer_set(uint16_t default_layer) {
|
|
|
|
|
|
|
|
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
switch (keycode) {
|
|
|
|
switch (keycode) {
|
|
|
|
case QWERTY:
|
|
|
|
//After this point, it's all about switching layers
|
|
|
|
|
|
|
|
case DVORAK: //DVORAK here is the base layer
|
|
|
|
|
|
|
|
if (record->event.pressed) {
|
|
|
|
|
|
|
|
persistent_default_layer_set(1UL<<_DVORAK);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case QRTY:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
if (record->event.pressed) {
|
|
|
|
persistent_default_layer_set(1UL<<_QWERTY);
|
|
|
|
persistent_default_layer_set(1UL<<_QWERTY);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GAME: //GAME is now a keycode here
|
|
|
|
|
|
|
|
if (record->event.pressed) {
|
|
|
|
|
|
|
|
persistent_default_layer_set(1UL<<_GAMING); //revert to Qwerty if we're on NSA/Windows
|
|
|
|
|
|
|
|
} //to play V / I / D / E / O ~ G / A / M / E / S
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DVPR:
|
|
|
|
|
|
|
|
if (record->event.pressed) {
|
|
|
|
|
|
|
|
persistent_default_layer_set(1UL<<_DVORAK); //Changes base layer to _DVORAK
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
break;
|
|
|
|
case LOWER:
|
|
|
|
case LOWER:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
if (record->event.pressed) {
|
|
|
|
layer_on(_LOWER);
|
|
|
|
layer_on(_LOWER);
|
|
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
layer_off(_LOWER);
|
|
|
|
layer_off(_LOWER);
|
|
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case RAISE:
|
|
|
|
case RAISE: //Defines what happens when the RAISE key is pressed
|
|
|
|
if (record->event.pressed) {
|
|
|
|
if (record->event.pressed) { //if they key is pressed
|
|
|
|
layer_on(_RAISE);
|
|
|
|
layer_on(_RAISE); //toggle on the RAISE layer
|
|
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST); //update our layers to check if the LOWER key is pressed
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
layer_off(_RAISE);
|
|
|
|
else { //if the key is not pressed
|
|
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
|
|
layer_off(_RAISE); //leave everything alone
|
|
|
|
|
|
|
|
update_tri_layer(_LOWER, _RAISE, _ADJUST); //update the layers???
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case ADJUST:
|
|
|
|
case ADJUST:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
if (record->event.pressed) { //RAISE + LOWER = ADJUST
|
|
|
|
layer_on(_ADJUST);
|
|
|
|
layer_on(_ADJUST);
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
layer_off(_ADJUST);
|
|
|
|
else {
|
|
|
|
|
|
|
|
layer_off(_ADJUST); //Releasing one of them goes to the other one
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|