mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-16 00:45:00 +00:00
26 lines
700 B
C
26 lines
700 B
C
#include "quantum.h"
|
|
#include "dshields.h"
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
if (keycode == KC_ESC && record->event.pressed) {
|
|
bool rc = true;
|
|
uint8_t mods = 0;
|
|
if ((mods = get_oneshot_mods()) && !has_oneshot_mods_timed_out()) {
|
|
clear_oneshot_mods();
|
|
unregister_mods(mods);
|
|
rc = false;
|
|
}
|
|
if ((mods = get_oneshot_locked_mods())) {
|
|
clear_oneshot_locked_mods();
|
|
unregister_mods(mods);
|
|
rc = false;
|
|
}
|
|
if (is_oneshot_layer_active()) {
|
|
layer_clear();
|
|
rc = false;
|
|
}
|
|
return rc;
|
|
}
|
|
return true;
|
|
}
|
|
|