vial: add security-related features

This commit is contained in:
Ilya Zhuravlev
2020-12-27 08:03:10 -05:00
parent 77ddf078f5
commit 6716b76f6c
6 changed files with 90 additions and 2 deletions

View File

@@ -46,6 +46,10 @@ extern backlight_config_t backlight_config;
# include "haptic.h"
#endif
#ifdef VIAL_ENABLE
# include "vial.h"
#endif
#ifdef AUDIO_ENABLE
# ifndef GOODBYE_SONG
# define GOODBYE_SONG SONG(GOODBYE_SOUND)
@@ -121,6 +125,12 @@ __attribute__((weak)) void post_process_record_kb(uint16_t keycode, keyrecord_t
__attribute__((weak)) void post_process_record_user(uint16_t keycode, keyrecord_t *record) {}
void reset_keyboard(void) {
#ifdef VIAL_ENABLE
/* Until keyboard is unlocked, disable processing of the RESET keycode */
if (!vial_unlocked)
return;
#endif
clear_keyboard();
#if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
process_midi_all_notes_off();