Hello people, here is a very simple question!

Hello people, here is a very simple question!
Why the OnKeyDown() event can capture the letter/key 'a' value into var KeyChar but the var Key gets 0 as value? This way I can't intercept the keyboard with

case Key of
vkA:
DoSomething();
end;
Instead I would have to uppercase(KeyChar)... you know... any clue?
I am using Berlin up1 and this is a FMX Win32 application.

Comments

  1. I cannot explain why, but at least it is documented:

    "If a pressed key combination can be handled as a printable character or digit, then Key = 0 and KeyChar contains a pressed symbol according to the current keyboard's input language, keyboard mode (CAPS LOCK and NUM LOCK keys), keyboard Shift state, and IME state."

    docwiki.embarcadero.com - FMX.Forms.TCommonCustomForm.KeyDown - RAD Studio API Documentation

    ReplyDelete
  2. Uwe Raabe Thank you for the info! Is there any other way to intercept keys? This will force us to convert and make double "case of"... oh man

    ReplyDelete

Post a Comment