mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 20:20:23 +02:00
Qt: proper pass text of keypress when enter pressed (numpad) under macosx.issue #20896
git-svn-id: trunk@34170 -
This commit is contained in:
parent
0daf02b5a9
commit
fe19967858
@ -2701,6 +2701,13 @@ begin
|
||||
// Loads the UTF-8 character associated with the keypress, if any
|
||||
QKeyEvent_text(QKeyEventH(Event), @Text);
|
||||
|
||||
{$IFDEF DARWIN}
|
||||
// qt on mac passes #3 instead of #13 when QtKey_Enter (numpad) is pressed
|
||||
// so our keypress get wrong about key. issue #20896
|
||||
if (QKeyEvent_key(QKeyEventH(Event)) = QtKey_Enter) and (length(Text) = 1) then
|
||||
Text := #13;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF VerboseQtKeys}
|
||||
writeln('> TQtWidget.SlotKey dump begin event=',EventTypeToStr(Event));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user