1
0
Fork 0

Various fixes for keyboards not implementing callbacks correctly (#24116)

This commit is contained in:
Joel Challis 2024-07-14 06:38:04 +01:00 committed by GitHub
parent e76069ea4e
commit c0aca9f45c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 30 additions and 33 deletions

View file

@ -19,16 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ps2.h"
#include "led.h"
bool led_update_kb(led_t led_state)
{
uint8_t ps2_led = 0;
if (led_state.scroll_lock)
ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
if (led_state.num_lock)
ps2_led |= (1<<PS2_LED_NUM_LOCK);
if (led_state.caps_lock)
ps2_led |= (1<<PS2_LED_CAPS_LOCK);
ps2_host_set_led(ps2_led);
bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
uint8_t ps2_led = 0;
if (led_state.scroll_lock)
ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
if (led_state.num_lock)
ps2_led |= (1<<PS2_LED_NUM_LOCK);
if (led_state.caps_lock)
ps2_led |= (1<<PS2_LED_CAPS_LOCK);
ps2_host_set_led(ps2_led);
}
return false;
}