[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: |
Wouter Van Hemel |
Subject: |
Re: [Nano-devel] more on Home/End not working atstatusbarw/ALT_KEYPADon xterm |
Date: |
Sun, 13 Jul 2003 19:33:16 +0200 (CEST) |
(lots of random snipping)
On Sun, 13 Jul 2003, David Lawrence Ramsey wrote:
> I don't know how to fix this. At least you can use Esc as a workaround
> in the meantime.
>
Yes, that works fine.
> 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
> problem.
>
Exactly.
> >> 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?
>
This is for both patched and unpatched, sorry.
xterm, _numeric keypad_ PageUp/... keys, in editor and prompt.
(NumLock glitch detected. Keypad will malfunction with NumLock off)
NumericHome generates 'w', NumericEnd generates '\',
NumericPgUp generates 'y', NumericPgDn generates ']',
NumericUp generates 'x', NumericDown generates '^',
NumericLeft generates 't', NumericRight generates 'v',
and '5' generates 'u', for sake of completeness. :)
This is the xterm-numpad-glitch problem, not related to your patch, I
guess.
The only difference I see with your (v3) patch is that Home and End work
in prompt (bottomwin) on freebsd console, with '-K'. It doesn't break
anything on freebsd. So if it doesn't break other platforms, it's ok.
But I don't understand why I would use -K since it doesn't fix anything
(from a freebsd point of view), and even breaks things without your patch.
> As if it wasn't enough of a mess already.
>
Yeah. :(
> >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.
>
In short:
Only considering freebsd, I'd say ditch -K and have a simple -d to switch
the %€#"@! Delete/BackSpace key.
Your patch fixes some of the -K issues (so it's good).
-K stops the 'S', 'P', 'K' from shown in console term, nano prompt
(because it uses other bindings, I guess), but shows ~ instead of 'S',
'P', 'K' in xterms, nano prompt. On FreeBSD, it's thus quite useless,
except for the switching of Delete/BackSpace:
nano , console: Delete/BackSpace work fine
nano -K, console: Delete becomes BackSpace
nano , xterm : BackSpace becomes Delete
nano -K, xterm : Delete/BackSpace work fine
Both in the editor window and prompt window, with or without your patch.
> >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.
>
Without -K the last part of the sequence is shown ('S', 'P', 'K'), in
console and xterm. With -K console shows nothing and xterm shows '~'.
It's not important, as you say, because those keys aren't needed anyway.
Thanks for your efforts,
wouter