Mon 16 Apr 2007 09:09:39 AM UTC, comment #2:
Yes, of course. That is what I wrote.
However, if 0.8.23 is about to be released, and the correct patch has
not been written, it would help hundreds of millions of people if the
stupid patch were put in place. ☺
|
Mon 16 Apr 2007 06:39:24 AM UTC, original submission:
Typing “+” (on my keyboard this is the Shift key together with “=”)
doesn't work. I can only use the keypad “+”. This is a bigger
problem for me because my particular keyboard (which is on my portable
computer) doesn't actually have a keypad and simulates one by using
the num-lock key to temporarily turn many ordinary keys (7, 8, 9, 0,
u, i, o, p, [, j, k, l, ;, m, “,”, ., and /) into keypad keys.
The problem is that glob2 is expecting to get just the SDLK_PLUS key
event (and is ignoring the state of the modifiers). On my keyboard,
the SDL key events glob2 gets for “+” are:
Although some European keyboards have “+” as the base character for a
key, many European keyboards do not and most non-European keyboards do
not. Possible key layouts worldwide include (unshifted/shifted) =/+,
+/?, +/±, +/, 3/+, 1/+, /+, and ;/+. I assume this situation arose
because the main Globulation 2 developers use a keyboard where “+” is
not a shifted key.
I'm currently happily using this patch:
This makes “=” do the same thing as “+”. This solution handles most
North American and Asian keyboards and some European keyboards,
because on these keyboards “+” is merely Shift-“=”. It is also
advantageous, because one can skip actually pressing the Shift key.
The correct solution is to use the SDL library properly. A quick look
at the libsdl documentation installed on my computer at
file:///usr/share/doc/libsdl1.2-dev/docs/html/guideinputkeyboard.html
makes me think that the “unicode” field of the key event will hold the
right information provided the SDL_EnableUNICODE function is called at
initialization time to ask SDL to convert key events into characters.
I thank Steph and Martin Voelkle for feedback on this bug.
|