Skip to content
Snippets Groups Projects
Commit 7f6697e0 authored by Peter J. Keleher's avatar Peter J. Keleher
Browse files

auto

parent 43e0051b
No related branches found
No related tags found
No related merge requests found
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
// #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details // #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details
// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details // #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details
// #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) // #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle)
// #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. #define LEADER_TIMEOUT 250 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped.
// #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall
// #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. // #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A.
// #define ONESHOT_TIMEOUT 300 // How long before oneshot times out // #define ONESHOT_TIMEOUT 300 // How long before oneshot times out
// #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered // #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered
......
...@@ -6,6 +6,12 @@ enum ctrl_layers { ...@@ -6,6 +6,12 @@ enum ctrl_layers {
_FNC, _FNC,
_KEN, _KEN,
_KEN2, _KEN2,
_PROG
};
enum tapdance_keycodes {
TD_ESC_LGUI_0 = 0,
TD_F1_LGUI_1,
}; };
enum ctrl_keycodes { enum ctrl_keycodes {
...@@ -37,16 +43,22 @@ enum ctrl_keycodes { ...@@ -37,16 +43,22 @@ enum ctrl_keycodes {
bool autoshift_enabled; bool autoshift_enabled;
//Associate our tap dance key with its functionality
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_ESC_LGUI_0] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, RGUI(KC_0)),
[TD_F1_LGUI_1] = ACTION_TAP_DANCE_DOUBLE(KC_F1, RGUI(KC_1)),
};
keymap_config_t keymap_config; keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT( [_QWERTY] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, KC_SLCK, TG(_KEN), \ TD(TD_ESC_LGUI_0), TD(TD_F1_LGUI_1), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, KC_SLCK, TG(_KEN), \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FNC), KC_APP, KC_LEAD, KC_LEFT, KC_DOWN, KC_RGHT \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(_PROG), MO(_FNC), KC_APP, KC_LEAD, KC_LEFT, KC_DOWN, KC_RGHT \
), ),
[_NAV] = LAYOUT( [_NAV] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
...@@ -80,6 +92,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ...@@ -80,6 +92,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, KC_A, KC_1, KC_2, KC_3, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_A, KC_1, KC_2, KC_3, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_QWERTY) \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_QWERTY) \
), ),
[_PROG] = LAYOUT(
LGUI(KC_R), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
LGUI(KC_0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, , \
LGUI(KC_EQL), _______, KENKEN_NUM2, KC_UP, KC_C, KC_U, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, \
LGUI(KC_MINS), _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, KC_A, KC_1, KC_2, KC_3, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_QWERTY) \
),
/* /*
[X] = LAYOUT( [X] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
...@@ -116,7 +136,7 @@ void rgb_matrix_indicators_user(void) ...@@ -116,7 +136,7 @@ void rgb_matrix_indicators_user(void)
switch (biton32(layer_state)) { switch (biton32(layer_state)) {
case _KEN: case _KEN:
for (int i = 0; i < sizeof(positions); i++) { for (int i = 0; i < sizeof(positions); i++) {
rgb_matrix_set_color(i, 0, 0, 0); rgb_matrix_set_color(i, 0xff, 0, 0);
} }
// layer indicator // layer indicator
rgb_matrix_set_color(15, 0xFF, 0, 0); rgb_matrix_set_color(15, 0xFF, 0, 0);
...@@ -324,12 +344,132 @@ void matrix_init_user(void) ...@@ -324,12 +344,132 @@ void matrix_init_user(void)
LEADER_EXTERNS(); LEADER_EXTERNS();
void matrix_scan_user(void) { void matrix_scan_user(void) {
#ifdef NOTDEF
LEADER_DICTIONARY() { LEADER_DICTIONARY() {
leading = false; leading = false;
leader_end(); leader_end();
SEQ_ONE_KEY(KC_F) { SEQ_ONE_KEY(KC_PGUP) {
// Anything you can do in a macro.
register_code(KC_LGUI);
register_code(KC_LCTL);
register_code(KC_LEFT);
unregister_code(KC_LEFT);
unregister_code(KC_LCTL);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_PGDN) {
// Anything you can do in a macro.
register_code(KC_LGUI);
register_code(KC_LCTL);
register_code(KC_RGHT);
unregister_code(KC_RGHT);
unregister_code(KC_LCTL);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_HOME) {
// Anything you can do in a macro.
register_code(KC_LGUI);
register_code(KC_LCTL);
register_code(KC_UP);
unregister_code(KC_UP);
unregister_code(KC_LCTL);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_END) {
// Anything you can do in a macro.
register_code(KC_LGUI);
register_code(KC_LCTL);
register_code(KC_END);
unregister_code(KC_END);
unregister_code(KC_LCTL);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_INS) {
// Anything you can do in a macro.
register_code(KC_LGUI);
register_code(KC_LCTL);
register_code(KC_F);
unregister_code(KC_F);
unregister_code(KC_LCTL);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_DEL) {
// Anything you can do in a macro.
register_code(KC_LGUI);
register_code(KC_LCTL);
register_code(KC_LALT);
register_code(KC_F);
unregister_code(KC_F);
unregister_code(KC_LALT);
unregister_code(KC_LCTL);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_ESC) {
SEND_STRING(SS_LGUI("0"));
}
SEQ_ONE_KEY(KC_F1) {
SEND_STRING(SS_LGUI("1"));
}
SEQ_ONE_KEY(KC_F2) {
SEND_STRING(SS_LGUI("2"));
}
SEQ_ONE_KEY(KC_F3) {
SEND_STRING(SS_LGUI("3"));
}
SEQ_ONE_KEY(KC_F4) {
SEND_STRING(SS_LGUI("4"));
}
SEQ_ONE_KEY(KC_F9) {
register_code(KC_LGUI);
register_code(KC_LALT);
register_code(KC_0);
unregister_code(KC_0);
unregister_code(KC_LALT);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_F5) {
register_code(KC_LGUI);
register_code(KC_LALT);
register_code(KC_1);
unregister_code(KC_1);
unregister_code(KC_LALT);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_F6) {
register_code(KC_LGUI);
register_code(KC_LALT);
register_code(KC_2);
unregister_code(KC_2);
unregister_code(KC_LALT);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_F7) {
register_code(KC_LGUI);
register_code(KC_LALT);
register_code(KC_3);
unregister_code(KC_3);
unregister_code(KC_LALT);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_F8) {
register_code(KC_LGUI);
register_code(KC_LALT);
register_code(KC_4);
unregister_code(KC_4);
unregister_code(KC_LALT);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_F10) {
register_code(KC_LGUI);
register_code(KC_LSFT);
register_code(KC_Y);
unregister_code(KC_Y);
unregister_code(KC_LSFT);
unregister_code(KC_LGUI);
}
SEQ_ONE_KEY(KC_A) {
// Anything you can do in a macro. // Anything you can do in a macro.
SEND_STRING("QMK is awesome."); SEND_STRING("QMK is awesome.");
} }
...@@ -346,7 +486,6 @@ void matrix_scan_user(void) { ...@@ -346,7 +486,6 @@ void matrix_scan_user(void) {
unregister_code(KC_LGUI); unregister_code(KC_LGUI);
} }
} }
#endif
} }
......
TAP_DANCE_ENABLE = yes # Enable tap dance keys
LEADER_ENABLE = yes LEADER_ENABLE = yes
NKRO_ENABLE = yes # USB Nkey Rollover NKRO_ENABLE = yes # USB Nkey Rollover
AUTO_SHIFT_ENABLE = yes # Auto Shift AUTO_SHIFT_ENABLE = yes # Auto Shift
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment