VIA Encoder Map Support (#17734)
This commit is contained in:
parent
493d422406
commit
4efe6330c4
2 changed files with 15 additions and 1 deletions
|
@ -397,6 +397,18 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
|||
dynamic_keymap_set_buffer(offset, size, &command_data[3]);
|
||||
break;
|
||||
}
|
||||
#ifdef ENCODER_MAP_ENABLE
|
||||
case id_dynamic_keymap_get_encoder: {
|
||||
uint16_t keycode = dynamic_keymap_get_encoder(command_data[0], command_data[1], command_data[2] != 0);
|
||||
command_data[3] = keycode >> 8;
|
||||
command_data[4] = keycode & 0xFF;
|
||||
break;
|
||||
}
|
||||
case id_dynamic_keymap_set_encoder: {
|
||||
dynamic_keymap_set_encoder(command_data[0], command_data[1], command_data[2] != 0, (command_data[3] << 8) | command_data[4]);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default: {
|
||||
// The command ID is not known
|
||||
// Return the unhandled state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue