You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior of Escape is incorrect when the "Single Press" option in turned off. It's different from Linux, making it hard to have consistent muscle memory.
Here's what the manual page says:
Esc key mode.
By default, Midnight Commander treats the Esc key as a key prefix. Therefore, you should press Esc code twice to exit a dialog. But there is a possibility to use a single press of Esc key for that action.
Single press. By default this option is disabled. If you'll enable it, the Esc key will act as a prefix key for set up time interval (see Timeout option below), and if no extra keys have arrived, then the Esc key is interpreted as a cancel key (Esc Esc).
Timeout. This options is used to setup the time interval (in microseconds) for single press of Esc key. By default, this interval is one second (1000000 microseconds). Also the timeout can be set via KEYBOARD_KEY_TIMEOUT_US environment variable (also in microseconds), which has higher priority than Timeout option value.
So my expectation is that when "Single Press" is off, the behavior is the same as with "Single Press" on and infinitely large timeout. That's what I see on Linux.
But the actual behavior on Windows is different. When "Single Press" is off, a single Escape is treated as Escape immediately. It as if "Single Press" is on and the timeout is 0. For instance, I cannot use Escape followed by 0 to exit MC no matter how fast I press one key after the other.
If it's tricky to implement the infinite timeout, please use a very large timeout, e.g. 1 billion microseconds (1000 seconds).
I'm OK with changing the default to "Single Press" on with a very short timeout (e.g. 1 millisecond) so that Windows-only users don't have to wait or press Escape twice.
It's confusing to have settings do something different from what they should do.
The text was updated successfully, but these errors were encountered:
> timeout = INFINITE
> wait for next key (timeout)
> if key-down:
> if escape-special;
> consume key-down
> return escaped
> if Unicode
> return escape
> consume key-down
> if key-up:
> if (key == ESCAPE)
> timeout = KEYBOARD_KEY_TIMEOUT_US (default 1 second)
As such access to specials can be achieved using either
[ESC-down] + [special-down];
[ESC-press] + [special-down], within KEYBOARD_KEY_TIMEOUT_US timeout.
KEYBOARD_KEY_TIMEOUT_US:
This options is used to setup the time interval (in microseconds) for single press of Esc key. By default, this interval is one second (1000000 microseconds). Also the timeout can be set via KEYBOARD_KEY_TIMEOUT_US environment variable (also in microseconds), which has higher priority than Timeout option value.
Considering
allowing [ESC-down] + [special-down] is either mode; ESC report delayed until next up/down event.
The behavior of Escape is incorrect when the "Single Press" option in turned off. It's different from Linux, making it hard to have consistent muscle memory.
Here's what the manual page says:
So my expectation is that when "Single Press" is off, the behavior is the same as with "Single Press" on and infinitely large timeout. That's what I see on Linux.
But the actual behavior on Windows is different. When "Single Press" is off, a single Escape is treated as Escape immediately. It as if "Single Press" is on and the timeout is 0. For instance, I cannot use
Escape
followed by0
to exit MC no matter how fast I press one key after the other.If it's tricky to implement the infinite timeout, please use a very large timeout, e.g. 1 billion microseconds (1000 seconds).
I'm OK with changing the default to "Single Press" on with a very short timeout (e.g. 1 millisecond) so that Windows-only users don't have to wait or press Escape twice.
It's confusing to have settings do something different from what they should do.
The text was updated successfully, but these errors were encountered: