All of lore.kernel.org
 help / color / mirror / Atom feed
* matchbox-terminal and function keys
@ 2014-03-27  5:50 Stuart Longland
  2014-03-27 12:27 ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: Stuart Longland @ 2014-03-27  5:50 UTC (permalink / raw)
  To: yocto

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,
-- 
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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: matchbox-terminal and function keys
  2014-03-27  5:50 matchbox-terminal and function keys Stuart Longland
@ 2014-03-27 12:27 ` Burton, Ross
  2014-03-27 19:57   ` Stuart Longland
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2014-03-27 12:27 UTC (permalink / raw)
  To: Stuart Longland; +Cc: yocto@yoctoproject.org

On 27 March 2014 05:50, Stuart Longland <stuartl@vrt.com.au> wrote:
> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: matchbox-terminal and function keys
  2014-03-27 12:27 ` Burton, Ross
@ 2014-03-27 19:57   ` Stuart Longland
  2014-03-27 23:01     ` Stuart Longland
  0 siblings, 1 reply; 4+ messages in thread
From: Stuart Longland @ 2014-03-27 19:57 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto@yoctoproject.org

Hi Ross,
On 27/03/14 22:27, Burton, Ross wrote:
> 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,
-- 
Stuart Longland
Contractor
     _ ___
\  /|_) |                           T: +61 7 3535 9619
 \/ | \ |     38b Douglas Street    F: +61 7 3535 9699
   SYSTEMS    Milton QLD 4064       http://www.vrt.com.au




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: matchbox-terminal and function keys
  2014-03-27 19:57   ` Stuart Longland
@ 2014-03-27 23:01     ` Stuart Longland
  0 siblings, 0 replies; 4+ messages in thread
From: Stuart Longland @ 2014-03-27 23:01 UTC (permalink / raw)
  To: yocto

On 28/03/14 05:57, Stuart Longland wrote:
> Hi Ross,
> On 27/03/14 22:27, Burton, Ross wrote:
>> 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.

Okay, I've done a `cat` of the respective keys:
> 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,
-- 
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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-27 23:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27  5:50 matchbox-terminal and function keys Stuart Longland
2014-03-27 12:27 ` Burton, Ross
2014-03-27 19:57   ` Stuart Longland
2014-03-27 23:01     ` Stuart Longland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.