-
-
Save tim-tx/959f18b36b72fa5d61b65281ebeef567 to your computer and use it in GitHub Desktop.
QMK Alt-Tab macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab | |
enum macro_keycodes { | |
KC_ALT_TAB | |
}; | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
[0] = LAYOUT( | |
KC_MUTE, KC_ESC, KC_MPLY, \ | |
MO(1), KC_UP, ALT_TAB, \ | |
KC_LEFT, KC_DOWN, KC_RGHT \ | |
), | |
[1] = LAYOUT( | |
RESET, BL_STEP, KC_STOP, \ | |
_______, KC_PGUP, BL_STEP, \ | |
KC_HOME, KC_PGDN, KC_END \ | |
), | |
}; | |
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | |
if (!eeconfig_is_enabled()) { | |
eeconfig_init(); | |
} | |
switch (id) { | |
case KC_ALT_TAB: | |
return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); | |
} | |
return MACRO_NONE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment