nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] ^1, ^2, ^3...


From: David Lawrence Ramsey
Subject: Re: [Nano-devel] ^1, ^2, ^3...
Date: Wed, 26 Apr 2006 17:19:54 -0400
User-agent: Thunderbird 1.5 (X11/20051201)

Benno Schulenberg wrote:
> After pressing lots of keys, I have a few questions:
>
> * How come that ^1, ^9 and ^0 each produce a number, but ^2, ^3 and
> ^5 seem to do nothing?

It has to do with control key aliases available on most keyboards, but
not guaranteed to be on all of them, which is why nano doesn't use most
of them.  (get_control_kbinput() supports them all, though; you can look
at the comments in it for a list of aliases.)  ^1, ^9, and ^0 are not
valid control keys or aliases for any valid control keys.  ^2 is
equivalent to ^Space (move to next word), ^3 is equivalent to Escape,
and ^5 is equivalent to ^], which isn't used for anything and hence
ignored.

> * I imagine that ^4, ^6 and ^7 are the legacy of Pico, but that ^8
> should do a backspace seems weird.  Is that a legacy too?

^4 is equivalent to ^\ (replace), ^6 is equivalent to ^^ (mark), and ^7
is equivalent to ^_ (go to line/column).  ^8 is equivalent to ASCII 127,
which means either Delete or Backspace depending on your terminal type.

> * How come that ^6 works together with Shift, but not ^4 and ^7?

Because ^$ and ^& aren't valid control characters or aliases.  The only
valid control characters are ^Space (^2, ^@), ^A-^Z, ^[, ^\, ^], ^^, and
^_.

> * Where in the source is the equivalence of ^_ and ^/ to ^7 defined?

Nowhere; it's somewhere in the keyboard mapping, if I remember
correctly.

> * Wouldn't it be nicer to put ^/ in the main help text for Go To
> Line instead of ^_, as it is easier to type on many keyboards (no
> Shift) and looks more symmetrical with the next line (^\, Replace)?

Ctrl-- works just as well as Ctrl-_, at least here.  As for symmetry
with replace, making the search key ^/ would be more consistent in my
opinion, but it would break Pico compatibility.

> * How come that ^~ (Ctrl+Shift+~) is equivalent to ^6?

Another alias.

> And one request: what I'd really like to see is that ^C becomes
> equivalent to ^X in the file browser and when displaying help.
>
> When I now do for example ^R ^T ^W ^G, I have to hit ^X ^C ^X ^C to
> get back to the main editing window.  It would be much nicer if
> anywhere in the editor one could simply hit ^C a few times to get back
> to the editing window (where ^C then becomes a harmless cursor
> position showing key).  This way one could reserve hitting ^X for
> exiting from nano, mainly.

Awhile ago, nano 1.3.x had this, but I took it out because it got too
hackish.  Since the hackish areas have been rewritten, it's a lot easier
to put back in, so it's in CVS now.





reply via email to

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