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.
> 
i strongly suggest you take inspiration from how midnight commander
handles this:
- the abort sequence is actually ESC ESC
- additionally, escape sequences time out. when this happens, the abort
  sequence is assumed:
  - $KEYBOARD_KEY_TIMEOUT_US
  - config setting
  - default 1s (i think that's excessive; 50ms is enough in most cases)

additionally, mc implements a "paranoia mode" to avoid getting confused
by unrecognized esc sequences: if chars follow ESC (within the timeout
above) but don't form a valid sequence, they are just dropped.

Reply via email to