Comments (42)
from pspg.
Double ESC - this is different from MSDOS, but usual in Unix - Double ESC ~ ESC, ESC and some number is equivalent of FN
from pspg.
you can set --esc-delay=NUM
. When you use 0, then behaviour of ESC will be similar to MSDOS, or maybe 500 - it is equivalent of 0.5 sec, so after small delay, the ESC will be processed like on MSDOS
from pspg.
Double ESC - this is different from MSDOS, but usual in Unix - Double ESC ~ ESC, ESC and some number is equivalent of FN
Thanks for the reply. I have tried one ESC, two ESC, and many ESC, none work. I have tried two ESC, with significant delay between (up to 3 seconds) just for good measure. I have tried Ctrl[ as well, for kicks. I cannot exit the menu.
The only way out of the menu is F10 (quit) or selecting an option from the menu. Ever seen this before?
FWIW I am on latest macOS, using iTerm2, using pspg from psql inside tmux. All parts have been installed via Homebrew.
from pspg.
from pspg.
if is possible, you can compile pspg
with DEBUG_PIPE
symbol. Edit pspg.h
and define DEBUG_PIPE
with correct path to named pipe. Then watch this pipe, and start pspg
. With DEBUG_PIPE
pspg writes all input keycodes:
#ifdef DEBUG_PIPE
fprintf(debug_pipe, "*** keycode: %d, err: %d\n", nced->keycode, errno);
#endif
from pspg.
@dsedivec did you do some tests?
from pspg.
Hi, I have exactly the same issue, I'm running pspg
built from git (commit 463ab29) on Debian 9.13 (Stretch). I'm accessing mysql inside tmux
which is running over ssh inside yakuake (konsole):
$ echo $TERM
tmux-256color
$ mysql --sigint-ignore --pager="pspg --style=18 --force-uniborder --highlight-odd-rec --reprint-on-exit --quit-if-one-screen --esc-delay=500"
Here is the log:
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] started
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] with utf8 support
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] esc delay = 500
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] DataDesc is initialized
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] next row will be desc row
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] read rows 310
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] read input 310 rows
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] terminal size by TIOCGWINSZ rows: 80, cols: 361
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] ncurses started
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] without xterm mouse mode support
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] initial stdscr size - maxy: 80, maxx: 361
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:32 +0200 [2774629] the terminal doesn't allow to change of color
Tue, 16 Apr 2024 11:00:33 +0200 [2774629] new screen size 80 361
Tue, 16 Apr 2024 11:00:33 +0200 [2774629] releasing cmd bar
Tue, 16 Apr 2024 11:00:33 +0200 [2774629] process command: ShowMenu
Tue, 16 Apr 2024 11:00:33 +0200 [2774629] init menu
Tue, 16 Apr 2024 11:00:41 +0200 [2774629] new screen size 80 361
Tue, 16 Apr 2024 11:00:41 +0200 [2774629] releasing cmd bar
Tue, 16 Apr 2024 11:00:41 +0200 [2774629] process command: CSSearchSet
Tue, 16 Apr 2024 11:00:42 +0200 [2774629] exit main loop: F10
Tue, 16 Apr 2024 11:00:42 +0200 [2774629] releasing cmd bar before end
Tue, 16 Apr 2024 11:00:42 +0200 [2774629] releasing menu bar before end
Tue, 16 Apr 2024 11:00:42 +0200 [2774629] xterm mouse mode 1002 is not active
Tue, 16 Apr 2024 11:00:42 +0200 [2774629] ncurses ended
Tue, 16 Apr 2024 11:00:42 +0200 [2774629] correct quit
I pressed ESC many times, sometimes with delay, between 11:00:33 & 11:00:42, only quit using F10.
from pspg.
FYI, the ESC key works fine in vim
inside the same tmux session.
Also when I press F7 to search in pspg
, ESC cancels it. So it seems the problem is exiting the menu.
from pspg.
from pspg.
from pspg.
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] started
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] with utf8 support
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] esc delay = 500
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] DataDesc is initialized
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] next row will be desc row
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] read rows 310
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] read input 310 rows
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] terminal size by TIOCGWINSZ rows: 80, cols: 361
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] ncurses started
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] without xterm mouse mode support
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] initial stdscr size - maxy: 80, maxx: 361
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:09 +0200 [3202636] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:11 +0200 [3202636] process command: CursorDown
Wed, 17 Apr 2024 08:25:11 +0200 [3202636] process command: CursorDown
Wed, 17 Apr 2024 08:25:11 +0200 [3202636] process command: CursorDown
Wed, 17 Apr 2024 08:25:11 +0200 [3202636] new screen size 80 361
Wed, 17 Apr 2024 08:25:11 +0200 [3202636] releasing cmd bar
Wed, 17 Apr 2024 08:25:11 +0200 [3202636] process command: ShowMenu
Wed, 17 Apr 2024 08:25:11 +0200 [3202636] init menu
Wed, 17 Apr 2024 08:25:40 +0200 [3202636] new screen size 80 361
Wed, 17 Apr 2024 08:25:40 +0200 [3202636] releasing cmd bar
Wed, 17 Apr 2024 08:25:40 +0200 [3202636] process command: Quit
Wed, 17 Apr 2024 08:25:40 +0200 [3202636] releasing cmd bar before end
Wed, 17 Apr 2024 08:25:40 +0200 [3202636] releasing menu bar before end
Wed, 17 Apr 2024 08:25:40 +0200 [3202636] xterm mouse mode 1002 is not active
Wed, 17 Apr 2024 08:25:40 +0200 [3202636] ncurses ended
Wed, 17 Apr 2024 08:25:40 +0200 [3202636] correct quit
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] started
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] with utf8 support
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] esc delay = 500
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] DataDesc is initialized
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] next row will be desc row
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] read rows 310
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] read input 310 rows
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] terminal size by TIOCGWINSZ rows: 80, cols: 361
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] ncurses started
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] without xterm mouse mode support
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] initial stdscr size - maxy: 80, maxx: 361
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:25:59 +0200 [3202856] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:26:01 +0200 [3202856] new screen size 80 361
Wed, 17 Apr 2024 08:26:01 +0200 [3202856] releasing cmd bar
Wed, 17 Apr 2024 08:26:01 +0200 [3202856] process command: ShowMenu
Wed, 17 Apr 2024 08:26:01 +0200 [3202856] init menu
Wed, 17 Apr 2024 08:26:10 +0200 [3202856] new screen size 80 361
Wed, 17 Apr 2024 08:26:10 +0200 [3202856] releasing cmd bar
Wed, 17 Apr 2024 08:26:10 +0200 [3202856] process command: ForwardSearch
Wed, 17 Apr 2024 08:26:10 +0200 [3202856] history loaded
Wed, 17 Apr 2024 08:26:10 +0200 [3202856] input string prompt - "/"
Wed, 17 Apr 2024 08:26:10 +0200 [3202856] xterm mouse mode 1002 is not active
Wed, 17 Apr 2024 08:26:14 +0200 [3202856] xterm mouse mode 1002 is not activated
Wed, 17 Apr 2024 08:26:14 +0200 [3202856] input string - "NULL"
Wed, 17 Apr 2024 08:26:14 +0200 [3202856] new screen size 80 361
Wed, 17 Apr 2024 08:26:14 +0200 [3202856] releasing cmd bar
Wed, 17 Apr 2024 08:26:14 +0200 [3202856] process command: SearchNext
Wed, 17 Apr 2024 08:26:16 +0200 [3202856] process command: ForwardSearch
Wed, 17 Apr 2024 08:26:16 +0200 [3202856] input string prompt - "/"
Wed, 17 Apr 2024 08:26:16 +0200 [3202856] xterm mouse mode 1002 is not active
Wed, 17 Apr 2024 08:26:19 +0200 [3202856] xterm mouse mode 1002 is not activated
Wed, 17 Apr 2024 08:26:19 +0200 [3202856] input string - ""
Wed, 17 Apr 2024 08:26:19 +0200 [3202856] new screen size 80 361
Wed, 17 Apr 2024 08:26:19 +0200 [3202856] releasing cmd bar
Wed, 17 Apr 2024 08:26:20 +0200 [3202856] process command: CursorDown
Wed, 17 Apr 2024 08:26:20 +0200 [3202856] process command: CursorDown
Wed, 17 Apr 2024 08:26:20 +0200 [3202856] process command: CursorDown
Wed, 17 Apr 2024 08:26:21 +0200 [3202856] process command: CursorDown
Wed, 17 Apr 2024 08:26:21 +0200 [3202856] process command: CursorDown
Wed, 17 Apr 2024 08:26:21 +0200 [3202856] process command: CursorDown
Wed, 17 Apr 2024 08:26:21 +0200 [3202856] process command: CursorDown
Wed, 17 Apr 2024 08:26:22 +0200 [3202856] exit main loop: F10
Wed, 17 Apr 2024 08:26:22 +0200 [3202856] releasing cmd bar before end
Wed, 17 Apr 2024 08:26:22 +0200 [3202856] releasing menu bar before end
Wed, 17 Apr 2024 08:26:22 +0200 [3202856] xterm mouse mode 1002 is not active
Wed, 17 Apr 2024 08:26:22 +0200 [3202856] ncurses ended
Wed, 17 Apr 2024 08:26:22 +0200 [3202856] correct quit
This line in the log is when I tried to search with "/" and then cancelled it with ESC:
Wed, 17 Apr 2024 08:26:19 +0200 [3202856] input string - ""
As previously, ESC doesn't quit the menu.
$ pspg --info
pspg-5.8.2
with readline (version: 0x0700)
with integrated menu
ncurses version: 6.0, patch: 20161126
without wide char support
ncurses widechar num: 1
wchar_t width: 4, max: 2147483647
with ncurses extended functions support no: 20161126
without ncurses extended colors
without postgres client
with inotify support
without kqueue support
Linux ded8017 4.19.248 #6 SMP Thu Jun 23 14:14:47 CDT 2022 x86_64
More precise info about my workflow: my laptop is Fedora 39 with KDE Plasma, I use yakuake
from which I ssh
to a Debian machine running tmux
(v 3.3a). Inside tmux
I run the mysql
cli with pspg
. I built pspg
like this:
export PREFIX="$HOME"/local
./configure --prefix=$PREFIX && make && make install
from pspg.
I tested outside tmux
, I have the same issue. Again, nothing in the log about ESC keypresses.
$ echo $TERM
xterm-256color
from pspg.
from pspg.
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] started
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] with utf8 support
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] esc delay = 500
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] DataDesc is initialized
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] next row will be desc row
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] read rows 310
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] read input 310 rows
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] terminal size by TIOCGWINSZ rows: 80, cols: 361
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] ncurses started
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] without xterm mouse mode support
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] initial stdscr size - maxy: 80, maxx: 361
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:09 +0200 [3214430] the terminal doesn't allow to change of color
Wed, 17 Apr 2024 08:56:11 +0200 [3214430] *** keycode: 273, err: 0
Wed, 17 Apr 2024 08:56:11 +0200 [3214430] new screen size 80 361
Wed, 17 Apr 2024 08:56:11 +0200 [3214430] releasing cmd bar
Wed, 17 Apr 2024 08:56:11 +0200 [3214430] process command: ShowMenu
Wed, 17 Apr 2024 08:56:11 +0200 [3214430] init menu
Wed, 17 Apr 2024 08:56:12 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:12 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:13 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:14 +0200 [3214430] *** keycode: 261, err: 0
Wed, 17 Apr 2024 08:56:14 +0200 [3214430] *** keycode: 261, err: 0
Wed, 17 Apr 2024 08:56:14 +0200 [3214430] *** keycode: 261, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:15 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:16 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:17 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:17 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:17 +0200 [3214430] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:56:17 +0200 [3214430] *** keycode: -1, err: 0
Wed, 17 Apr 2024 08:56:18 +0200 [3214430] *** keycode: 274, err: 0
Wed, 17 Apr 2024 08:56:18 +0200 [3214430] exit main loop: F10
Wed, 17 Apr 2024 08:56:18 +0200 [3214430] releasing cmd bar before end
Wed, 17 Apr 2024 08:56:18 +0200 [3214430] releasing menu bar before end
Wed, 17 Apr 2024 08:56:18 +0200 [3214430] xterm mouse mode 1002 is not active
Wed, 17 Apr 2024 08:56:18 +0200 [3214430] ncurses ended
Wed, 17 Apr 2024 08:56:18 +0200 [3214430] correct quit
I also installed pspg
v5.8.1 from Fedora repo, tunnelled the mysql port to my local machine and when accessing mysql directly the ESC works. Maybe this has something to do with ssh
.
from pspg.
This is the log when pressing ESC over ssh:
Wed, 17 Apr 2024 08:59:41 +0200 [3215456] *** keycode: 27, err: 0
Wed, 17 Apr 2024 08:59:41 +0200 [3215456] *** keycode: -1, err: 0
I built pspg
on your latest commit also locally, this is the log when ESC works (pressed 2x) - running DIRECTLY, not in ssh
session:
Wed, 17 Apr 2024 09:05:07 +0200 [10382] init menu
Wed, 17 Apr 2024 09:05:08 +0200 [10382] *** keycode: 27, err: 0
Wed, 17 Apr 2024 09:05:08 +0200 [10382] *** keycode: 0, err: 0
Wed, 17 Apr 2024 09:05:08 +0200 [10382] *** keycode: 27, err: 0
Wed, 17 Apr 2024 09:05:08 +0200 [10382] *** keycode: 0, err: 0
Wed, 17 Apr 2024 09:05:08 +0200 [10382] new screen size 81 361
Wed, 17 Apr 2024 09:05:08 +0200 [10382] releasing cmd bar
from pspg.
from pspg.
from pspg.
Debian (where tmux
is running and ESC doesn't quit the menu):
$ echo $LANG
en_US.UTF-8
Fedora (ESC works):
$ echo $LANG
en_GB.UTF-8
I exported $LANG
on the Debian machine to match Fedora but that did not change anything.
from pspg.
from pspg.
I have the same issue when not using tmux
, so we can rule it out. There are quite a few differences in bind -p
; attached.
bindp.fedora.txt
bindp.debian.txt
from pspg.
Fedora (working) pspg --info
both from-repo and built from sources:
$ pspg --info
pspg-5.8.1
with readline (version: 0x0802)
with integrated menu
ncurses version: 6.4, patch: 20230520
ncurses with wide char support
ncurses widechar num: 1
wchar_t width: 4, max: 2147483647
with ncurses extended functions support no: 20230520
with ncurses extended colors no: 20230520
without postgres client
with inotify support
without kqueue support
Linux fedora 6.8.6-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Apr 13 15:14:23 UTC 2024 x86_64
$ $HOME/local/bin/pspg --info
pspg-5.8.4
without readline
with integrated menu
ncurses version: 6.4, patch: 20230520
ncurses with wide char support
ncurses widechar num: 1
wchar_t width: 4, max: 2147483647
with ncurses extended functions support no: 20230520
with ncurses extended colors no: 20230520
without postgres client
with inotify support
without kqueue support
Linux fedora 6.8.6-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Apr 13 15:14:23 UTC 2024 x86_64
Debian, built from sources:
$ $HOME/local/bin/pspg --info
pspg-5.8.4
with readline (version: 0x0700)
with integrated menu
ncurses version: 6.0, patch: 20161126
without wide char support
ncurses widechar num: 1
wchar_t width: 4, max: 2147483647
with ncurses extended functions support no: 20161126
without ncurses extended colors
without postgres client
with inotify support
without kqueue support
Linux ded8017 4.19.248 #6 SMP Thu Jun 23 14:14:47 CDT 2022 x86_64
It looks like quite an old ncurses
version from 2016 on Debian side...
from pspg.
from pspg.
from pspg.
I removed all the "\e\e" bindings:
$ bind -p | grep '\\e\\e'
"\e\e[D": backward-word
"\e\e": complete
"\e\e[C": forward-word
$ bind -r "\e\e[D"
$ bind -r "\e\e[C"
$ bind -r "\e\e"
$ bind -p | grep '\\e\\e'
$
(the last one \e\e
is also present on Fedora)
The problem persists, tested within tmux
and in a standalone ssh session.
from pspg.
I found a "key test" at https://stackoverflow.com/a/4028974, compiled with
gcc -o ncurses_key -lncurses ncurses_key.c
It's working on both Debian & Fedora, as far as I can tell it has the same output for the same keys.
Output from Debian (2x 27 is when I pressed ESC twice, there is no -1 code):
No key pressed yet...
No key pressed yet...
Key pressed! It was: 27
No key pressed yet...
No key pressed yet...
Key pressed! It was: 27
Key pressed! It was: 27
No key pressed yet...
No key pressed yet...
No key pressed yet...
No key pressed yet...
Key pressed! It was: 10
No key pressed yet...
No key pressed yet...
No key pressed yet...
Key pressed! It was: 97
Key pressed! It was: 122
No key pressed yet...
No key pressed yet...
No key pressed yet...
Key pressed! It was: 27
Key pressed! It was: 79
Key pressed! It was: 80
No key pressed yet...
Key pressed! It was: 27
Key pressed! It was: 79
Key pressed! It was: 81
Key pressed! It was: 27
Key pressed! It was: 79
Key pressed! It was: 82
Key pressed! It was: 27
Key pressed! It was: 79
Key pressed! It was: 83
No key pressed yet...
No key pressed yet...
No key pressed yet...
Key pressed! It was: 27
Key pressed! It was: 79
Key pressed! It was: 80
from pspg.
from pspg.
from pspg.
from pspg.
pspg
started, I pressed F9 to enter the menu, ESC once (nothing happened), F10 to quit:
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] started
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] with utf8 support
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] esc delay = 500
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] DataDesc is initialized
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] next row will be desc row
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] read rows 310
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] read input 310 rows
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] terminal size by TIOCGWINSZ rows: 80, cols: 361
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] ncurses started
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] without xterm mouse mode support
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] initial stdscr size - maxy: 80, maxx: 361
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:07 +0200 [1504773] the terminal doesn't allow to change of color
Mon, 22 Apr 2024 13:54:09 +0200 [1504773] *** keycode: 273, err: 0
Mon, 22 Apr 2024 13:54:09 +0200 [1504773] new screen size 80 361
Mon, 22 Apr 2024 13:54:09 +0200 [1504773] releasing cmd bar
Mon, 22 Apr 2024 13:54:09 +0200 [1504773] process command: ShowMenu
Mon, 22 Apr 2024 13:54:09 +0200 [1504773] init menu
Mon, 22 Apr 2024 13:54:10 +0200 [1504773] *** keycode: 27, err: 0
Mon, 22 Apr 2024 13:54:10 +0200 [1504773] *** keycode: -1, err: 0
Mon, 22 Apr 2024 13:54:11 +0200 [1504773] *** keycode: 274, err: 0
Mon, 22 Apr 2024 13:54:11 +0200 [1504773] exit main loop: F10
Mon, 22 Apr 2024 13:54:11 +0200 [1504773] releasing cmd bar before end
Mon, 22 Apr 2024 13:54:11 +0200 [1504773] releasing menu bar before end
Mon, 22 Apr 2024 13:54:11 +0200 [1504773] xterm mouse mode 1002 is not active
Mon, 22 Apr 2024 13:54:11 +0200 [1504773] ncurses ended
Mon, 22 Apr 2024 13:54:11 +0200 [1504773] correct quit
another test, I pressed ESC twice as fast as I could, nothing happened again
Mon, 22 Apr 2024 13:55:58 +0200 [1505546] *** keycode: 27, err: 0
Mon, 22 Apr 2024 13:55:58 +0200 [1505546] *** keycode: -1, err: 0
Mon, 22 Apr 2024 13:55:58 +0200 [1505546] *** keycode: 27, err: 0
Mon, 22 Apr 2024 13:55:58 +0200 [1505546] *** keycode: -1, err: 0
from pspg.
from pspg.
This patch fixes the issue for me:
diff --git a/src/pspg.c b/src/pspg.c
index 5fff17c..e294047 100644
--- a/src/pspg.c
+++ b/src/pspg.c
@@ -3131,7 +3131,7 @@ reinit_theme:
#if NCURSES_EXT_FUNCS
- set_escdelay(1);
+ set_escdelay(500);
#elif !defined PDCURSES
Higher values also work, 1000
made delay exiting the menu a bit too long, and 100
is too low.
from pspg.
please, can you check if
Esc q or ALT-q is working?
Neither works to quit the menu, tested on Debian & Fedora.
from pspg.
from pspg.
po 22. 4. 2024 v 14:19 odesílatel Marek Schimara @.> napsal:
please, can you check if Esc q or ALT-q is working? Neither works to quit the menu.
it should to quit pspg can you show me log
…
— Reply to this email directly, view it on GitHub <#238 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO47DCPB2I4JNHCNHHR3Y6T55DAVCNFSM6AAAAABDNUDSD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRZGI2TENBSG4 . You are receiving this because you modified the open/close state.Message ID: @.>
I misunderstood. They both work to quit pspg
, I was testing exiting the menu.
from pspg.
from pspg.
from pspg.
I also tested set_escdelay(-1)
- it's acting strangely on the Debian machine, F9 needs to be pressed 2x and ESC 3x (!) to work. F10, Alt-q, ESC q, /, F7 work as usual.
from pspg.
So I'm voting for 500
:-)
from pspg.
from pspg.
Great work, I confirm this works on both of my machines.
Thanks a lot! :-)
from pspg.
from pspg.
Related Issues (20)
- Saving to CSV on large number of rows only exports partial rows HOT 22
- Sort doesn't work... HOT 3
- Feature: Sort multiple columns individually as a sequence of sort steps HOT 4
- difference in pgcli and psql table behavior in pspg HOT 4
- Feature: Handle long columns. Add option for max column width, and keybindings to scroll within the long column, etc. HOT 2
- NullPointerException when running pspg in sqlcl HOT 3
- Exactly what data does pspg receive from psql? HOT 1
- warning: integer overflow in expression of type ‘long int’ results in ‘0’ HOT 2
- Feature Request: Customize the word wrap character HOT 4
- Segfault on KOI8-RU file HOT 4
- Clearer + more visible installation instructions? HOT 6
- Windows support? HOT 5
- Getting issues while trying to query out data with postgis HOT 1
- `No data` on files with more than 1000 lines HOT 14
- .pspg_conf file format - FYI for users HOT 1
- nushell support ❤️ HOT 3
- Feature request: possibility for faster watch time HOT 6
- Add support for clip.exe inside WSL2 HOT 10
- Copy functionality trims leading whitespace HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pspg.