Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caps lock state is inconsistent if system reset occurs whilst caps lock is enabled #29

Open
borb opened this issue Sep 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@borb
Copy link
Owner

borb commented Sep 7, 2023

If caps lock has been enabled (caps_lock global set to true in src/platform/amiga/keyboard_serial_io.c), and either the Amiga is reset from the machine-side or by use of the three-fingered-salute, then the caps lock state is inconsistent between the host and the controller. This would mean the caps LED is illuminated, and pressing caps lock will send a caps-release code (0x62 ORed with 0x80). Worst case scenario, this means pressing caps lock twice to get the keyboard into the intended state of being enabled, if required. Minor, I know.

This requires two fixes: ctrl-amiga-amiga should reset any stateful flags (in this case, only caps lock) when reset is asserted. Secondly, if a reset occurs from the Amiga-side, this should be detected and the stateful flags reset. This requires the hid-pico code to monitor. I am not sure how this is achieved (might need to scope the keyboard lines on a real Amiga keyboard to work this out). It's possible a pulse can occur on the reset line to indicate this. The rp2040 can be setup to trigger an interrupt if this occurs, but only if this theory proves to be correct.

@borb borb added the bug Something isn't working label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant