You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for regular char, it maps the char (from the button name) to a SDL event (SDLkeysFromChars)
for special keys and emulator commands, it uses SDLkeysymFromCPCkeys on a CPC key
The drawback of this design are:
it depends on the keyboard layout. We have to test it with all layouts (keymap_*.map) to be sure that it works fine
some keys can be problematic (no ideal SDL event corresponding to the CPC_key) whereas the purpose of the virtual keyboard is exactly to provide a workaround for this
It should be possible to map the string to CPC keys and inject them instead. It requires:
removing SDLkeysFromChars (it's only used for this) and replacing it by CPCkeysFromChars
stop posting a KEYDOWN / KEYUP event and post a USEREVENT instead, or even not post an event and handle the key change (call applyKeyPress) directly. Problem: This doesn't cover emulator specific keys (MOD_EMU_KEY). The keyup/keydown logic processing the cpc_key (applyKeyPress + emulator specific) could be moved into a separate function that would be called both for KEYDOWN, KEYUP and USEREVENT
User event code would be either DOWN or UP, data1 would be the cpc_key
The text was updated successfully, but these errors were encountered:
Currently the virtual keyboard inject SDL events.
To do this:
The drawback of this design are:
It should be possible to map the string to CPC keys and inject them instead. It requires:
The text was updated successfully, but these errors were encountered: