Qt: use native VK code provided by qt in TLMKey under windows instead of qt key code -> VK mapping

git-svn-id: trunk@12079 -
This commit is contained in:
paul 2007-09-19 15:46:16 +00:00
parent 615e7fb75a
commit f40ff94387

View File

@ -1458,17 +1458,16 @@ begin
IsSysKey := (QtAltModifier and Modifiers) <> $0;
KeyMsg.KeyData := QtKeyModifiersToKeyState(Modifiers);
{
on windows we can use:
{$ifdef windows}
KeyMsg.CharCode := QKeyEvent_nativeVirtualKey(QKeyEventH(Event));
}
// todo: VK to Win_VK for other os too
{$endif}
// Loads the UTF-8 character associated with the keypress, if any
QKeyEvent_text(QKeyEventH(Event), @Text);
// Translates a Qt4 Key to a LCL VK_* key
if KeyMsg.CharCode = 0 then
KeyMsg.CharCode := QtKeyToLCLKey(QKeyEvent_key(QKeyEventH(Event)), Text);
{------------------------------------------------------------------------------