tmk / tmk_keyboard

Keyboard firmwares for Atmel AVR and Cortex-M
3.96k stars 1.7k forks source link

Feature: ibmpc_usb lock state indicators on converter itself #755

Open an-achronism opened 1 year ago

an-achronism commented 1 year ago

Refactored LED indicator routine to incorporate updating LEDs on the converter itself (LEDs wired directly to controller pins) primarily for the sake of keyboards that speak unidirectional protocols and/or have no LED indicators on them. Still safeguards sending IBM-formatted LED control byte to "XT" protocol keyboards or anything that has not yet been identified, just does it in a different place to facilitate controlling the LEDs on the converter.

If there are any issues with the way I've structured the converter LED part, I have a separate branch on which I just refactored the existing routine to make it slightly more efficient (specifically, it now only converts the USB HID format LED control byte to IBM format if it's already determined that it will be sending it to the keyboard, whereas before it did the translation anyway and could then decide afterwards that it was not going to be used).

Note: Mousekeys disabled by default because even when using avr-gcc 5.4 or 5.5, I cannot get TMK to compile either on Ubuntu 20.04 LTS or on macOS with Mousekeys disabled (not just because of my changes, but also from master branch).