1
0
Fork 0

Cleanup keymap

This commit is contained in:
Danny Nguyen 2017-03-23 11:25:21 -04:00
parent edfb50ea56
commit 0520341ce4
3 changed files with 89 additions and 110 deletions

View file

@ -7,4 +7,4 @@ void matrix_init_kb(void) {
PORTE |= (1<<6); PORTE |= (1<<6);
matrix_init_user(); matrix_init_user();
}; };

View file

@ -17,7 +17,7 @@
#define _MOVEMENT 5 #define _MOVEMENT 5
#define _ADJUST 16 #define _ADJUST 16
enum preonic_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, QWERTY = SAFE_RANGE,
COLEMAK, COLEMAK,
DVORAK, DVORAK,
@ -30,123 +30,103 @@ enum preonic_keycodes {
// Fillers to make layering more clear // Fillers to make layering more clear
#define _______ KC_TRNS #define _______ KC_TRNS
#define XXXXXXX KC_NO #define XXXXXXX KC_NO
#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC
#define KC_X1 LOWER
#define KC_X2 RAISE
#define KC_X3 MO(_MOVEMENT)
#define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty [_QWERTY] = COMPACT_KEYMAP(
* ,-----------------------------------------------------------------------------------. //,----+----+----+----+----+----. ,----+----+----+----+----+----.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | - | TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
* |------+------+------+------+------+-------------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " | X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
* |------+------+------+------+------+------|------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
* |------+------+------+------+------+------+------+------+------+------+------+------| //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
* | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
* `-----------------------------------------------------------------------------------' //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
*/ ),
[_QWERTY] = KEYMAP( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
KC_ESC, 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, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Colemak [_COLEMAK] = COMPACT_KEYMAP(
* |------+------+------+------+------+------+------+------+------+------+------+------| //,----+----+----+----+----+----. ,----+----+----+----+----+----.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
* |------+------+------+------+------+-------------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | Esc | A | R | S | T | D | H | N | E | I | O | " | X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
* |------+------+------+------+------+------|------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
* |------+------+------+------+------+------+------+------+------+------+------+------| //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
* | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
* `-----------------------------------------------------------------------------------' //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
*/ ),
[_COLEMAK] = KEYMAP( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Dvorak [_DVORAK] = COMPACT_KEYMAP(
* |------+------+------+------+------+------+------+------+------+------+------+------| //,----+----+----+----+----+----. ,----+----+----+----+----+----.
* | Tab | " | , | . | P | Y | F | G | C | R | L | - | TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
* |------+------+------+------+------+-------------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | Esc | A | O | E | U | I | D | H | T | N | S | / | X0 , A , O , E , U , I , D , H , R , N , S ,SLSH,
* |------+------+------+------+------+------|------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
* |------+------+------+------+------+------+------+------+------+------+------+------| //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
* | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
* `-----------------------------------------------------------------------------------' //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
*/ ),
[_DVORAK] = KEYMAP( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINS, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \
KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Lower [_LOWER] = COMPACT_KEYMAP(
* |------+------+------+------+------+-------------+------+------+------+------+------| //,----+----+----+----+----+----. ,----+----+----+----+----+----.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL ,
* |------+------+------+------+------+-------------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE,
* |------+------+------+------+------+------|------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
* |------+------+------+------+------+------+------+------+------+------+------+------| //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
* | | | | | | | | Next | Vol- | Vol+ | Play | , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
* `-----------------------------------------------------------------------------------' //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
*/ ),
[_LOWER] = KEYMAP( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Raise [_RAISE] = COMPACT_KEYMAP(
* |------+------+------+------+------+------+------+------+------+------+------+------| //,----+----+----+----+----+----. ,----+----+----+----+----+----.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL ,
* |------+------+------+------+------+-------------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS,
* |------+------+------+------+------+------|------+------+------+------+------+------| //|----+----+----+----+----+----| |----+----+----+----+----+----|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , ,
* |------+------+------+------+------+------+------+------+------+------+------+------| //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
* | | | | | | | | Next | Vol- | Vol+ | Play | , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
* `-----------------------------------------------------------------------------------' //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
*/ ),
[_RAISE] = KEYMAP( \
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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
[_MOVEMENT] = KEYMAP( \ [_MOVEMENT] = COMPACT_KEYMAP(
KC_TILD, KC_EXLM, KC_MUTE, KC_VOLD, KC_VOLU, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_LPRN, KC_RPRN, KC_DEL, \ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RCBR, KC_PIPE, \ TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL ,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ //|----+----+----+----+----+----| |----+----+----+----+----+----|
_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDOWN, KC_PGUP, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE,
), //|----+----+----+----+----+----| |----+----+----+----+----+----|
, F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
, , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
),
/* Adjust (Lower + Raise) /* Adjust (Lower + Raise)
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------. ,------+------+------+------+------+------|
* | | Reset| | | | | | | | | | Del | * | | Reset| | | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * | | | |Audoff|Aud on|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------| |------+------+------+------+------+------|
* | |Voice-|Voice+|Musoff|Mus on| | | | | | | | * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | * | | | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------' * `-------------------------------------------------------------------------------------------------'
*/ */
[_ADJUST] = KEYMAP( \ [_ADJUST] = KEYMAP( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
) )
}; };
@ -267,4 +247,4 @@ void music_scale_user(void)
PLAY_NOTE_ARRAY(music_scale, false, 0); PLAY_NOTE_ARRAY(music_scale, false, 0);
} }
#endif #endif

View file

@ -1 +0,0 @@
# The default Preonic layout - largely based on the Planck's