Created
February 15, 2019 03:40
-
-
Save BundleOfJoysticks/5e1324eaebf6b82f2fb8b1eaf2224890 to your computer and use it in GitHub Desktop.
QMK Alt-Tab macro
This file contains hidden or 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; | |
} |
I think the macro keycode should be offset (not start at 0):
KC_ALT_TAB = SAFE_RANGE
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The link is broken.