diff --git a/keyboards/zsa/common/config.h b/keyboards/zsa/common/config.h
deleted file mode 100644
index 001d39c3a8..0000000000
--- a/keyboards/zsa/common/config.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2024 ZSA Technology Labs, Inc <@zsa>
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-#ifdef ORYX_ENABLE
-# ifndef SERIAL_NUMBER
-# define SERIAL_NUMBER "default/latest"
-# endif // SERIAL_NUMBER
-# ifndef RAW_USAGE_PAGE
-# define RAW_USAGE_PAGE 0xFF60
-# endif // RAW_USAGE_PAGE
-# ifndef RAW_USAGE_ID
-# define RAW_USAGE_ID 0x61
-# endif // RAW_USAGE_ID
-#endif // ORYX_ENABLE
diff --git a/keyboards/zsa/common/features.mk b/keyboards/zsa/common/features.mk
index 7da2d1f3ca..f6acef68f1 100644
--- a/keyboards/zsa/common/features.mk
+++ b/keyboards/zsa/common/features.mk
@@ -1,13 +1 @@
VPATH += keyboards/zsa/common
-
-POST_CONFIG_H += keyboards/zsa/common/keycode_aliases.h
-
-ifeq ($(strip $(ORYX_ENABLE)), yes)
- SRC += keyboards/zsa/common/oryx.c
- OPT_DEFS += -DORYX_ENABLE -DORYX_CONFIGURATOR
- POST_CONFIG_H += keyboards/zsa/common/config.h
- RAW_ENABLE := yes
- VIA_ENABLE := no
- RGB_MATRIX_CUSTOM_KB = yes
-else
-endif
diff --git a/keyboards/zsa/ergodox_ez/ergodox_ez.c b/keyboards/zsa/ergodox_ez/ergodox_ez.c
index 21436e2897..75eba2d440 100644
--- a/keyboards/zsa/ergodox_ez/ergodox_ez.c
+++ b/keyboards/zsa/ergodox_ez/ergodox_ez.c
@@ -22,6 +22,10 @@ along with this program. If not, see .
#include "bootmagic.h"
#include "gpio.h"
+#ifdef COMMUNITY_MODULE_ORYX_ENABLE
+# include "oryx.h"
+#endif // COMMUNITY_MODULE_ORYX_ENABLE
+
keyboard_config_t keyboard_config;
__attribute__((weak)) void keyboard_post_init_sub(void) {
@@ -254,14 +258,6 @@ __attribute__((weak)) const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] =
#endif
-#ifdef ORYX_ENABLE
-layer_state_t layer_state_set_kb(layer_state_t state) {
- state = layer_state_set_user(state);
- layer_state_set_oryx(state);
- return state;
-}
-#endif
-
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case LED_LEVEL:
diff --git a/keyboards/zsa/ergodox_ez/ergodox_ez.h b/keyboards/zsa/ergodox_ez/ergodox_ez.h
index 3745e1b526..cc3e1c6cb4 100644
--- a/keyboards/zsa/ergodox_ez/ergodox_ez.h
+++ b/keyboards/zsa/ergodox_ez/ergodox_ez.h
@@ -24,9 +24,6 @@ along with this program. If not, see .
#include
#include
#include "i2c_master.h"
-#ifdef ORYX_ENABLE
-# include "oryx.h"
-#endif // ORYX_ENABLE
extern i2c_status_t mcp23018_status;
diff --git a/keyboards/zsa/ergodox_ez/keymaps/oryx/keymap.json b/keyboards/zsa/ergodox_ez/keymaps/oryx/keymap.json
new file mode 100644
index 0000000000..672caa5de9
--- /dev/null
+++ b/keyboards/zsa/ergodox_ez/keymaps/oryx/keymap.json
@@ -0,0 +1,5 @@
+{
+ "modules": [
+ "zsa/oryx"
+ ]
+}
\ No newline at end of file
diff --git a/keyboards/zsa/ergodox_ez/keymaps/oryx/rules.mk b/keyboards/zsa/ergodox_ez/keymaps/oryx/rules.mk
deleted file mode 100644
index 2f68136efc..0000000000
--- a/keyboards/zsa/ergodox_ez/keymaps/oryx/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-ORYX_ENABLE = yes
diff --git a/keyboards/zsa/moonlander/keymaps/oryx/rules.mk b/keyboards/zsa/moonlander/keymaps/oryx/rules.mk
index e30e0d5226..f9af0446ef 100644
--- a/keyboards/zsa/moonlander/keymaps/oryx/rules.mk
+++ b/keyboards/zsa/moonlander/keymaps/oryx/rules.mk
@@ -1,2 +1 @@
-ORYX_ENABLE = yes
LAYER_LOCK_ENABLE = yes
diff --git a/keyboards/zsa/moonlander/moonlander.c b/keyboards/zsa/moonlander/moonlander.c
index 46a75d473a..fa76895b83 100644
--- a/keyboards/zsa/moonlander/moonlander.c
+++ b/keyboards/zsa/moonlander/moonlander.c
@@ -17,7 +17,10 @@
*/
#include QMK_KEYBOARD_H
-#include "moonlander.h"
+
+#ifdef COMMUNITY_MODULE_ORYX_ENABLE
+# include "oryx.h"
+#endif // COMMUNITY_MODULE_ORYX_ENABLE
keyboard_config_t keyboard_config;
@@ -150,10 +153,11 @@ void keyboard_pre_init_kb(void) {
layer_state_t layer_state_set_kb(layer_state_t state) {
#if !defined(MOONLANDER_USER_LEDS)
state = layer_state_set_user(state);
-# ifdef ORYX_ENABLE
- layer_state_set_oryx(state);
- if (rawhid_state.status_led_control) return state;
-# endif
+# ifdef COMMUNITY_MODULE_ORYX_ENABLE
+ if (rawhid_state.status_led_control) {
+ return state;
+ }
+# endif // COMMUNITY_MODULE_ORYX_ENABLE
if (is_launching || !keyboard_config.led_level) return state;
bool LED_1 = false;
bool LED_2 = false;
diff --git a/keyboards/zsa/moonlander/moonlander.h b/keyboards/zsa/moonlander/moonlander.h
index 34e00e2c0f..136e07fc72 100644
--- a/keyboards/zsa/moonlander/moonlander.h
+++ b/keyboards/zsa/moonlander/moonlander.h
@@ -21,9 +21,6 @@
#pragma once
#include "quantum.h"
-#ifdef ORYX_ENABLE
-# include "oryx.h"
-#endif // ORYX_ENABLE
extern bool mcp23018_leds[];
diff --git a/keyboards/zsa/planck_ez/planck_ez.c b/keyboards/zsa/planck_ez/planck_ez.c
index f13622ac31..73fa45d1fd 100644
--- a/keyboards/zsa/planck_ez/planck_ez.c
+++ b/keyboards/zsa/planck_ez/planck_ez.c
@@ -15,11 +15,15 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include "planck_ez.h"
+#include QMK_KEYBOARD_H
#include
#include
#include "keycodes.h"
+#ifdef COMMUNITY_MODULE_ORYX_ENABLE
+# include "oryx.h"
+#endif // COMMUNITY_MODULE_ORYX_ENABLE
+
keyboard_config_t keyboard_config;
@@ -119,7 +123,7 @@ void keyboard_pre_init_kb(void) {
}
// read kb settings from eeprom
keyboard_config.raw = eeconfig_read_kb();
-#if defined(RGB_MATRIX_ENABLE) && defined(ORYX_CONFIGURATOR)
+#if defined(RGB_MATRIX_ENABLE)
if (keyboard_config.rgb_matrix_enable) {
rgb_matrix_set_flags(LED_FLAG_ALL);
} else {
@@ -130,7 +134,7 @@ void keyboard_pre_init_kb(void) {
keyboard_pre_init_user();
}
-#if defined(RGB_MATRIX_ENABLE) && defined(ORYX_CONFIGURATOR)
+#if defined(RGB_MATRIX_ENABLE)
void keyboard_post_init_kb(void) {
rgb_matrix_enable_noeeprom();
keyboard_post_init_user();
@@ -178,9 +182,6 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
default:
break;
}
-#ifdef ORYX_ENABLE
- layer_state_set_oryx(state);
-#endif
return state;
}
#endif
diff --git a/keyboards/zsa/planck_ez/planck_ez.h b/keyboards/zsa/planck_ez/planck_ez.h
index e0fb146052..3beb349625 100644
--- a/keyboards/zsa/planck_ez/planck_ez.h
+++ b/keyboards/zsa/planck_ez/planck_ez.h
@@ -18,9 +18,6 @@
#pragma once
#include "quantum.h"
-#ifdef ORYX_ENABLE
-# include "oryx.h"
-#endif // ORYX_ENABLE
void planck_ez_right_led_on(void);
void planck_ez_right_led_off(void);
diff --git a/keyboards/zsa/voyager/keymaps/oryx/keymap.json b/keyboards/zsa/voyager/keymaps/oryx/keymap.json
new file mode 100644
index 0000000000..d66fc5de5e
--- /dev/null
+++ b/keyboards/zsa/voyager/keymaps/oryx/keymap.json
@@ -0,0 +1,5 @@
+{
+ "modules": [
+ "zsa/oryx"
+ ]
+}
diff --git a/keyboards/zsa/voyager/keymaps/oryx/rules.mk b/keyboards/zsa/voyager/keymaps/oryx/rules.mk
index e068adbfde..0b48c9cc68 100644
--- a/keyboards/zsa/voyager/keymaps/oryx/rules.mk
+++ b/keyboards/zsa/voyager/keymaps/oryx/rules.mk
@@ -1,3 +1,2 @@
-ORYX_ENABLE = yes
TAP_DANCE_ENABLE = yes
LAYER_LOCK_ENABLE = yes
diff --git a/keyboards/zsa/voyager/voyager.c b/keyboards/zsa/voyager/voyager.c
index e809188f95..24f05ea690 100644
--- a/keyboards/zsa/voyager/voyager.c
+++ b/keyboards/zsa/voyager/voyager.c
@@ -2,7 +2,11 @@
// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna)
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "voyager.h"
+#include QMK_KEYBOARD_H
+
+#ifdef COMMUNITY_MODULE_ORYX_ENABLE
+# include "oryx.h"
+#endif // COMMUNITY_MODULE_ORYX_ENABLE
keyboard_config_t keyboard_config;
@@ -104,9 +108,10 @@ void keyboard_pre_init_kb(void) {
layer_state_t layer_state_set_kb(layer_state_t state) {
state = layer_state_set_user(state);
#if !defined(VOYAGER_USER_LEDS)
-# ifdef ORYX_ENABLE
- layer_state_set_oryx(state);
- if (rawhid_state.status_led_control) return state;
+# ifdef COMMUNITY_MODULE_ORYX_ENABLE
+ if (rawhid_state.status_led_control) {
+ return state;
+ }
# endif
if (is_launching || !keyboard_config.led_level) return state;
uint8_t layer = get_highest_layer(state);
diff --git a/keyboards/zsa/voyager/voyager.h b/keyboards/zsa/voyager/voyager.h
index b60658864e..a00cc995c6 100644
--- a/keyboards/zsa/voyager/voyager.h
+++ b/keyboards/zsa/voyager/voyager.h
@@ -5,9 +5,6 @@
#pragma once
#include "quantum.h"
-#ifdef ORYX_ENABLE
-# include "oryx.h"
-#endif // ORYX_ENABLE
extern bool mcp23018_leds[];
diff --git a/modules/zsa/oryx/config.h b/modules/zsa/oryx/config.h
new file mode 100644
index 0000000000..b9f61ea84e
--- /dev/null
+++ b/modules/zsa/oryx/config.h
@@ -0,0 +1,10 @@
+// Copyright 2024 ZSA Technology Labs, Inc <@zsa>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define RAW_USAGE_PAGE 0xFF60
+#define RAW_USAGE_ID 0x61
+
+#define ORYX_ENABLE
+#define ORYX_CONFIGURATOR
diff --git a/keyboards/zsa/common/keycode_aliases.h b/modules/zsa/oryx/keycode_aliases.h
similarity index 100%
rename from keyboards/zsa/common/keycode_aliases.h
rename to modules/zsa/oryx/keycode_aliases.h
diff --git a/keyboards/zsa/common/oryx.c b/modules/zsa/oryx/oryx.c
similarity index 68%
rename from keyboards/zsa/common/oryx.c
rename to modules/zsa/oryx/oryx.c
index d8bf300a6c..dafce5dbdc 100644
--- a/keyboards/zsa/common/oryx.c
+++ b/modules/zsa/oryx/oryx.c
@@ -1,22 +1,24 @@
// Copyright 2024 ZSA Technology Labs, Inc <@zsa>
// SPDX-License-Identifier: GPL-2.0-or-later
-#include
#include QMK_KEYBOARD_H
+#include
#include "oryx.h"
#include "action_util.h"
+ASSERT_COMMUNITY_MODULES_MIN_API_VERSION(1, 1, 0);
+
uint8_t current_layer = 0;
rawhid_state_t rawhid_state = {
- .paired = false,
- .rgb_control = false,
+ .paired = false,
+ .rgb_control = false,
.status_led_control = false,
};
#if defined(PROTOCOL_LUFA)
bool send_report(uint8_t endpoint, void *report, size_t size);
-#include "usb_descriptor.h"
+# include "usb_descriptor.h"
# define RAW_EP_NAME RAW_IN_EPNUM
#elif defined(PROTOCOL_CHIBIOS)
# include "usb_endpoints.h"
@@ -33,26 +35,26 @@ void raw_hid_send_oryx(uint8_t *data, uint8_t length) {
return;
}
if (!send_report(RAW_EP_NAME, data, length)) {
- #if !defined(PROTOCOL_LUFA)
+#if !defined(PROTOCOL_LUFA)
rawhid_state.paired = false;
- #endif
+#endif
}
}
void oryx_error(uint8_t code) {
uint8_t event[RAW_EPSIZE];
- event[0] = ORYX_EVT_ERROR;
- event[1] = code;
+ event[0] = ORYX_EVT_ERROR;
+ event[1] = code;
raw_hid_send_oryx(event, RAW_EPSIZE);
}
void oryx_layer_event(void) {
uint8_t layer;
uint8_t event[RAW_EPSIZE];
- layer = get_highest_layer(layer_state);
- event[0] = ORYX_EVT_LAYER;
- event[1] = layer;
- event[2] = ORYX_STOP_BIT;
+ layer = get_highest_layer(layer_state);
+ event[0] = ORYX_EVT_LAYER;
+ event[1] = layer;
+ event[2] = ORYX_STOP_BIT;
raw_hid_send_oryx(event, sizeof(event));
}
@@ -74,15 +76,15 @@ void pairing_success_event(void) {
void toggle_smart_layer(void) {
uint8_t event[RAW_EPSIZE];
- event[0] = ORYX_EVT_TOGGLE_SMART_LAYER;
- event[1] = ORYX_STOP_BIT;
+ event[0] = ORYX_EVT_TOGGLE_SMART_LAYER;
+ event[1] = ORYX_STOP_BIT;
raw_hid_send_oryx(event, sizeof(event));
}
void trigger_smart_layer(void) {
uint8_t event[RAW_EPSIZE];
- event[0] = ORYX_EVT_TRIGGER_SMART_LAYER;
- event[1] = ORYX_STOP_BIT;
+ event[0] = ORYX_EVT_TRIGGER_SMART_LAYER;
+ event[1] = ORYX_STOP_BIT;
raw_hid_send_oryx(event, sizeof(event));
}
@@ -109,30 +111,32 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
uint8_t *param = &data[1];
switch (command) {
- case ORYX_CMD_GET_FW_VERSION: {
- uint8_t event[RAW_EPSIZE];
- uint8_t fw_version_size = sizeof(SERIAL_NUMBER);
- uint8_t stop[1];
+ case ORYX_CMD_GET_FW_VERSION:
+ {
+ uint8_t event[RAW_EPSIZE];
+ uint8_t fw_version_size = sizeof(SERIAL_NUMBER);
+ uint8_t stop[1];
- event[0] = ORYX_EVT_GET_FW_VERSION;
- stop[0] = ORYX_STOP_BIT;
+ event[0] = ORYX_EVT_GET_FW_VERSION;
+ stop[0] = ORYX_STOP_BIT;
- memcpy(event + 1, SERIAL_NUMBER, fw_version_size);
- memcpy(event + fw_version_size, stop, 1);
+ memcpy(event + 1, SERIAL_NUMBER, fw_version_size);
+ memcpy(event + fw_version_size, stop, 1);
- raw_hid_send_oryx(event, RAW_EPSIZE);
- break;
- }
+ raw_hid_send_oryx(event, RAW_EPSIZE);
+ break;
+ }
- case ORYX_GET_PROTOCOL_VERSION: {
- uint8_t event[RAW_EPSIZE];
- event[0] = ORYX_EVT_GET_PROTOCOL_VERSION;
- event[1] = ORYX_PROTOCOL_VERSION;
- event[2] = ORYX_STOP_BIT;
+ case ORYX_GET_PROTOCOL_VERSION:
+ {
+ uint8_t event[RAW_EPSIZE];
+ event[0] = ORYX_EVT_GET_PROTOCOL_VERSION;
+ event[1] = ORYX_PROTOCOL_VERSION;
+ event[2] = ORYX_STOP_BIT;
- raw_hid_send_oryx(event, RAW_EPSIZE);
- break;
- }
+ raw_hid_send_oryx(event, RAW_EPSIZE);
+ break;
+ }
case ORYX_CMD_PAIRING_INIT:
pairing_success_event();
@@ -160,8 +164,8 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
set_webhid_effect();
}
uint8_t event[RAW_EPSIZE];
- event[0] = ORYX_EVT_RGB_CONTROL;
- event[1] = rawhid_state.rgb_control;
+ event[0] = ORYX_EVT_RGB_CONTROL;
+ event[1] = rawhid_state.rgb_control;
raw_hid_send_oryx(event, RAW_EPSIZE);
#else
oryx_error(ORYX_ERR_RGB_MATRIX_NOT_ENABLED);
@@ -241,79 +245,87 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
break;
}
break;
- case ORYX_UPDATE_BRIGHTNESS: {
+ case ORYX_UPDATE_BRIGHTNESS:
+ {
#if defined(RGB_MATRIX_ENABLE) && !defined(PROTOCOL_LUFA)
- if (param[0]) {
- rgb_matrix_increase_val_noeeprom();
- } else {
- rgb_matrix_decrease_val_noeeprom();
- }
+ if (param[0]) {
+ rgb_matrix_increase_val_noeeprom();
+ } else {
+ rgb_matrix_decrease_val_noeeprom();
+ }
#else
- oryx_error(ORYX_ERR_RGB_MATRIX_NOT_ENABLED);
+ oryx_error(ORYX_ERR_RGB_MATRIX_NOT_ENABLED);
#endif
- break;
- }
- case ORYX_STATUS_LED_CONTROL: {
- rawhid_state.status_led_control = param[0];
- if (!param[0]) {
+ break;
+ }
+ case ORYX_STATUS_LED_CONTROL:
+ {
+ rawhid_state.status_led_control = param[0];
+ if (!param[0]) {
#ifdef STATUS_LED_1
- STATUS_LED_1(0);
+ STATUS_LED_1(0);
#endif
#ifdef STATUS_LED_2
- STATUS_LED_2(0);
+ STATUS_LED_2(0);
#endif
#ifdef STATUS_LED_3
- STATUS_LED_3(0);
+ STATUS_LED_3(0);
#endif
#ifdef STATUS_LED_4
- STATUS_LED_4(0);
+ STATUS_LED_4(0);
#endif
#ifdef STATUS_LED_5
- STATUS_LED_5(0);
+ STATUS_LED_5(0);
#endif
#ifdef STATUS_LED_6
- STATUS_LED_6(0);
+ STATUS_LED_6(0);
#endif
+ }
+ uint8_t event[RAW_EPSIZE];
+ event[0] = ORYX_EVT_STATUS_LED_CONTROL;
+ event[1] = rawhid_state.status_led_control;
+ raw_hid_send_oryx(event, RAW_EPSIZE);
+ break;
}
- uint8_t event[RAW_EPSIZE];
- event[0] = ORYX_EVT_STATUS_LED_CONTROL;
- event[1] = rawhid_state.status_led_control;
- raw_hid_send_oryx(event, RAW_EPSIZE);
- break;
- }
default:
oryx_error(ORYX_ERR_UNKNOWN_COMMAND);
}
}
-bool pre_process_record_kb(uint16_t keycode, keyrecord_t *record) {
+bool pre_process_record_oryx(uint16_t keycode, keyrecord_t *record) {
+ if (!pre_process_record_oryx_kb(keycode, record)) {
+ return false;
+ }
// While paired, the keyboard sends keystrokes positions to the host
if (rawhid_state.paired == true) {
uint8_t event[RAW_EPSIZE];
- event[0] = record->event.pressed ? ORYX_EVT_KEYDOWN : ORYX_EVT_KEYUP;
- event[1] = record->event.key.col;
- event[2] = record->event.key.row;
- event[3] = ORYX_STOP_BIT;
+ event[0] = record->event.pressed ? ORYX_EVT_KEYDOWN : ORYX_EVT_KEYUP;
+ event[1] = record->event.key.col;
+ event[2] = record->event.key.row;
+ event[3] = ORYX_STOP_BIT;
raw_hid_send_oryx(event, sizeof(event));
}
return true;
}
-void layer_state_set_oryx(layer_state_t state) {
+layer_state_t layer_state_set_oryx(layer_state_t state) {
if (rawhid_state.paired) {
uint8_t layer = get_highest_layer(state);
// Some layer actions (OSL) trigger the layer state change thrice,
// so we need to check if the layer has actually changed
- if (current_layer == layer) return;
+ if (current_layer == layer) {
+ return layer_state_set_oryx_kb(state);
+ }
current_layer = layer;
#if defined(PROTOCOL_LUFA)
// Required for Atmel Boards
wait_ms(10);
#endif
uint8_t event[RAW_EPSIZE];
- event[0] = ORYX_EVT_LAYER;
- event[1] = current_layer;
- event[2] = ORYX_STOP_BIT;
+ event[0] = ORYX_EVT_LAYER;
+ event[1] = current_layer;
+ event[2] = ORYX_STOP_BIT;
raw_hid_send_oryx(event, sizeof(event));
}
+ return layer_state_set_oryx_kb(state);
}
diff --git a/keyboards/zsa/common/oryx.h b/modules/zsa/oryx/oryx.h
similarity index 84%
rename from keyboards/zsa/common/oryx.h
rename to modules/zsa/oryx/oryx.h
index 30db8d798d..9497182716 100644
--- a/keyboards/zsa/common/oryx.h
+++ b/modules/zsa/oryx/oryx.h
@@ -5,27 +5,27 @@
/*
The Oryx Webhid protocol
-Each HID packet is a series of bytes. The first byte is the packet type is the command. The rest of the bytes are the params.
+Each HID packet is a series of bytes. The first byte is the packet type is the command. The rest of the bytes are the
+params.
Before sending a packet, the host needs to be paired or should request a pairing code.
-The pairing code is a sequence of key positions derived from Oryx's firmware version code stored in the FIRMWARE_VERSION define.
+The pairing code is a sequence of key positions derived from Oryx's firmware version code stored in the FIRMWARE_VERSION
+define.
-Once the host has paired, it can freely use the commands define in the Oryx_Command_Code enum for which the board will always respond with a Oryx_Event_Code or a Oryx_Error_Code.
+Once the host has paired, it can freely use the commands define in the Oryx_Command_Code enum for which the board will
+always respond with a Oryx_Event_Code or a Oryx_Error_Code.
*/
#include "quantum.h"
#include "raw_hid.h"
-#ifndef RAW_ENABLE
-# error "Raw hid needs to be enabled, please enable it!"
-#endif
#ifndef RAW_EPSIZE
# define RAW_EPSIZE 32
#endif
#define ORYX_PROTOCOL_VERSION 0x04
-#define ORYX_STOP_BIT -2
+#define ORYX_STOP_BIT -2
enum Oryx_Command_Code {
ORYX_CMD_GET_FW_VERSION,
@@ -87,8 +87,6 @@ void trigger_smart_layer(void);
void set_webhid_effect(void);
void oryx_layer_event(void);
-void layer_state_set_oryx(layer_state_t state);
-
#if defined(RGB_MATRIX_ENABLE) && !defined(KEYBOARD_ergodox_ez_glow)
extern RGB webhid_leds[RGB_MATRIX_LED_COUNT];
diff --git a/modules/zsa/oryx/post_config.h b/modules/zsa/oryx/post_config.h
new file mode 100644
index 0000000000..20f729958c
--- /dev/null
+++ b/modules/zsa/oryx/post_config.h
@@ -0,0 +1,8 @@
+// Copyright 2024 ZSA Technology Labs, Inc <@zsa>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#ifndef SERIAL_NUMBER
+# define SERIAL_NUMBER "default/latest"
+#endif // SERIAL_NUMBER
diff --git a/modules/zsa/oryx/qmk_module.json b/modules/zsa/oryx/qmk_module.json
new file mode 100644
index 0000000000..b912218d6d
--- /dev/null
+++ b/modules/zsa/oryx/qmk_module.json
@@ -0,0 +1,8 @@
+{
+ "maintainer": "drashna",
+ "module_name": "oryx",
+ "features": {
+ "raw": true,
+ "via": false
+ }
+}
diff --git a/keyboards/zsa/common/rgb_matrix_kb.inc b/modules/zsa/oryx/rgb_matrix_kb.inc
similarity index 100%
rename from keyboards/zsa/common/rgb_matrix_kb.inc
rename to modules/zsa/oryx/rgb_matrix_kb.inc
diff --git a/modules/zsa/oryx/rules.mk b/modules/zsa/oryx/rules.mk
new file mode 100644
index 0000000000..80dfc8683a
--- /dev/null
+++ b/modules/zsa/oryx/rules.mk
@@ -0,0 +1,2 @@
+POST_CONFIG_H += keyboards/zsa/common/keycode_aliases.h
+RGB_MATRIX_CUSTOM_KB = yes