feat: adds pairing key

This commit is contained in:
Florian Didron
2019-11-05 19:02:07 +09:00
committed by Drashna Jael're
parent 39c6035657
commit afdba6115a
10 changed files with 88 additions and 9 deletions

View File

@@ -57,6 +57,10 @@
# include "encoder.h"
#endif
#ifdef WEBUSB_ENABLE
# include "webusb.h"
#endif
#ifdef AUDIO_ENABLE
# ifndef GOODBYE_SONG
# define GOODBYE_SONG SONG(GOODBYE_SOUND)
@@ -712,6 +716,13 @@ bool process_record_quantum(keyrecord_t *record) {
}
return false;
}
#endif
#ifdef WEBUSB_ENABLE
case WEBUSB_PAIR:
if (record->event.pressed) {
webusb_state.paired = true;
}
return false;
#endif
}

View File

@@ -503,6 +503,9 @@ enum quantum_keycodes {
MAGIC_UNSWAP_CTL_GUI,
MAGIC_TOGGLE_CTL_GUI,
#ifdef WEBUSB_ENABLE
WEBUSB_PAIR,
#endif
// always leave at the end
SAFE_RANGE
};