[Keymap] changes to my userspace and preonic keymap ( spring 2019 ) (#5881)

* feat-user-kuatsure: abstract symbol row out

* feat-user-kuatsure: abstract grouped bracket, brace, paren out

* fix-preonic-kuatsure: remove eol as requested by @drashna

* feat-user-kuatsure: add KC_MAKE and KC_FLSH

thanks to @drashna for the help

* chore-preonic-kuatsure: remove auto shift

* chore-user-kuatsure: move leader seq's to macro syntax

* feat-user-kuatsure: add `KC_VRSN` key

plus use it preonic keymap

* chore-user-kuatsure: namespace keyboard macros `KB`

* chore-preonic-kuatsure: move some keyboardy keys around

* chore-preonic-kuatsure: remove parens, brackets, braces from lower

* chore-user-kuatsure: move tmux window shifts to dbl press leaders

* feat-user-kuatsure: add a computer lock leader seq

* fix-preonic-kuatsure: go back to lower brackets

* chore-preonic-kuatsure: clear out raise

* feat-various-kuatsure: add meh + tab mod tap

* chore-preonic-kuatsure: `raise` eats `game_mod` layer

* fix-preonic-kuatsure: reverse pg up and pg down

* chore-user-kuatsure: add double tap to turn off music

* chore-user-kuatsure: move like seqs together

* chore-preonic-kuatsure: add a few more items to the num pad on raise

* feat-user-kuatsure: re-enable td for <> keys

* chore-user-kuatsure: give a little more grace period for leader

* fix-user-kuatsure: give lock leader a gui buffer

no timer or anything, but alfred doesn't boot up as quickly as I would like sometimes

gui doesn't do anything but gives a little bit of a time bump

* fix-user-kuatsure: changes from @drashna review
master
Jarrett Drouillard 2019-05-23 00:40:16 -04:00 committed by Drashna Jaelre
parent 73715bacc2
commit 03e53dc8a2
6 changed files with 155 additions and 136 deletions

View File

@ -3,9 +3,6 @@
#include "config_common.h"
#define NO_AUTO_SHIFT_SPECIAL
#define NO_AUTO_SHIFT_ALPHA
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PREONIC_SOUND)
// #define STARTUP_SONG SONG(NO_SOUND)

View File

@ -20,20 +20,16 @@
enum preonic_layers {
_QWERTY,
_GAME,
_GAME_MOD,
_LOWER,
_RAISE,
_ADJUST,
};
enum preonic_keycodes {
QWERTY = SAFE_RANGE,
QWERTY = USER_SAFE_RANGE,
GAME,
GAME_MOD,
LOWER,
RAISE,
END_OF_LINE,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -42,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
* | Tab/M| Q | W | E | R | T | Y | U | I | O | P | \ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc/C| A | S | D | F | G | H | J | K | L | ; | ' |
* |------+------+------+------+------+------|------+------+------+------+------+------|
@ -53,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_QWERTY] = LAYOUT_preonic_grid_wrapper( \
KC_GRV, _________________NUMBER_L1_________________, _________________NUMBER_R1_________________, KC_BSPC, \
KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, \
KT_MTAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, \
KT_CESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, \
KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, \
KC_LEAD, GAME, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
@ -61,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Game
*
* Mostly transparent, but wanted to disable gui key, and give different raise / lower layers ( game_mod ).
* Mostly transparent, but wanted to disable gui key.
* Also give a key to get back to qwerty layout.
*
* ,-----------------------------------------------------------------------------------.
@ -73,104 +69,83 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | |Qwerty| | Spc |Game+ | |Game+ | | | | |
* | |Qwerty| | Spc | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_GAME] = LAYOUT_preonic_grid_wrapper( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, QWERTY, _______, KC_SPC, GAME_MOD, _______, _______, GAME_MOD, _______, _______, _______, _______ \
),
/* Game Modifiers
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F9 | F10 | F11 | F12 | ` | | 7 | 8 | 9 | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | F5 | F6 | F7 | F8 | ~ | | 4 | 5 | 6 | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |Shift | F1 | F2 | F3 | F4 | | | 1 | 2 | 3 | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | 0 | 0 | | |
* `-----------------------------------------------------------------------------------'
*/
[_GAME_MOD] = LAYOUT_preonic_grid_wrapper( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, ____________FUNCTION_3____________, KC_GRV, _______, KC_7, KC_8, KC_9, _______, _______, \
_______, ____________FUNCTION_2____________, KC_TILD, _______, KC_4, KC_5, KC_6, _______, _______, \
KC_LSFT, ____________FUNCTION_1____________, _______, _______, KC_1, KC_2, KC_3, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______ \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, QWERTY, _______, KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
* | E`~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | Up | | ` | | { | } | _ | | | |
* | | | | Up | | ` | < | { | } | _ | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | Del | Left | Down | Right| ~ | = | ( | ) | + | : | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | Vol- | Prev | Play | Next | Vol+ | - | [ | ] | | ? | |
* | | Vol- | Prev | Play | Next | Vol+ | - | [ | ] | > | ? | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | Mute | | | | | | Home | PgUp | PgDwn| End |
* | | Mute | | | | | | Home | PgDn | PgUp | End |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_preonic_grid_wrapper( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
_______, _______, _______, KC_UP, _______, KC_GRV, _______, KC_LCBR, KC_RCBR, KC_UNDS, _______, KC_PIPE, \
_______, KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TILD, KC_EQL, KC_LPRN, KC_RPRN, KC_PLUS, KC_COLN, KC_DQT , \
_______, KC_VOLD, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, KC_LBRC, KC_RBRC, _______, KC_QUES, _______, \
_______, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END \
KC_GESC, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______, \
_______, _______, _______, KC_UP, _______, KC_GRV, _______, ____CRBRACES____, KC_UNDS, _______, KC_PIPE, \
_______, KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TILD, KC_EQL, _____PARENS_____, KC_PLUS, KC_COLN, KC_DQT , \
_______, KC_VOLD, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, ___SQBRACKETS___, _______, KC_QUES, _______, \
_______, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | E`~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F9 | F10 | F11 | F12 | | * | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | F9 | F10 | F11 | F12 | | | { | } | | | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F5 | F6 | F7 | F8 | | | ( | ) | < | > | |
* | | F5 | F6 | F7 | F8 | | = | 4 | 5 | 6 | + | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F1 | F2 | F3 | F4 | | | [ | ] | | | |
* | | F1 | F2 | F3 | F4 | | - | 1 | 2 | 3 | / | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | Enter | | Home | PgUp | PgDwn| End |
* | | | | | | | | 0 | 0 | | |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_preonic_grid_wrapper( \
KC_GESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
_______, ____________FUNCTION_3____________, _______, _______, KC_LCBR, KC_RCBR, _______, _______, KC_BSPC, \
_______, ____________FUNCTION_2____________, _______, _______, KC_LPRN, KC_RPRN, KC_LT, KC_GT, _______, \
_______, ____________FUNCTION_1____________, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, \
_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, ____________FUNCTION_3____________, _______, KC_ASTR, KC_7, KC_8, KC_9, KC_0, _______, \
_______, ____________FUNCTION_2____________, _______, KC_EQL, KC_4, KC_5, KC_6, KC_PLUS, _______, \
_______, ____________FUNCTION_1____________, _______, KC_MINS, KC_1, KC_2, KC_3, KC_SLASH, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______ \
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | Reset| Debug| | | | | | | | | Del |
* | | MAKE | FLSH | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | |Aud on|AudOff| | | | | |
* | | RESET| DEBUG| | |Aud on|AudOff| | | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | |MusMod|Mus on|MusOff| | | | | |
* | | VRSN | | |MusMod|Mus on|MusOff| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | |Qwerty| Game | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_preonic_grid_wrapper( \
____________FUNCTION_1____________, ____________FUNCTION_2____________, ____________FUNCTION_3____________, \
_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, MU_MOD, MU_ON, MU_OFF, _______, _______, _______, _______, _______, \
_______, KB_MAKE, KB_FLSH, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, RESET, DEBUG, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, \
_______, KB_VRSN, _______, _______, MU_MOD, MU_ON, MU_OFF, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAME, _______, _______ \
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@ -186,15 +161,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
break;
case GAME_MOD:
if (record->event.pressed) {
layer_on(_GAME_MOD);
} else {
layer_off(_GAME_MOD);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);

View File

@ -1,3 +1,2 @@
BACKLIGHT_ENABLE = no
LEADER_ENABLE = yes
AUTO_SHIFT_ENABLE = yes

View File

@ -1,35 +1,62 @@
#include "kuatsure.h"
#include "version.h"
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LT),
[TD_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_GT)
};
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KB_MAKE:
if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER));
}
return false;
break;
case KB_VRSN:
if (!record->event.pressed) {
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
break;
case KB_FLSH:
if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
":dfu "
#elif defined(BOOTLOADER_HALFKAY)
":teensy "
#elif defined(BOOTLOADER_CATERINA)
":avrdude "
#endif
SS_TAP(X_ENTER)
);
reset_keyboard();
}
return false;
break;
}
return process_record_keymap(keycode, record);
}
void tmux_prefix(void) {
register_code(KC_LCTL);
register_code(KC_SPC);
unregister_code(KC_LCTL);
unregister_code(KC_SPC);
tap_code16(LCTL(KC_SPC));
}
void tmux_pane_zoom(void) {
tmux_prefix();
register_code(KC_Z);
unregister_code(KC_Z);
}
void tmux_pane_switch(uint16_t keycode) {
tmux_prefix();
register_code(KC_Q);
unregister_code(KC_Q);
register_code(keycode);
unregister_code(keycode);
}
void tmux_window_switch(uint16_t keycode) {
tmux_prefix();
register_code(keycode);
unregister_code(keycode);
SEND_STRING("z");
}
LEADER_EXTERNS();
@ -43,69 +70,70 @@ void matrix_scan_user(void) {
// anything you can do in a macro https://docs.qmk.fm/macros.html
// https://docs.qmk.fm/feature_leader_key.html
// Stop music and lock computer via alfred
SEQ_ONE_KEY(KC_H) {
SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER));
}
// Stop music and lock computer via alfred
SEQ_TWO_KEYS(KC_H, KC_H) {
SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER) SS_TAP(X_MEDIA_PLAY_PAUSE));
}
// Whole Screen Shot
SEQ_ONE_KEY(KC_A) {
register_code(KC_LGUI);
register_code(KC_LSFT);
register_code(KC_3);
unregister_code(KC_3);
unregister_code(KC_LSFT);
unregister_code(KC_LGUI);
SEND_STRING(SS_LGUI(SS_LSFT("3")));
}
// Selective Screen Shot
SEQ_ONE_KEY(KC_S) {
register_code(KC_LGUI);
register_code(KC_LSFT);
register_code(KC_4);
unregister_code(KC_4);
unregister_code(KC_LSFT);
unregister_code(KC_LGUI);
SEND_STRING(SS_LGUI(SS_LSFT("4")));
}
// TMUX - shift to pane 1 and zoom
SEQ_ONE_KEY(KC_J) {
tmux_pane_switch(KC_1);
tmux_prefix();
SEND_STRING("q1");
tmux_pane_zoom();
}
// TMUX - shift to first window
SEQ_TWO_KEYS(KC_J, KC_J) {
tmux_prefix();
SEND_STRING("1");
}
// TMUX - shift to pane 2 and zoom
SEQ_ONE_KEY(KC_K) {
tmux_pane_switch(KC_2);
tmux_prefix();
SEND_STRING("q2");
tmux_pane_zoom();
}
// TMUX - shift to second window
SEQ_TWO_KEYS(KC_K, KC_K) {
tmux_prefix();
SEND_STRING("2");
}
// TMUX - shift to pane 3 and zoom
SEQ_ONE_KEY(KC_L) {
tmux_pane_switch(KC_3);
tmux_prefix();
SEND_STRING("q3");
tmux_pane_zoom();
}
// TMUX - shift to third window
SEQ_TWO_KEYS(KC_L, KC_L) {
tmux_prefix();
SEND_STRING("3");
}
// TMUX - shift to last pane and zoom
SEQ_ONE_KEY(KC_SCOLON) {
tmux_prefix();
register_code(KC_SCOLON);
unregister_code(KC_SCOLON);
SEND_STRING(";");
tmux_pane_zoom();
}
// TMUX - shift to first window
SEQ_ONE_KEY(KC_U) {
tmux_window_switch(KC_1);
}
// TMUX - shift to second window
SEQ_ONE_KEY(KC_I) {
tmux_window_switch(KC_2);
}
// TMUX - shift to third window
SEQ_ONE_KEY(KC_O) {
tmux_window_switch(KC_3);
}
}
}

View File

@ -3,12 +3,32 @@
#include "quantum.h"
enum kuatsure_keycodes {
KB_MAKE = SAFE_RANGE,
KB_FLSH,
KB_VRSN,
USER_SAFE_RANGE,
};
enum {
TD_LBRC = 0,
TD_RBRC,
};
#define KT_LBRC TD(TD_LBRC)
#define KT_RBRC TD(TD_RBRC)
#define TAPPING_TERM 200
#define LEADER_TIMEOUT 250
#define LEADER_PER_KEY_TIMING
void tmux_prefix(void);
void tmux_pane_zoom(void);
void tmux_pane_switch(uint16_t keycode);
void tmux_window_switch(uint16_t keycode);
#define KT_CESC CTL_T(KC_ESC)
#define KT_MTAB MEH_T(KC_TAB)
#undef LEADER_TIMEOUT
#define LEADER_TIMEOUT 300
@ -18,6 +38,9 @@ void tmux_window_switch(uint16_t keycode);
#define _________________NUMBER_L1_________________ KC_1, KC_2, KC_3, KC_4, KC_5
#define _________________NUMBER_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0
#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
#define _________________SYMBOL_R1_________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN
#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
@ -30,4 +53,9 @@ void tmux_window_switch(uint16_t keycode);
#define ____________FUNCTION_2____________ KC_F5, KC_F6, KC_F7, KC_F8
#define ____________FUNCTION_3____________ KC_F9, KC_F10, KC_F11, KC_F12
#define ___SQBRACKETS___ KT_LBRC, KT_RBRC
#define _____PARENS_____ KC_LPRN, KC_RPRN
#define ____CRBRACES____ KC_LCBR, KC_RCBR
#define ___ANBRACKETS___ KC_LT, KC_GT
#endif

View File

@ -1,3 +1,4 @@
CONSOLE_ENABLE = no
TAP_DANCE_ENABLE = yes
SRC += kuatsure.c