Jump to content
  • 0
iljitsch

How to read raw keyboard codes?

Question

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.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please review our Terms of Use