mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:59:14 +02:00
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:
parent
615e7fb75a
commit
f40ff94387
@ -1458,19 +1458,18 @@ begin
|
|||||||
IsSysKey := (QtAltModifier and Modifiers) <> $0;
|
IsSysKey := (QtAltModifier and Modifiers) <> $0;
|
||||||
KeyMsg.KeyData := QtKeyModifiersToKeyState(Modifiers);
|
KeyMsg.KeyData := QtKeyModifiersToKeyState(Modifiers);
|
||||||
|
|
||||||
{
|
{$ifdef windows}
|
||||||
on windows we can use:
|
|
||||||
|
|
||||||
KeyMsg.CharCode := QKeyEvent_nativeVirtualKey(QKeyEventH(Event));
|
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
|
// Loads the UTF-8 character associated with the keypress, if any
|
||||||
QKeyEvent_text(QKeyEventH(Event), @Text);
|
QKeyEvent_text(QKeyEventH(Event), @Text);
|
||||||
|
|
||||||
// Translates a Qt4 Key to a LCL VK_* key
|
// Translates a Qt4 Key to a LCL VK_* key
|
||||||
KeyMsg.CharCode := QtKeyToLCLKey(QKeyEvent_key(QKeyEventH(Event)), Text);
|
if KeyMsg.CharCode = 0 then
|
||||||
|
KeyMsg.CharCode := QtKeyToLCLKey(QKeyEvent_key(QKeyEventH(Event)), Text);
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Sends the adequate key messages
|
Sends the adequate key messages
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
|
Loading…
Reference in New Issue
Block a user