nano-devel
[Top][All Lists]
Advanced

[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: Sat, 12 Jul 2003 06:34:28 +0200 (CEST)

On Fri, 11 Jul 2003, David Lawrence Ramsey wrote:

> At the moment, the main issue is the input problems that nano has with
> FreeBSD terminals.  (Unless of course, there are other problems with
> nano on FreeBSD that we don't know about, in which case please speak
> up.)  It's just a matter of finding out, with your help, what has to be
> done to get everything working properly input-wise.  Basically, all we
> need at the moment is for you to test all of nano's shortcut keys and
> make sure they all work properly (both with and without --keypad).
>
> When input problems crop up on your FreeBSD boxes, we need to know:
>
> 1. Are you using --keypad or not?
>

No. (What does it do? It doesn't change anything...)

> 2. What exact terminal type(s) are you using, e. g. the FreeBSD console,
> xterm on FreeBSD, etc., and what is $TERM on those terminal type(s)?
>

cons25/cons25l1 (default console/default console in iso-8859-1 mode)

&

xterm (linux aterm --> ssh to freebsd --> nano)

> 3. Exactly what keys malfunction, and how do they malfunction?
>

console:
-------

fails:
alt (alt-button ignored, probably not defined as meta)
  --> 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'

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

------------------------------------------------------------------------

xterm:
-----

fails:
backspace deletes right (editor and prompt)
pageup/pagedown/insert on keypad and functionpad (*only in prompt*)
  PageUp generates 'S'
  PageDown generates 'R'
  Insert generates 'K'

works:
alt-combinations
ctrl-combinations
Home/End
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.

> Now, in terms of #3, we know about the Delete/Backspace confusion.
> However, we need to know the answers to #1 and #2 concerning it.  (If
> extended ncurses values like KEY_DC are being generated when the hack
> isn't applied, then it appears that the answer to #1 is no.  Is this
> right?)  Also:
>
> 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.

> 2. Without the hack applied: If Backspace generates KEY_DC, what does
> Delete generate?
>

Don't know.

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.

Works for console (not xterm: BackSpace key works as Delete):
DEL: delete-char
RUBOUT: delete-char
"\e[3~": delete-char

Works for xterm (not console: Delete key works as Backspace):
DEL: delete-char
RUBOUT: backward-delete-char
"\e[3~": delete-char

So the RUBOUT function switches fysical keys depending on terminal, in
console (freebsd default cons25 term) it refers do the Delete key, in
xterm it refers to the BackSpace key.

I remember trying to patch pico for this, and it's choosing between a
fully working console or a fully working xterm, for some systems (i.e.
TERM/key combinations).

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).

E.g.: http://www.ibb.net/~anne/keyboard.html

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

The only problem is that some keys (PgUp, PgDwn, 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. The
others are quite trivial, I think those specific codes are just not
implemented in the nano prompt. It's not so important to me.


Regards,

  wouter




reply via email to

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