bugGlobulation 2 - Bugs: bug #19602, using “+” to adjust requested...

 
 

bug #19602: using “+” to adjust requested workers fails on many keyboards

Submitted by:  Joe Wells <jbw>
Submitted on:  Mon 16 Apr 2007 06:39:24 AM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: NoneOperating System: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 27 Jul 2007 07:01:40 AM UTC, comment #6:

Bradley Arsenault writes:

> The new keyboard shortcut system uses unicode-mapped characters for
> all but the special keys (like enter and backspace etc..)


Hurray! Thanks for fixing this!

Joe Wells <jbw>
Fri 27 Jul 2007 05:10:07 AM UTC, comment #5:

This bug is closed. The new keyboard shortcut system uses unicode-mapped characters for all but the special keys (like enter and backspace etc..)

Bradley Arsenault <genixpro>
Project Administrator
Fri 27 Apr 2007 06:34:28 PM UTC, comment #4:

Thanks for fixing things so that "+" works on my keyboard. Of course, the core problem still remains: the code is inspecting keycodes instead of characters, and therefore will fail for some commands on some keyboards. So is this bug really "fixed"? I think it should remain as a reminder of a long-term issue to be fixed.

Joe Wells <jbw>
Tue 17 Apr 2007 02:17:39 AM UTC, comment #3:

I have done a partial fix, SDLK_PLUS and SDLK_KP_PLUS both work on my system. The problem seems to be that SDLK_KP_PLUS doesn't work on some keyboard layouts.

I've solved it bassically by adding in SDLK_EQUALS to do the same thing, so that one doesn't have to click shift to get to the plus key.

Bradley Arsenault <genixpro>
Project Administrator
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. ☺

Joe Wells <jbw>
Mon 16 Apr 2007 07:59:49 AM UTC, comment #1:

The correct patch is to use unicode value of key, after translation by SDL, not putting all possibnle keymaps into glob2 sources.

Stephane Magnenat <nct>
Project Administrator
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.

Joe Wells <jbw>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by genixpro (Posted a comment)
  • -unavailable- added by nct (Posted a comment)
  • -unavailable- added by jbw (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 27 Jul 2007 05:10:07 AM UTCgenixproOpen/ClosedOpen=>Closed
    Tue 17 Apr 2007 02:17:39 AM UTCgenixproStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1