mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-25 18:48:05 +06:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
efbfd30318
@ -28,10 +28,11 @@ bool process_joystick_buttons(uint16_t keycode, keyrecord_t *record) {
|
||||
if (keycode < JS_BUTTON0 || keycode > JS_BUTTON_MAX) {
|
||||
return true;
|
||||
} else {
|
||||
uint8_t button_idx = (keycode - JS_BUTTON0);
|
||||
if (record->event.pressed) {
|
||||
joystick_status.buttons[(keycode - JS_BUTTON0) / 8] |= 1 << (keycode % 8);
|
||||
joystick_status.buttons[button_idx / 8] |= 1 << (button_idx % 8);
|
||||
} else {
|
||||
joystick_status.buttons[(keycode - JS_BUTTON0) / 8] &= ~(1 << (keycode % 8));
|
||||
joystick_status.buttons[button_idx / 8] &= ~(1 << (button_idx % 8));
|
||||
}
|
||||
|
||||
joystick_status.status |= JS_UPDATED;
|
||||
|
Loading…
Reference in New Issue
Block a user