summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2020-01-28 17:13:04 -0800
committerFlorian Didron <fdidron@users.noreply.github.com>2020-02-26 10:15:12 +0900
commite7a2fdc2715d19ccefa8cc8f95b57d2177b0a648 (patch)
treee74cea0aaab418111657f4511623a8a3096d7c80
parented1cbad3e79f57dff3cda1fb567ef7c2385e1b49 (diff)
Make Dynamic Keymaps optional for Oryx
-rw-r--r--common_features.mk1
-rw-r--r--quantum/oryx.c6
-rw-r--r--quantum/oryx.h7
3 files changed, 8 insertions, 6 deletions
diff --git a/common_features.mk b/common_features.mk
index 1ccffc41bd..f19782b818 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -350,7 +350,6 @@ ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
endif
ifeq ($(strip $(ORYX_ENABLE)), yes)
- DYNAMIC_KEYMAP_ENABLE := yes
WEBUSB_ENABLE := yes
SRC += $(QUANTUM_DIR)/oryx.c
OPT_DEFS += -DORYX_ENABLE
diff --git a/quantum/oryx.c b/quantum/oryx.c
index cf1223d0a5..853962ad83 100644
--- a/quantum/oryx.c
+++ b/quantum/oryx.c
@@ -33,6 +33,7 @@ bool webusb_receive_oryx(uint8_t *data, uint8_t length) {
webusb_send(event, sizeof(event));
return true;
}
+#ifdef DYNAMIC_KEYMAP_ENABLE
case ORYX_CMD_LIVE_UPDATE_GET_KEYCODE: {
uint8_t event[5];
// layer, row, col
@@ -173,6 +174,7 @@ bool webusb_receive_oryx(uint8_t *data, uint8_t length) {
reset_keyboard();
return true;
}
+#endif
default:
return webusb_receive_kb(data, length);
}
@@ -210,11 +212,13 @@ bool process_record_oryx(uint16_t keycode, keyrecord_t *record) {
webusb_state.pairing = true;
}
return false;
+#ifdef DYNAMIC_KEYMAP_ENABLE
case MACRO00 ... MACRO15:
if (record->event.pressed) {
dynamic_keymap_macro_send(keycode - MACRO00);
}
return false;
+#endif
}
return true;
}
@@ -232,6 +236,8 @@ void layer_state_set_oryx(layer_state_t state) {
void eeconfig_init_oryx(void) {
// reread settings from flash into eeprom
+#ifdef DYNAMIC_KEYMAP_ENABLE
dynamic_keymap_reset();
dynamic_keymap_macro_reset();
+#endif
}
diff --git a/quantum/oryx.h b/quantum/oryx.h
index 888975c603..6f53db6ea8 100644
--- a/quantum/oryx.h
+++ b/quantum/oryx.h
@@ -7,10 +7,6 @@
# error "WebUSB needs to be enabled, please enable it!"
#endif
-#ifndef DYNAMIC_KEYMAP_ENABLE
-# error "Dynamic Keymaps are not enabled. It must be enabled"
-#endif
-
// enum Oryx_Status_code {
// PLACEHOLDER = WEBUSB_STATUS_SAFE_RANGE,
// }
@@ -54,6 +50,7 @@ enum Oryx_Event_Code {
ORYX_EVT_KEYUP,
};
+#ifdef DYNAMIC_KEYMAP_ENABLE
enum dynamic_macros_keycodes {
MACRO00 = 0x5F12,
MACRO01,
@@ -72,7 +69,7 @@ enum dynamic_macros_keycodes {
MACRO14,
MACRO15,
};
-
+#endif
extern bool oryx_state_live_training_enabled;