-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Hi!
I was trying to use the CPC emulator to bundle a web version of a game I made, but I've noticed that there is a problem with the input handling. Maybe you already know about this problem and that there is no clear solution .
The problem
In
chips-test/examples/sokol/cpc.c
Line 198 in b8a46cc
| case SAPP_EVENTTYPE_CHAR: |
I suppose that you did it that way in order to map any keyboard layout to the original, for example on the CPC's case the symbol " is on the Key 2 but on today's keyboards it may vary.
Solutions?
For our game, I've ignored the char events from A to Z and used the usual key down/up events to detect them, code here. But a more robust solution would be to just map the all key up/down events to the original keyboard's position. Although some keys won't match in some keyboards, it will be the "real position", in Retro Virtual Machine works that way.
We can also add a toggle to change the layout to "physically correct" or not.
Thanks for these emulators by the way!