From 82954220abc1fa4633509359cb96bbc57290e61e Mon Sep 17 00:00:00 2001 From: SMerrony Date: Thu, 17 Nov 2022 19:13:03 +0100 Subject: [PATCH] Fix Issue Hold function not working #7 --- changelog | 1 + src/gui.adb | 5 +++++ src/keyboard.adb | 2 ++ 3 files changed, 8 insertions(+) diff --git a/changelog b/changelog index f4313a2..a4db892 100644 --- a/changelog +++ b/changelog @@ -2,6 +2,7 @@ dashera (0.13.1) stable; urgency=low [SMerrony] * Issue: Fix File|Send (Text) File not sending new-lines + * Issue: Fix #7 (Hold not working) by sending Ctrl-S/Q * Usability: Move terminal Resize menu item back to Emulation menu * Usability: Move Load F-Key Template to View menu * Usability: Add new Hide F-Key Template menu item diff --git a/src/gui.adb b/src/gui.adb index 9964a34..24ffe64 100644 --- a/src/gui.adb +++ b/src/gui.adb @@ -999,6 +999,11 @@ package body GUI is Keyboard.Handle_Key_Release (GDK_KP_Enter); elsif Lab = "Hold" then Term.Holding := not Term.Holding; + if Term.Holding then + Keyboard.Handle_Key_Release (GDK_F29); + else + Keyboard.Handle_Key_Release (GDK_F30); + end if; end if; end Handle_Key_Btn_CB; diff --git a/src/keyboard.adb b/src/keyboard.adb index ca0392c..062d673 100644 --- a/src/keyboard.adb +++ b/src/keyboard.adb @@ -112,6 +112,8 @@ package body Keyboard is -- Special codes from the virtual key buttons on the GUI when GDK_3270_EraseEOF => Enqueue_Key (Dasher_Erase_Page); when GDK_3270_EraseInput => Enqueue_Key (Dasher_Erase_EOL); + when GDK_F29 => Enqueue_Key (Character'Val (19)); -- Fake Ctrl-S + when GDK_F30 => Enqueue_Key (Character'Val (17)); -- Fake Ctrl-Q when GDK_F31 => Enqueue_Pair (Dasher_Command, Modify (Dasher_C1)); when GDK_F32 => Enqueue_Pair (Dasher_Command, Modify (Dasher_C2)); when GDK_F33 => Enqueue_Pair (Dasher_Command, Modify (Dasher_C3));