curses input box with mouse-support enters test 588 589 whenever terminal window focus changes

Bug #2055430 reported by Sam Liddicott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libcurses-ui-perl (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In gnome terminal shell run: /usr/share/doc/libcurses-ui-perl/examples/color_editor

The text: 588
will be immediately entered into the document

If you switch focus to another application then the text: 589
will be entered into the document

Every time you switch back to the gnome-terminal "588" will be entered and switching back will enter "589"

If you save the document, these will be part of the document proving that it isn't text that escaped, e.g. via stderr

If (from another terminal) I disable focus reporting (https://en.wikipedia.org/wiki/ANSI_escape_code#CSIsection)

    CSI ? 1004 h
                  Enable reporting focus.
                  Reports whenever terminal emulator enters or exits
                  focus as ESC [I and ESC [O, respectively.

    CSI ? 1004 l
                 Disable reporting focus.

Like this:

    $ ps -fade | grep examples/color_editor
    user 361460 283761 0 14:29 pts/3 00:00:00 /usr/bin/perl -w /usr/share/doc/libcurses-ui-perl/examples/color_editor
    $ printf '\x1b[?1004l' > /dev/pts/3

then it stops misbehaving.

Perhaps the bug is really in libcurses-perl or even libncurses6

Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

A colleague with a fresh Ubuntu 23.10 installation has confirmed this bug, so marking as confirmed

Changed in libcurses-ui-perl (Ubuntu):
status: New → Confirmed
Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

I came to this bug report page from the ubuntu 23.10 page for libcurses-ui-perl but I see that context is lost.

I'm reporting this against ubuntu 23.10 package libcurses-ui-perl 0.9609-1.

Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

The fix for my application is to add:

$cui->set_binding( sub { }, "588" );
$cui->set_binding( sub { }, "589" );

I provide this as a workaround.

it suggests that 588 and 589 are to new KEY_* values that are perhaps merely not-handled but now-should-be in libcurses-ui-perl engine.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.