Page 1 of 1

ComboBox KeyDown, KeyPress

Posted: 05 Feb 2015, 11:59
by Mex
Hi!

In CB KeyDwon event I get wrong keyCode with cyrillic layout or when ÄÖÜÕ are pressed. In KeyPress everything is OK.
Is this a bug or normal behavior?


Regards
Meelis

Re: ComboBox KeyDown, KeyPress

Posted: 05 Feb 2015, 23:03
by TiKu
Hi,

What do you mean with wrong? For instance which value do you get for the umlaut-o (ö)? With german keyboard layout it is keyCode=192. On german keyboards the umlaut-o has its own key. I'm not 100% sure what the keyCode will be like if the character does not have its own key. I think it would be the same, but I might be wrong.
Could it be that you mix up virtual key codes (that are reported by KeyDown and KeyUp events) and character codes (that are reported by KeyAscii event)? They are different things. For instance the key codes for lower case and upper case are the same (the shift mask differs), but the ascii codes are different, because the ascii code identifies the specific character and not the pressed key.

Regards
TiKu

Re: ComboBox KeyDown, KeyPress

Posted: 06 Feb 2015, 06:55
by Mex
Hi

As they say - Measure twice, cut once, or in my case - Think twice post once. :D
That's what happens, if you must handle 5 projects at the same time.

Sorry and regards
Meelis

Re: ComboBox KeyDown, KeyPress

Posted: 06 Feb 2015, 13:31
by TiKu
Ah, no problem. :-)

Regards
TiKu