From f3edef8c69384d92c026c4ffbcc167464d045c03 Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Tue, 5 Nov 2019 19:02:07 +0900 Subject: feat: adds pairing key --- quantum/quantum.c | 11 +++++++++++ quantum/quantum_keycodes.h | 3 +++ 2 files changed, 14 insertions(+) (limited to 'quantum') diff --git a/quantum/quantum.c b/quantum/quantum.c index a268e0dc03..27d08996be 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -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 } diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index af984a7cd7..872aa89bc4 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -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 }; -- cgit v1.2.3