From 18d03966ff02a95dfdb5615c5779d03a2552be3b Mon Sep 17 00:00:00 2001 From: zeljan1 Date: Tue, 11 Feb 2025 19:51:01 +0100 Subject: [PATCH] Gtk3: make keys work with synedit. --- lcl/interfaces/gtk3/gtk3procs.pas | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/gtk3/gtk3procs.pas b/lcl/interfaces/gtk3/gtk3procs.pas index 8a71cd897c..3699a4b416 100644 --- a/lcl/interfaces/gtk3/gtk3procs.pas +++ b/lcl/interfaces/gtk3/gtk3procs.pas @@ -733,7 +733,24 @@ end; function GdkKeyToLCLKey(AValue: Word): Word; begin if AValue <= $FF then - exit(AValue); + begin + if (AValue = GDK_KEY_plus) then + exit(VK_OEM_PLUS) + else + if (AValue = GDK_KEY_comma) then + exit(VK_OEM_COMMA) + else + if (AValue = GDK_KEY_minus) then + exit(VK_OEM_MINUS) + else + if (AValue = GDK_KEY_period) then + exit(VK_OEM_PERIOD) + else + if (AValue >= GDK_KEY_exclam) and (AValue <= GDK_KEY_parenleft) then + exit(AValue + 16) + else + exit(AValue); + end; Result := VK_UNKNOWN; case AValue of GDK_KEY_Return, GDK_KEY_KP_Enter, GDK_KEY_3270_Enter: Result := VK_RETURN;