Prefer KeyPressed() over GetKeyState(), which may help to fix the backspace crashes on Wine: https://www.heidisql.com/forum.php?t=34351

This commit is contained in:
Ansgar Becker
2020-02-07 12:16:00 +01:00
parent 2b443fb8fb
commit f10b9b0d9b

View File

@@ -12826,7 +12826,7 @@ var
TextMatches: Boolean;
begin
// Support for Ctrl+Backspace shortcut in edit + combobox controls
if (Msg.CharCode = VK_BACK) and (GetKeyState(VK_CONTROL) < 0) then begin
if (Msg.CharCode = VK_BACK) and KeyPressed(VK_CONTROL) then begin
SendingControl := Screen.ActiveControl;
rx := TRegExpr.Create;
rx.Expression := '\b\W*\w+\W*$';