Hello guys
It’s my first entry so please be patient.
I am working on a very old game and I would like to allow Unicode values
for text entries.
First of all I am using keysyms for my game so I can read several keys
together like:
- SHIFT = FIRE
- q = do something
As I want to use Unicode for text input as well I think I have to read
them seperate from the keysms since SHIFT+q=Q which would break the key
reading inside the game.
So my thought is clear: I need to work with keysyms (for game keys) AND
Unicode (for text input).
Now I wonder how to do that best. The keysyms work over a keybuffer so
all keys are registered, even if the game FPS < “typed chars/sec”.
However this bases on the concept that each key has a RELEASED state,
which the Unicode events do not have for sure.
However when I want to read text inputs I just would like to make sure
all keys (that come in the SDL event poll) are printed out.
So maybe I would need sorta buffer for that and I just cannot figure out
how to do that…
This is my main-concern.
To implement this in this very old game base already gives me a headache
and therefor I would like to ask for ideas how to do that best. Maybe
someone would have a small tutorial I could follow or some pseudo code?
Any help on this would be awesome.
I thank in advance and wish you a nice day
Christian