summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;