FW: [TF] Bindings and compatability... This may have been coveredbefore..
Brought to you by:
kenkeys
|
From: kstone at win.n. (K. Stone) - 2003-01-16 20:47:49
|
I've had this problem on FreeBSD and TinyFugue ever since I started using X.
The vt220 console(not the cons25) works flawlessly with the /etc/termcap
info.. You can use either the cons25(sco) or the vt220 with a kernel option
in FreeBSD. This is a default FreeBSD 4.7 release. I've tried
gnome-terminal, xterm, and multi-gnome-terminal.. This is with
multi-gnome-terminal here...
By looking at /etc/termcap...
xterm|vs100|xterm terminal emulator (X window system):\
:ut:li#24:\
:kh=\EOH:@7=\EOF:kb=^H:kD=^?:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:km:\
:is=\E>\E[?1;3;4;5l\E[?7;8h\E[1;65r\E[65;1H:\
:rs=\E>\E[?1;3;4;5l\E[?7;8h:\
:tc=vt220:
So presented with this.. One would assume the following would work: /def
-b'^[OP' KP_1x = /echo 1xterm /def -b'^[OQ' KP_2x = /echo 2xterm /def
-b'^[OR' KP_3x = /echo 3xterm /def -b'^[OS' KP_4x = /echo 4xterm
However in TF my 1 on the kp presents me with a ^[OF which I can bind on and
test to be true with "/def -b'^[OF' KP_1v = /echo v1" And [OF happens to be
reproduces by my end key on my regular keypad.. Anyone have an idea? I'm
going to go grab the latest ncurses but 4.7 is pretty new and this has been
going on for years.. For me atleast.
Also, a quick remedy.. Can anyone give me an example of how to use keycode
to get the what TF "thinks" things are? I thought "/test keycode(KP1)" would
do it, but I was wrong.
Kyle Stone
ks...@co...
-----Original Message-----
From: Nuutti Kotivuori [mailto:na...@ik...]
Sent: Thursday, January 16, 2003 1:21 PM
To: Kyle Stone
Cc: Tinyfugue
Subject: Re: [TF] Bindings and compatability... This may have been
coveredbefore..
Kyle Stone wrote:
> I always seem to have a problem when I switch terminal programs
> (xterm, aterm, gnome-terminal, TeraTerm, BSD console, linux console,
> etc) with my keypad navigation bindings working. What am I doing
> wrong? The only time I ever seem to get them to work properly is when
> I make a specific one for the $TERM environ and terminal I'm using.
> It gets tiring making updates for each Terminal/$term only to not have
> them work when a term is updated. I can't seem to get generic
> bindings to work either... Such as.. /def -B'KP2' KP_2 = /send s
> with or without the numlock on, VT220, VT100, or ansi.. This is really
> aggrevating for me, also.. Anyone have a function off hand that will
> give me the ^[Om' representations for keys to be used with -b
You have incorrectly set up terminfo/termcap libraries and/or incorrectly
set up TERM variable. The keys _do_ create different codes on different
terminals.
I would suggest you make sure you are using the latest terminfo from the
ncurses distribution - here's a quicklist of proper terminal types for your
examples:
xterm-xfree86 - for xterm in XFree86
rxvt - for aterm
gnome - for GNOME Terminal
teraterm - for Teraterm PRO
cons25 - FreeBSD ANSI console (25 lines)
linux - Linux console
It's important to notice that all these terminal types are indeed distinct -
and using the wrong one makes it seem like everything works, when in fact it
is indeed incorrect.
Tinyfugue is looking the key binding information from terminfo, hence if
your TERM is set up incorrectly, it will not work. Hence, it's your
responsibility to make sure that the TERM provided actually matches the
capabilities of your terminal. This is even more important with ncurses
software in general and for example 'screen' which translates the keypresses
internally.
-- Naked
|