Keymap: Update personal keymap (#3855)

* Updated personal keymap

* simplified keymap based on suggestions
master
Matthew Treadwell 2018-09-05 16:39:00 -07:00 committed by Drashna Jaelre
parent e72d07c22b
commit c3b3f33c6a
2 changed files with 24 additions and 42 deletions

View File

@ -16,6 +16,12 @@
#define TAPPING_TERM 150 #define TAPPING_TERM 150
/* default layer sounds */
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
SONG(GAME_SOUND), \
SONG(COLEMAK_SOUND) \
}
//#undef RGBLED_NUM //#undef RGBLED_NUM
//#define RGBLIGHT_ANIMATIONS //#define RGBLIGHT_ANIMATIONS
//#define RGBLED_NUM 12 //#define RGBLED_NUM 12

View File

@ -4,7 +4,7 @@ extern keymap_config_t keymap_config;
#define _QWERTY 0 #define _QWERTY 0
#define _COLEMAK 1 #define _COLEMAK 1
#define _DVORAK 2 #define _GAME 2
#define _NUMB 3 #define _NUMB 3
#define _CODE 4 #define _CODE 4
#define _SYS 5 #define _SYS 5
@ -14,7 +14,7 @@ extern keymap_config_t keymap_config;
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, QWERTY = SAFE_RANGE,
COLEMAK, COLEMAK,
DVORAK, GAME,
NUMB, NUMB,
CODE, CODE,
SYS, SYS,
@ -25,13 +25,9 @@ enum custom_keycodes {
#define KC_ KC_TRNS #define KC_ KC_TRNS
#define _______ KC_TRNS #define _______ KC_TRNS
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
#define KC_X1 CODE #define KC_X1 CODE
#define KC_X2 NUMB #define KC_X2 NUMB
#define KC_X3 SYS #define KC_X3 MO(_SYS)
#define KC_X4 MT(MOD_LSFT, KC_ENT) #define KC_X4 MT(MOD_LSFT, KC_ENT)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -60,25 +56,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//`----+----+----+----+----+----' `----+----+----+----+----+----' //`----+----+----+----+----+----' `----+----+----+----+----+----'
), ),
[_DVORAK] = LAYOUT_kc( [_GAME] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----. //,----+----+----+----+----+----. ,----+----+----+----+----+----.
TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
BSPC, A , O , E , U , I , D , H , T , N , S ,SLSH, ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
X3 ,LCTL,LALT,LGUI, X1 ,LALT, SPC , X2 ,LEFT,DOWN, UP ,RGHT X3 ,LCTL,LALT,LGUI, X2 , SPC, SPC , X1 ,LEFT,DOWN, UP ,RGHT
//`----+----+----+----+----+----' `----+----+----+----+----+----' //`----+----+----+----+----+----' `----+----+----+----+----+----'
), ),
[_NUMB] = LAYOUT_kc( [_NUMB] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----. //,----+----+----+----+----+----. ,----+----+----+----+----+----.
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,PMNS, TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, DEL,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,UNDS, GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,UNDS,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
, ,MPRV,MPLY,MNXT, , ,VOLD,VOLU,MUTE, , , , ,MPRV,MNXT,MPLY, , ,VOLD,VOLU,MUTE, , ,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
, , , , ,LALT, , , , , , , , , , ,LALT, , , , , ,
//`----+----+----+----+----+----' `----+----+----+----+----+----' //`----+----+----+----+----+----' `----+----+----+----+----+----'
@ -90,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+------+----+----+----+----| |----+----+----+----+----+----| //|----+------+----+----+----+----| |----+----+----+----+----+----|
CAPS,SELECT,LEFT,DOWN,RGHT,DEL , PGDN, END,LBRC,RBRC,MINS,UNDS, CAPS,SELECT,LEFT,DOWN,RGHT,DEL , PGDN, END,LBRC,RBRC,MINS,UNDS,
//|----+------+----+----+----+----| |----+----+----+----+----+----| //|----+------+----+----+----+----| |----+----+----+----+----+----|
, UNDO ,CUT ,COPY,PASTE, , LEFT,RGHT,LCBR,RCBR,PLUS,PEQL, LSFT, UNDO ,CUT ,COPY,PASTE, , LEFT,RGHT,LCBR,RCBR,PLUS,PEQL,
//|----+------+----+----+----+----| |----+----+----+----+----+----| //|----+------+----+----+----+----| |----+----+----+----+----+----|
, , , , ,LALT, , , , , , , , , , ,LALT, , , , , ,
//`----+------+----+----+----+----' `----+----+----+----+----+----' //`----+------+----+----+----+----' `----+----+----+----+----+----'
@ -98,9 +94,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_SYS] = LAYOUT_kc( [_SYS] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----. //,----+----+----+----+----+----. ,----+----+----+----+----+----.
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
, , , , , , , , , , , , , , , , , , , , , , , ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
, , , , , , , , , , , , , , , , , , , , , , , ,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
@ -121,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[_ADJUST] = LAYOUT_ortho_4x12( \ [_ADJUST] = LAYOUT_ortho_4x12( \
_______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, GAME , _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
) )
@ -129,43 +125,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
#ifdef AUDIO_ENABLE
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(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: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
#ifdef AUDIO_ENABLE set_single_persistent_default_layer(_QWERTY);
PLAY_SONG(tone_qwerty);
#endif
persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
#ifdef AUDIO_ENABLE set_single_persistent_default_layer(_COLEMAK);
PLAY_SONG(tone_colemak);
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case GAME:
if (record->event.pressed) { if (record->event.pressed) {
#ifdef AUDIO_ENABLE set_single_persistent_default_layer(_GAME);
PLAY_SONG(tone_dvorak);
#endif
persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;