matchbox-terminal and function keys
Hi all,
I hope I've got the right list. I'm in the process of porting an ncurses application to Yocto Linux and having a bit of a problem decoding function keys.
Ideally I'd like to run the application from /etc/inittab but for now, I'm running it within X11 with matchbox-terminal.
I observe that with ncurses applications: F6 through to F10 work, but F1 through to F5 do not.
The terminal reports itself as TERM=xterm. When I do a cat, I observe that matchbox-terminal is reporting F1-F5 using VT100 terminal sequences, but F6-F10 using VT220 sequences. If I set TERM=vt100, I get F1-F5 working, but unfortunately, I need F10 as well.
So the terminal that matchbox-terminal emulates is neither a VT100 nor a VT220 (or the superset it claims to be: xterm), but a confused mix of the two.
Is there some setting to change this behaviour or is this a bug? Regards,
Signature · 6 lines
Stuart Longland
Systems Engineer
_ ___
\ /|_) | T: +61 7 3535 9619
\/ | \ | 38b Douglas Street F: +61 7 3535 9699
SYSTEMS Milton QLD 4064 http://www.vrt.com.auQuoted 8 lines · Stuart Longland
The terminal reports itself as TERM=xterm. When I do a
cat, I observe that matchbox-terminal is reporting F1-F5 using VT100 terminal sequences, but F6-F10 using VT220 sequences. If I set TERM=vt100, I get F1-F5 working, but unfortunately, I need F10 as well.So the terminal that matchbox-terminal emulates is neither a VT100 nor a VT220 (or the superset it claims to be: xterm), but a confused mix of the two.
Can you paste the output of cat to confirm the values you're seeing? The xterm guide says VT100 for F1-F4 (as VT100 doesn't define F5 onwards) and VT220 for F5-F10 and that's what I'm seeing when I attempt this (F10 specifically being ^[[21~).
Ross
Hi Ross,
Quoted 4 lines · Ross
Can you paste the output of cat to confirm the values you're seeing? The xterm guide says VT100 for F1-F4 (as VT100 doesn't define F5 onwards) and VT220 for F5-F10 and that's what I'm seeing when I attempt this (F10 specifically being ^[[21~).
Well, evidently the ncurses devs didn't get that memo as F1-F5 aren't recognised when TERM=xterm. I understood xterm was a superset of vt220.
I'll do a cat to a file and post the contents when I get in. I'm just confused as to why ncurses applications don't seem to recognise F1-F5.
Regards,
Signature · 6 lines
Stuart Longland
Contractor
_ ___
\ /|_) | T: +61 7 3535 9619
\/ | \ | 38b Douglas Street F: +61 7 3535 9699
SYSTEMS Milton QLD 4064 http://www.vrt.com.auQuoted 7 lines · Stuart Longland
Hi Ross,
Quoted 4 lines · Ross
Can you paste the output of cat to confirm the values you're seeing? The xterm guide says VT100 for F1-F4 (as VT100 doesn't define F5 onwards) and VT220 for F5-F10 and that's what I'm seeing when I attempt this (F10 specifically being ^[[21~).
Quoted 5 lines
Well, evidently the ncurses devs didn't get that memo as F1-F5 aren't recognised when TERM=xterm. I understood xterm was a superset of vt220.
I'll do a
catto a file and post the contents when I get in. I'm just confused as to why ncurses applications don't seem to recognise F1-F5.
Okay, I've done a cat of the respective keys:
Quoted 4 lines
root@xg100:~# hexdump -C /tmp/fn 00000000 1b 4f 50 1b 4f 51 1b 4f 52 1b 4f 53 1b 5b 31 35 |.OP.OQ.OR.OS.[15| 00000010 7e 1b 5b 31 37 7e 1b 5b 31 38 7e 1b 5b 31 39 7e |~.[17~.[18~.[19~| 00000020 1b 5b 32 30 7e 1b 5b 32 31 7e 0a |.[20~.[21~.|
So it indeed is sending those key commands. I've discovered that if I set TERM=xterm-xfree86, things work so evidently the ncurses here has something funny with its 'xterm' terminfo entry.
Is there a way to override the terminal type set by matchbox-terminal?
Regards,
Signature · 6 lines
Stuart Longland
Systems Engineer
_ ___
\ /|_) | T: +61 7 3535 9619
\/ | \ | 38b Douglas Street F: +61 7 3535 9699
SYSTEMS Milton QLD 4064 http://www.vrt.com.au