[Top][All Lists]

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

Re: [Nano-devel] more on Home/End not working atstatusbarw/ALT_KEYPADon

From: David Lawrence Ramsey
Subject: Re: [Nano-devel] more on Home/End not working atstatusbarw/ALT_KEYPADon xterm
Date: Sun, 13 Jul 2003 00:10:22 -0700 (PDT)

Wouter van Hemel:
>On Fri, 11 Jul 2003, David Lawrence Ramsey wrote:


>> 1. Are you using --keypad or not?
>No. (What does it do? It doesn't change anything...)

It changes what gets generated when you press certain keys.  Without
--keypad, keypad() is turned on, which results in those keys generating
extended values like KEY_DC.  With it, keypad() is left off, and those
keys generate escape sequences like Esc-[-3-~.


>alt (alt-button ignored, probably not defined as meta)

I don't know how to fix this.  At least you can use Esc as a workaround
in the meantime.

>  --> fails in both editor and prompt
>pageup/pagedown/insert on keypad and functionpad (*only in prompt*)
>  PageUp generates 'S'
>  PageDown generates 'R'
>  Insert generates 'K'

See (far) below.

>Del, BackSpace, Home, keypad Home, keypad numbers, function keys F1-F12,
>ctrl combinations, etc (everything without alt)

That's good.


>backspace deletes right (editor and prompt)

Okay, the Backspace/Delete problem.

>pageup/pagedown/insert on keypad and functionpad (*only in prompt*)


>Function keys F1-F12



>-K breaks Delete in console (deletes to the left, like backspace)
>-K breaks Home/End in editor (NOT prompt), PageUp/PageDown/Insert in
>prompt (NOT editor - all generate '~'), but fixes backspace in xterm.

>From this, it appears that more is broken when using -K than when not
using it, and the breakage without -K is just the Backspace/Delete


>> 1. With the hack applied, do all the keys work as expected?
>backspace doesn't work (deletes to the right, like Delete).
>PageUp/PageDown/Insert don't work in keypad.

Are these in the console or xterm, or both?


>I don't think you can fix the Delete/Backspace issue. I have been
>playing with .inputrc files in bash, too, and it's either working for
>console -or- for xterm, never both.

As if it wasn't enough of a mess already.


>I'm not an expert in keycodes or termcaps, though... I only know it's
>pure %#"@! and hope for better standards and unicodification (the unix
>DELETE vs RUBOUT discussion seems to have started perhaps even before I
>was born).

I'll second that.

>So I don't think there is an easy solution, only pain, rage and hate. ;)

That sums it up pretty well.

>The only problem is that some keys (PgUp, PgDn, Ins) don't work good in
>a nano prompt, alt fails in console, and then Delete/BackSpace. I
>suggest a simple argument that just switches these two keys, like pico
>had IIRC.

That would be the -d option.

>The others are quite trivial, I think those specific codes are just not
>implemented in the nano prompt.

You're right.  The keys don't do anything at the prompt when pressed,
but nano doesn't block such unused keys (cf. the comment in nano.c about
how "we no longer stop unhandled sequences so people with odd character
sets can type").  Also, the extended keycodes generated when you press
those keys (when using -K) are outside the char range, so when they get
cut down to char range just before being displayed, you get 'S', 'P',
and 'K'.  It's odd but harmless.

Thanks for all your input; it's been a big help.

Sluggy.Net: The Sluggy Freelance Community!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]