bugBos Wars - Bugs: bug #29094, Upper-case non-ASCII hotkey fails,...

 
 

bug #29094: Upper-case non-ASCII hotkey fails, e.g. if I set msgstr "~!Äänet"

Submitted by:  Kalle Olavi Niemitalo <kon>
Submitted on:  Sun 07 Mar 2010 01:19:59 AM UTC  
 
Severity: 2 - MinorItem Group: Bug
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sun 07 Mar 2010 01:19:59 AM UTC, original submission:

This report applies to trunk r9671, with SDL 1.2.13 on Debian.

In the languages/bos-fi.po (Finnish), there is:

msgid "~!Sound"
msgstr "Ään~!et"

The UI would look nicer if the hotkey were at the beginning of the caption, i.e. "~!Äänet". However, if I make that change, then the hotkey doesn't work.

Firstly, gcn::Widget::setHotKey correctly notes that isascii(key) is false and tolower(key) is unlikely to return the correct value, so it saves the U+00C4 directly as mHotKey. This means I need to type in an upper-case Ä (using Shift or Caps Lock) to make the widget recognize the key-press event.

Secondly, the widget still doesn't recognize the key-release event, so the button remains depressed and does not actually trigger. When gcn::SDLInput::pushInput calls gcn::SDLInput::convertKeyCharacter for an SDL_KEYDOWN event, keysym.unicode is U+00C4 ('Ä'); however, on the subsequent SDL_KEYUP event, keysym.unicode is 0, and convertKeyCharacter then uses keysym.sym (SDLK_WORLD_68 = 0xE4). In gcn::FocusHandler::checkHotKey then, only one of these values matches what gcn::Widget::getHotKey returns. checkHotKey does not call tolower because those values are not ASCII.

This bug seems especially harmful for languages that don't use the Latin alphabet. Bulgarian appears to be one of those.

Kalle Olavi Niemitalo <kon>
Project Member

 

(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 kon (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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup