nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] Escape-Escape keyboard sequences on iTerm2


From: Mike Scalora
Subject: Re: [Nano-devel] Escape-Escape keyboard sequences on iTerm2
Date: Sat, 26 Mar 2016 08:30:37 -0600



On Sat, Mar 26, 2016 at 3:45 AM, Benno Schulenberg <address@hidden> wrote:

On Fri, Mar 25, 2016, at 14:10, Mike Scalora wrote:
> On Wed, Mar 23, 2016 at 10:28 AM, Benno Schulenberg <address@hidden>
> > Do you mean iTerm sec, or iTerm2?  Or doesn't that make a
> > difference?
>
> iTerm2, as I understand it iTerm (1) is dead, no updates in over 5 years.
> The changes might work on the old iTerm but I have not investigated.

Okay, it was just to get the naming right.

At this point "iTerm" in conversation is assumed to mean the iTerm2 project which produces an app named iTerm and is linked to by the old sourceforge iTerm project page which says: "iTerm project is currently on hold (See the goodbye note from Fabian). We recommend you to check out iTerm 2, a new project that is based on iTerm and has many new features and enhancements."
 
> #1, Currently the Option-Left and Option-Right insert characters into the
> document which is some times hard to notice.

Are there any other Option+key keystrokes that produce characters
instead of nothing or "Unknown Command"?

I have not found any other navigation keys when used with Option that do this. On the Mac, Option and letter/symbol keys produce special printable characters like Option-8 is a bullet (•) or Option-p is pi (π) and those work great if utf-8 is enabled.
 
> > Aren't Command+Left-arrow, Command+Riight-arrow used for
> > Home and End, that is: for beginning-of-line and end-of-line?
>
> That is on Apple's list of standard shortcuts but doesn't apply to the two
> popular terminals.

Which is the other popular terminal?  And does the patch work
on that one too?

Apple's built-in Terminal app is the most popular. People who like to customize more tend to move to iTerm. By default Terminal has explicit sequences for Option-left (ESC-b) and Option-right (ESC-f) [which are emacs word-.left/right] but just sends the normal up/down codes. Those are mapped to nano commands already but can be reconfigured to do word-left/right in the .nanorc.

I'm sure there is some history, maybe back to the old iTerm project days but I have no idea why the default keyboard mapping are so different or even where the esc-esc-[-X sequence originated. I was a bit surprised when I found the escape counter logic in the nano source.

> This new patch should have all the changes you suggested.

Okay.  Thanks.  I tweaked a few things, though, to avoid two
unneeded calls of sc_seq_or() and an unneeded checking of
the keyboard buffer length.  Please verify whether this still
works for you, and whether the changes are okay with you.

Looks great. I tested it again with your latest patch on the original, everything worked fine.
 
Confirmation from some other OS X / iTerm2 users would be
nice too.

I can try to make that happen.

Benno

--
http://www.fastmail.com - Email service worth paying for. Try it for free



reply via email to

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