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

Re: Home and end keys (was Re: Make Debian better)



Bob Proulx wrote:
> 
> Russell <rjshaw@iprimus.com.au> [2002-10-25 10:10:53 +1000]:
> > Bob Proulx wrote:
> > > Why do you have to activate them?
> >
> > I want to activate them so that my keyboard doesn't have stupid
> > non-functional keys.
> 
> You completely misread my meaning.  I was NOT asking why you want to
> use the keys.  I think we all understand that.
> 
> I was asking, "The keys work.  What did you do to break them?"
> Which is an entirely different question.  :-)  And note that it was
> said with a smirk and not a gripe.

Hi Bob,
There was nothing i had configured in X or xterm since i installed
debian. The keys never worked from the start. I don't have any mega
desktops installed; only fvwm2 and a few C development tools and vim etc.

> And I also said that since many people are reporting this it must be a
> bug even if many other people were not seeing it.  Some see a problem.
> Some people do not see a problem.  The question then is where is the
> bug, what is the bug, how to resolv the bug, etc.

Well, there seems to be at least two variables. The defaults of Bash
or the defaults of xterm can make the Home/End keys work.

For users with a default working keypad, check the "VT Options" menu
and see if "Enable application cursor keys" is enabled. If it is,
then check /etc/X11/app-defaults/Xterm (or do a grep) to see if
there's an "appcursorDefault" entry anywhere. The other thing to
try is a grep to see if there's a "enable-keypad" anywhere.

One thing to try is this: press ctrl-v then keypad Home in an xterm.
With "appcursorDefault" disabled, i get ^[[H (really CSI 1;1]H where
CSI= ESC-[ ). This is terminfo "home" when you type "infocmp" (\E[H).
Home should put the cursor in the upper left hand corner, because
the command is really a cursor-position spec:

CSI Ps ; Ps H  Cursor Position [row;column] (default = [1,1]) (CUP)

If i type: echo -n "^[[H" then the cursor goes to the top left corner
of the xterm. With "appcursorDefault" disabled, then pressing the
keypad up arrow should make the cursor go to 1,1. However, it just
beeps. BUT, if you type "bash --noediting" to start a new shell
with no "readline", then pressing keypad Home does make the cursor
go to 1,1. Therefore, readline is intercepting these characters
and beeping. There may be a setting to pass these characters thru.

With "appcursorDefault" enabled, i get ^[OH (really SS3 H where
SS3= ESC-O ). This is terminfo "khome" when you type "infocmp" (\EOH).
khome=SS3 H doesn't seem to be in the spec, tho khome is in
"man 5 terminfo".

Depending on the settings of DECPNM and DECPAM:
ESC =          Application Keypad (DECPAM)
ESC >          Normal Keypad (DECPNM)

you might get CSI 1~ and CSI 4~ for keypad Home and End.

http://cns.georgetown.edu/~ric/howto/Xterm-Title/ctlseqs.txt
 
> Seriously, I did a clean install of woody only three days ago on a box
> and the home / end keys work fine in an xterm on that machine.  They
> work fine on all of the machines I can test it on.  Therefore it is
> not something that intrinsically does not work.  It must be something
> that mostly works and is sometimes broken by something on the machines
> of people with this complaint.

I'd try doing a minimal install of the console apps, then X with a
simple window manager (mine is fvwm2) and few apps. I installed mine
off the net starting with floppies. Maybe the CD install has a script
to fix various settings.



Reply to: