From f10b9b0d9b60fa3383b92fdb3ee402219a5a8cd5 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Fri, 7 Feb 2020 12:16:00 +0100 Subject: [PATCH] Prefer KeyPressed() over GetKeyState(), which may help to fix the backspace crashes on Wine: https://www.heidisql.com/forum.php?t=34351 --- source/main.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/main.pas b/source/main.pas index 33042996..202b5128 100644 --- a/source/main.pas +++ b/source/main.pas @@ -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*$';