astralaster / agon-light-emulator

Emulator for the agon light 8-bit computer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better handle keys with shift

lennart-benschop opened this issue · comments

The current logic to convert the keycode in case the SHIFT key is pressed does not work for most symbols.
There is probably a better way to obtain the ASCII code from a key in SDL that does not depend on the keyboard layout.

I already have this locally. It needs some more polish, but I think its a great way to handle the keys without exessive mappings. It uses the SDL textinput, so you receive the ASCII codes in a mapped form from the OS. You cannot switch keymaps via MOS, but you will gain working keys for almost every keymap your OS supports.

For a 1:1 emulation of the key functions we need a mapping from SDL keys to Fabgl VK. But I think at this point in the development we should invest more in the VDP capabilities like colors and graphics and come back to the inputs later.

But in your local situation: can you still get the cursor keys? And control character?

Yes, those keys will still be mapped by scancodes. I just changed how ascii keys are handled. I will publish it later.

Its now pushed. Please try and report back if you encounter any bugs.