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
I'm currently implementing an input field, and for this I need some clarification on how the event.KeyboardEvent attributes work.
If I'm not mistaken, the value of a key input should be in sym
Which is neat because I can in theory directly do a chr(event.sym) to put it on my input field.
The thing is, it does not work nicely with meta key (shift,altgr,etc.). And instead of having 'A' when I pressshift+a, I get the value for a
First : is this the intended behaviour ?
With a program like xev (on linux), I can get the keysym value as well, and when i press shift+a the value is definitely A, not a
So, I could get around this by manually modifying the value of sym when a modifier key is pressed (that I get with mod attribute) but that would be a lot of work and there are a lot of keyboard layout out there, so the mapping I'd be doing would work for me, but not necessarily for someone with another keyboard layout.
Is there a work around for this or is it outside the scope of tcod ?
Thanks again !
The text was updated successfully, but these errors were encountered:
Input fields should use KeyDown events only for special inputs (return, backspace, etc,) and TextInput events for the actual text input itself. The documentation already mentions using TextInput for name entry fields.
Hey,
I'm currently implementing an input field, and for this I need some clarification on how the event.KeyboardEvent attributes work.
If I'm not mistaken, the value of a key input should be in
sym
Which is neat because I can in theory directly do a
chr(event.sym)
to put it on my input field.The thing is, it does not work nicely with meta key (shift,altgr,etc.). And instead of having 'A' when I press
shift+a
, I get the value fora
First : is this the intended behaviour ?
With a program like xev (on linux), I can get the keysym value as well, and when i press
shift+a
the value is definitelyA
, nota
So, I could get around this by manually modifying the value of
sym
when a modifier key is pressed (that I get withmod
attribute) but that would be a lot of work and there are a lot of keyboard layout out there, so the mapping I'd be doing would work for me, but not necessarily for someone with another keyboard layout.Is there a work around for this or is it outside the scope of tcod ?
Thanks again !
The text was updated successfully, but these errors were encountered: