On Sat, Feb 25, 2017 at 10:31:00AM -0800, Kevin J. McCarthy wrote:
> On Sat, Feb 25, 2017 at 05:37:22PM +0100, Walter Alejandro Iglesias wrote:
> > I'm not quite skilled in C but I think I figured out how to add a
> > boolean variable 'esc_key_aborts' to set ESC key as an alternative to
> > the default emacs-like Ctrl-G to abort commands.  I guess vi-like users
> > will appreciate this feature.
> It looks like you were able to subscribe to the mailing list finally.
> Did you figure out what the problem was?
> 
> I'll take a closer look at the patch, but my concern is that
> mutt_getch() is a very low level function, and this change will affect
> more than just the line editor.  I'm not sure the confusion that would
> be generated is worth the configurability in this case.
> 
> Do others have comments?

I do like the idea, but I also share your concerns about the impact of
this change. One important thing to remember is that the <ESC> key is
also used as a <Meta> dead key on standard terminals (and that depends
on your stty settings, IIRC), so doing so might make it impossible to
run any key binding containing a <Meta> modifier.

That being said, if we were to make it possible to change the "abort"
key, we should make it possible to change to any key, not just ESC or
<C-g>.

So maybe adding a command to define and validate what key is
bound to the abort feature and have mutt_getch() check against that key
string? Maybe having several keys mapped to abort could be an idea?

Then making sure that no binding has that key, and prevent the binding
command to bind something to that key would make sense, to avoid any
surprise.

-- 
Guyzmo

Reply via email to