F1/F2/F3/F4 don't work on my new laptop

View: New views
4 Messages — Rating Filter:   Alert me  

F1/F2/F3/F4 don't work on my new laptop

by Cameron Dale-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have been using screen for a while, and I have my function keys
bound to changing the selected terminal like so:

# Use the function keys to switch among windows.
bindkey -k k1 select 1
bindkey -k k2 select 2
bindkey -k k3 select 3
bindkey -k k4 select 4
bindkey -k k5 select 5

I also have this to (according to the comment where I copied it from)
enable the function keys in screen:

termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'

However, with my new eeepc laptop this is causing problems. Now, F1 F2
F3 and F4 no longer work only on the laptop. If I remove the
termcapinfo line from .screenrc the laptop works fine, but then on all
my other machines F1-F4 stops working! Most frustrating.

I understand this might be related to the terminfo database on my
laptop, but I'm not sure what change to make so that it works like my
other machines. Or, perhaps I need to add another termcapinfo line or
more bindkey lines to my .screenrc to make the function keys work with
the laptop too. If I press ctrl-q and then the F1 - F4 keys, I get the
following key codes from screen:

^[OP ^[OQ ^[OR ^[OS

But I'm not sure what I need to add to .screenrc so they get
transformed into function keys. Please help!

Thanks,
Cameron


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

F1/F2/F3/F4 don't work on my new laptop

by Cameron Dale-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have been using screen for a while, and I have my function keys
bound to changing the selected terminal like so:

# Use the function keys to switch among windows.
bindkey -k k1 select 1
bindkey -k k2 select 2
bindkey -k k3 select 3
bindkey -k k4 select 4
bindkey -k k5 select 5

I also have this to (according to the comment where I copied it from)
enable the function keys in screen:

termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'

However, with my new eeepc laptop this is causing problems. Now, F1 F2
F3 and F4 no longer work only on the laptop. If I remove the
termcapinfo line from .screenrc the laptop works fine, but then on all
my other machines F1-F4 stops working! Most frustrating.

I understand this might be related to the terminfo database on my
laptop, but I'm not sure what change to make so that it works like my
other machines. Or, perhaps I need to add another termcapinfo line or
more bindkey lines to my .screenrc to make the function keys work with
the laptop too. If I press ctrl-q and then the F1 - F4 keys, I get the
following key codes from screen:

^[OP ^[OQ ^[OR ^[OS

But I'm not sure what I need to add to .screenrc so they get
transformed into function keys. Please help!

Thanks,
Cameron


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: F1/F2/F3/F4 don't work on my new laptop

by Micah Cowan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cameron Dale wrote:

> Hi,
>
> I have been using screen for a while, and I have my function keys
> bound to changing the selected terminal like so:
>
> # Use the function keys to switch among windows.
> bindkey -k k1 select 1
> bindkey -k k2 select 2
> bindkey -k k3 select 3
> bindkey -k k4 select 4
> bindkey -k k5 select 5
>
> I also have this to (according to the comment where I copied it from)
> enable the function keys in screen:
>
> termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'

This tells screen to ignore what termcap/terminfo might really have for
k1, and use these entries instead.

> However, with my new eeepc laptop this is causing problems. Now, F1 F2
> F3 and F4 no longer work only on the laptop. If I remove the
> termcapinfo line from .screenrc the laptop works fine, but then on all
> my other machines F1-F4 stops working! Most frustrating.

Sounds like, on the system you're using for the laptop, the original
terminfo lines are correct.

> I understand this might be related to the terminfo database on my
> laptop, but I'm not sure what change to make so that it works like my
> other machines. Or, perhaps I need to add another termcapinfo line or
> more bindkey lines to my .screenrc to make the function keys work with
> the laptop too. If I press ctrl-q and then the F1 - F4 keys, I get the
> following key codes from screen:
>
> ^[OP ^[OQ ^[OR ^[OS
>
> But I'm not sure what I need to add to .screenrc so they get
> transformed into function keys. Please help!

Why not use the .screenrc without those lines on your laptop, and the
ones with them on all others? If you have two terminal versions which
respect two different sequences, you can't really expect to have both
the same terminfo definition and the same .screenrc for them both.

What terminal emulator are you using, gnome-terminal? Gnome-terminal
isn't perfectly compatible with xterm, especially when it comes to
special key controls; but it advertises itself as xterm. Probably
because of apps like vim (and screen) that recognize "xterm" as
providing mouse support, but not gnome-terminal.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
GNU Maintainer: wget, screen, teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIrw8z7M8hyUobTrERAkFDAJ0de+jm7JIBER0PCf1Kolxudfm59wCfbcIB
KslBboeIpUocUDFt0LufPk4=
=CDpJ
-----END PGP SIGNATURE-----


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: F1/F2/F3/F4 don't work on my new laptop

by Cameron Dale-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Aug 22, 2008 at 12:10 PM, Micah Cowan <micah@...> wrote:

> Cameron Dale wrote:
>> termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
>
> This tells screen to ignore what termcap/terminfo might really have for
> k1, and use these entries instead.
>
>> However, with my new eeepc laptop this is causing problems. Now, F1 F2
>> F3 and F4 no longer work only on the laptop. If I remove the
>> termcapinfo line from .screenrc the laptop works fine, but then on all
>> my other machines F1-F4 stops working! Most frustrating.
>
> Sounds like, on the system you're using for the laptop, the original
> terminfo lines are correct.

If they're correct, shouldn't the termcapinfo line do nothing then,
that is overwrite the correct ones with entries that are also correct?
Sorry, I know almost nothing about termcap/info.

> Why not use the .screenrc without those lines on your laptop, and the
> ones with them on all others? If you have two terminal versions which
> respect two different sequences, you can't really expect to have both
> the same terminfo definition and the same .screenrc for them both.

The problem is when I ssh into a server machine from different places,
then screen runs on the server and uses the server's .screenrc file.
Either I have the termcapinfo line in .screenrc on the server and all
desktops work but my laptop doesn't, or I remove the line to get my
laptop to work and the desktops no longer work.

> What terminal emulator are you using, gnome-terminal? Gnome-terminal
> isn't perfectly compatible with xterm, especially when it comes to
> special key controls; but it advertises itself as xterm. Probably
> because of apps like vim (and screen) that recognize "xterm" as
> providing mouse support, but not gnome-terminal.

I'm using konsole, and it looks like that might be the culprit. I
tried running xterm on my desktop instead, and it behaves just like my
laptop (works fine without the termcapinfo line). I'll try on some of
my other machines later tonight.

Thanks,
Cameron


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users
LightInTheBox - Buy quality products at wholesale price!