From 567c3e9759d59793f270b9c71eae319d5ec0483d Mon Sep 17 00:00:00 2001 From: Vlad Doloman Date: Wed, 24 Jun 2026 13:47:14 +0300 Subject: [PATCH] fix: replace Ctrl-S confirm with Ctrl-G in Certificate Details form Ctrl-S (0x13) is the XOFF flow-control character; terminals intercept it before curses sees it, causing output suspension in Konsole and others. Replaced with Ctrl-G (0x07 / BEL) which has no terminal-level meaning. Updated hint bar and test stub accordingly. Co-Authored-By: Claude Sonnet 4.6 --- openvpncertupdate.py | 4 ++-- tests/test_dialogs.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openvpncertupdate.py b/openvpncertupdate.py index bc7269d..3d83855 100644 --- a/openvpncertupdate.py +++ b/openvpncertupdate.py @@ -617,7 +617,7 @@ def show_cert_form( fields[name].draw() fields[active[focus]].place_cursor() - hint = "Tab=next F5=regen password Ctrl-S=confirm Esc=cancel" + hint = "Tab=next F5=regen password Ctrl-G=confirm Esc=cancel" try: win.addstr(h - 2, 2, hint[:w - 4], curses.color_pair(COLOR_DISABLED)) except curses.error: @@ -629,7 +629,7 @@ def show_cert_form( if key == 27: curses.curs_set(0) return CertFormResult(cn=cn, email="", password="", confirmed=False) - if key == 0x13: # Ctrl-S: immediate submit + if key == 0x07: # Ctrl-G: immediate submit curses.curs_set(0) return _submit() if key == 9: # Tab diff --git a/tests/test_dialogs.py b/tests/test_dialogs.py index 1f1de3f..6a8a2ef 100644 --- a/tests/test_dialogs.py +++ b/tests/test_dialogs.py @@ -8,6 +8,7 @@ import curses as _curses # Stub curses constants before importing the module under test, mirroring # what test_widgets.py does for InputField's dependencies. _curses.color_pair = lambda x: 0 +_curses.curs_set = lambda x: None _curses.A_UNDERLINE = 0 _curses.A_BOLD = 0 _curses.KEY_BACKSPACE = 263