noesis_user
Topic Author
Posts: 14
Joined: 08 May 2014, 00:04

Shift key displaying weird characters

28 Oct 2014, 19:37

Hi,

Whenever I press SHIFT key it displays weird characters in text box. I am mapping SDL for all the keys but pretty sure sending correct key value. Is there anything missing ?

Thanks.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Shift key displaying weird characters

29 Oct 2014, 17:40

There are two kind of keyboard events in the noesisGUI renderer interface:
  • KeyDown()/KeyUp() for physical keys. It corresponds to WM_KEYDOWN/WM_KEYUP messages in Windows.
  • Char() for translated character events. It corresponds to WM_CHAR messages in Windows.
The problem you are observing is probably because you are passing a physical key (shift) to the Char event. You shouldn't do that, I suppose that SDL has the two kinds of event available.

Who is online

Users browsing this forum: No registered users and 2 guests