Skip to content

Commit

Permalink
Fix Issue Hold function not working #7
Browse files Browse the repository at this point in the history
  • Loading branch information
SMerrony committed Nov 17, 2022
1 parent 4efa0f7 commit 8295422
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/gui.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions src/keyboard.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 8295422

Please sign in to comment.