screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with function key binds


From: Dave Woodfall
Subject: Re: Problem with function key binds
Date: Tue, 22 Dec 2020 06:08:51 +0000

On 22/12/20 02:59,
Dave Woodfall <dave@tty1.uk> put forth the proposition:
> Hi all.
> screen 4.8.0 on slackware linux 14.2 / kernel 4.4.240.
> I have a weird problem that I can't figure out.
> I have had the function keys all bound ever since I began using
> screen some years ago.  I use `bind -k' k1 to F2.  Recently I moved
> some services from one machine to another with the same OS and screen
> version + configs (I use the same config everywhere, both local and
> remote).
> When I begin a screen session the binds work fine, but then later I
> find that only keys F1-F4 still work, and F5-F12 stop working and
> instead act like I pressed escape and then print the key strokes
> after the \E[ prefix.  I.E. ^A F5 prints 15~, ^A F6 prints 17~ and so
> on.
> This only happens over ssh.
> I have a few things like irssi, mutt, and calcurse on both boxes.
> Locally, I use a plain tty or sometimes fbterm and it happens in both.
> The TERM is set to screen.linux and hasn't changed.
> The keys F1-F4 print ^[OP to ^[OS
> The keys F5-F12 are numerical: ^[[15~ to ^[[24~
> `cat' shows that they haven't changed.
> The old machine never did this, and I have checked everything on it I
> can think of that might be different, but can't see anything.  There
> are no local .terminfo settings, both use the same zsh configs too.
> I checked diffs of infocmp and TERMCAPs between a broken and a
> working session, and they are identical, other than cols and
> rows/lines.
> I also checked stty and tried `stty sane/cooked/raw' etc. but no
> change.  Same with tput init/reset and screen's :reset.
> I hate having to /quit irssi and make a new screen session to get my
> key binds back, but this seems to be only workaround for now.  FWIW
> function keys bound in irssi and mutt still work.
> These are the screen settings I use:
> altscreen on
> bell_msg ""
> compacthist on
> defbce on
> defscrollback 10000
> hardcopydir "$HOME/.screen"
> hardstatus alwayslastline
> logfile "$HOME/.screen/screenlog.%n"
> logtstamp on
> ignorecase on
> nethack on
> pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
> rendition bell = g
> rendition monitor = y
> rendition silence = b
> rendition so = bk
> shell -$SHELL
> startup_message off
> vbellwait 5
> vbell off

Replying to my own message.

I now think that I've found what causes it, but not how to fix it
yet.

I do sometimes screen -x from a terminal in X11, usually st.  After
doing a quick test of creating a new remote screen session from a
tty, then starting X and ssh/attaching from st, detaching and going
back to the tty, the binds are broken.  The key strings for the st
function keys F5-F12 are very different, but I don't understand why
TERM, infocmp output, and cat, show the original screen.linux
settings, not from st, so something else must be changing.

My first thought was to install st on the remote machine, but it
didn't help.

Something else that I noticed while doing that, is that ncurses has
its own terminfo/s/st, but cmp shows that it's different to the one
that st installs over it.

A bit less stumped.

TIA for any ideas to try.

--
Dave

Love is a snowmobile racing across the tundra and then suddenly it flips over,
pinning you underneath.  At night, the ice weasels come.
         --Friedrich Nietzsche



reply via email to

[Prev in Thread] Current Thread [Next in Thread]