Skip to content

Commit

Permalink
feat: adds smart layer trigger key
Browse files Browse the repository at this point in the history
  • Loading branch information
fdidron committed Mar 21, 2024
1 parent 7547154 commit 3165966
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions quantum/oryx.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ void toggle_smart_layer(void) {
raw_hid_send(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;
raw_hid_send(event, sizeof(event));
}

void raw_hid_receive(uint8_t *data, uint8_t length) {
uint8_t command = data[0];
uint8_t *param = &data[1];
Expand Down
2 changes: 2 additions & 0 deletions quantum/oryx.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ enum Oryx_Event_Code {
ORYX_EVT_KEYUP,
ORYX_EVT_RGB_CONTROL,
ORYX_EVT_TOGGLE_SMART_LAYER,
ORYX_EVT_TRIGGER_SMART_LAYER,
ORYX_EVT_GET_PROTOCOL_VERSION = 0XFE,
ORYX_EVT_ERROR = 0xFF,
};
Expand Down Expand Up @@ -75,6 +76,7 @@ void oryx_error(uint8_t code);
void pairing_failed_event(void);
void pairing_succesful_event(void);
void toggle_smart_layer(void);
void trigger_smart_layer(void);

void oryx_layer_event(void);
bool process_record_oryx(uint16_t keycode, keyrecord_t* record);
Expand Down

0 comments on commit 3165966

Please sign in to comment.