How to read raw keyboard codes?
How to read raw keyboard codes?
Ever since I got a mechanical keyboard with hot swappable switches I find it very useful to have an app that will show me which key(s) I'm pressing. So I've made several (!) keyboard test programs. I also want to make one for the X16. But... how do I read the raw keycodes produced by the keyboard?
AFAIK on the C64 the KERNAL API only gives you the character a keypress produces, and obviously the C64 tricks for lower level access don't work on the X16 because it uses a completely different keyboard interface.
-
- Posts: 137
- Joined: Tue Jun 30, 2020 3:47 pm
How to read raw keyboard codes?
There's a section in the Programmer's Reference Guide about custom scan code handlers: https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#custom-keyboard-scan-code-handler
However, I believe this only works using the latest version of the ROM built from source (what will eventually become r39).
- svenvandevelde
- Posts: 488
- Joined: Wed Dec 23, 2020 6:30 am
- Location: Belgium, Antwerpen
How to read raw keyboard codes?
On 5/28/2021 at 4:53 PM, Elektron72 said:
There's a section in the Programmer's Reference Guide about custom scan code handlers: https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#custom-keyboard-scan-code-handler
However, I believe this only works using the latest version of the ROM built from source (what will eventually become r39).
Thank you. Was also looking into this.