forked from mirror/qmk_firmware
Drop FW Fixes for massdrop alt, ctrl, rocketeer & shift keyboards (#8)
- In config.h of each, added '#define BOOTKEY_HOLD_MS 2000' to define hold time required to active Boot key (was 500ms hardcode) - Updated all active keymap.c files to use this define - Added line in quantum.c in MAGIC_TOGGLE_NKRO case to clear_keyboard() before toggling nkro state to fix stuck key issues when switching NKRO.
This commit is contained in:
committed by
GitHub
parent
8b5e4959a0
commit
99d89b124f
@@ -94,6 +94,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
// Required BOOT key hold time (in ms) for restarting to bootloader -PS081419
|
||||
#define BOOTKEY_HOLD_MS 2000
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
|
||||
@@ -84,7 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +94,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
// Required BOOT key hold time (in ms) for restarting to bootloader -PS081419
|
||||
#define BOOTKEY_HOLD_MS 2000
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
|
||||
@@ -87,7 +87,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
// Required BOOT key hold time (in ms) for restarting to bootloader -PS081419
|
||||
#define BOOTKEY_HOLD_MS 2000
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
|
||||
@@ -231,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
// Required BOOT key hold time (in ms) for restarting to bootloader -PS081419
|
||||
#define BOOTKEY_HOLD_MS 2000
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
|
||||
@@ -243,7 +243,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
if (timer_elapsed32(key_timer) >= BOOTKEY_HOLD_MS) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -647,6 +647,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_TOGGLE_NKRO:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys -PS080919
|
||||
keymap_config.nkro = !keymap_config.nkro;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user