summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c11
-rw-r--r--quantum/quantum_keycodes.h3
2 files changed, 14 insertions, 0 deletions
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)
@@ -713,6 +717,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
}
return process_action_kb(record);
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
};