diff options
author | patrickmt <40182064+patrickmt@users.noreply.github.com> | 2018-09-05 12:25:47 -0400 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-09-05 11:14:31 -0700 |
commit | e5465e1c57f1ae6b71e1e665e4afd5f5e3909a89 (patch) | |
tree | de019d1d30779a0ddb7a7fefe32a0ad0010dd759 /keyboards/massdrop/ctrl/keymaps/mac | |
parent | 73a3399d0ef7e06db70fc2964a3f2a35e9aca25d (diff) | |
download | qmk_firmware-e5465e1c57f1ae6b71e1e665e4afd5f5e3909a89.tar.gz qmk_firmware-e5465e1c57f1ae6b71e1e665e4afd5f5e3909a89.zip |
CTRL and ALT updates
Added support to enter bootloader from software (bootloader version must be newer than "v2.18Jun 22 2018 17:28:08" until workaround for older is created).
Updated CTRL and ALT keymaps for entering bootloader with Fn+b held for >500ms.
Added basic MacOS keymap for ALT.
USB sleep LED indicator now turns off after 1 second.
Slowed down debug LED code printing.
Diffstat (limited to 'keyboards/massdrop/ctrl/keymaps/mac')
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/mac/keymap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c index 116aaa9a12..a03f891e8c 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c @@ -19,6 +19,7 @@ enum ctrl_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints DBG_KBD, //DEBUG Toggle Keyboard Prints DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -71,6 +72,8 @@ void matrix_scan_user(void) { #define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + switch (keycode) { case L_BRI: if (record->event.pressed) { @@ -197,6 +200,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { CDC_print("\r\n"); } return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; default: return true; //Process all other keycodes normally } |