summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorFlorian Didron <fd@librem.one>2019-11-05 19:02:07 +0900
committerFlorian Didron <fdidron@users.noreply.github.com>2019-12-06 08:20:51 +0900
commitf3edef8c69384d92c026c4ffbcc167464d045c03 (patch)
treeabae48d2dbbe0229902e88059ff87dd6f7f4b9f9 /quantum
parent40e9813ba2620b9b11811f3a2e5d5879a60aee83 (diff)
feat: adds pairing key
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
};