Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

savannah: escape key timeout stuff #23

Closed
mc-butler opened this issue Dec 25, 2008 · 21 comments
Closed

savannah: escape key timeout stuff #23

mc-butler opened this issue Dec 25, 2008 · 21 comments
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/23
Reporter ossi (@ossilator)
Mentions zaytsev (@zyv)

Original: http://savannah.gnu.org/bugs/?13733

Submitted by:Oswald Buddenhagen <ossi>Submitted on:Mon 11 Jul 2005 05:27:22 PM UTC
Category:Keyboard inputSeverity:3 - Normal
Status:Ready For TestPrivacy:Public
Assigned to:Pavel Tsekov <ptsekov>Open/Closed:Open
Release:current (CVS or snapshot)Operating System:All

Original submission:

so there is this old_esc_mode option ...
it really needs some more exposure. in fact, it should be enabled 
by default, and the timeout should be lowered from one second to at 
most 100 ms (that is, virtually instantaneous).
high-latency network links should not cause problems, as the chars 
of one keypress should still be in one packet, keeping the sequence 
intact. if there really is some problem with this, the patch posted 
by denis vlasenko on 2004-10-25 to make the timeout configurable 
via an environment variable can be used. 

Comment 1 by Pavel Tsekov <ptsekov> at Wed 01 Mar 2006 05:11:49 PM UTC:

Please, test the attached patch. Comment, flames, etc will be much 
appreciated.

Comment 2 by Oswald Buddenhagen <ossi> at Wed 01 Mar 2006 06:59:42 PM UTC:

first a correction on my side: meanwhile i did actually experience 
a sequence being torn apart, so the "one packet" theory simply does 
not hold. :(
going slightly overboard, one could apply some heuristics to 
determine the worst-case line latency automatically.

i'm not sure it is a good idea to make the timeout a proper option 
only. it makes sense to have the setting depend on the location, or 
rather on the route to the location. an env variable seems to be 
the by far the most appropriate means of achieving this. having 
separate settings for certain $TERM seems interesting as well, as i 
might want to extend the timeout for terms where i have to enter 
esc sequences manually - but that can be scripted in the startup 
script as well.
other than that the patch seems reasonable (i did not test it, but 
i don't see any code paths which you could have skipped if you 
tested it at all ;).

Comment 3 by Pavel Tsekov <ptsekov> at Wed 01 Mar 2006 07:17:35 PM UTC:

Well, one could always adjust it as per his immediate requirements. 
Have you noticed that I've added a new configuration dialog ? Why 
do you think an environment variable is more appropriate ?

Comment 4 by Oswald Buddenhagen <ossi> at Wed 01 Mar 2006 07:25:41 PM UTC:

> Well, one could always adjust it as per his immediate requirements.
>

this is slow. and extremely annoying if done several times a day.

> Have you noticed that I've added a new configuration dialog ?
>

no, i did not read your patch. ;-)

> Why do you think an environment variable is more appropriate ?
>

it is scriptable. without sed-ing the config file, that is.
in the scenarios i drafted this option is rather imposed by the 
operation environment than by user preference, so it just makes 
sense to use something that is naturally part of the environment.

Comment 5 by Pavel Tsekov <ptsekov> at Wed 01 Mar 2006 07:47:46 PM UTC:

> > Well, one could always adjust it as per his immediate 
requirements.
> >
> this is slow. and extremely annoying if done several times a day.


Maybe I am missing the point but I cannot imagine why one would 
need to adjust it more than once. Maybe if one logs into a single 
network host from multiple sources... But still this option makes 
sense mostly when used on a local machine. I think that beyond 
certain values enabling this option is not usefull at all.

> > Have you noticed that I've added a new configuration dialog ?
> >
> no, i did not read your patch. ;-)


You could try it at least :) It doesn't change the default 
behaviour it just adds the ability to configure old_esc_mode and 
the related timeout (I should have mentioned that earlier).

> > Why do you think an environment variable is more appropriate ?
> >
> it is scriptable. without sed-ing the config file, that is.
> in the scenarios i drafted this option is rather imposed by the operation
> environment than by user preference, so it just makes sense to 
use something
> that is naturally part of the environment.


In this case Denis Vlasenko's patch should suffice.

Comment 6 by Oswald Buddenhagen <ossi> at Wed 01 Mar 2006 08:09:41 PM UTC:

> [...] I cannot imagine why one would need to adjust it more than 
once.
>

you can log into the same machine from different sources - locally, 
through serial line, through networks with different latencies. and 
also you can share the same config among several machines if you 
have a networked home. both cases are not exactly exceptional in 
heterogenous environments like unis or even when simply ssh-ing 
into your box at home.

> > no, i did not read your patch. ;-)
>
> You could try it at least :) [...]
>

oil your irony detector, dude. ;)

> In this case Denis Vlasenko's patch should suffice.
>

i think the env var should override the setting, but both make 
sense. ideally, the config dialog would show whether the setting 
will take effect - to avoid surprises.

Comment 7 by Pavel Tsekov <ptsekov> at Sat 12 Aug 2006 07:22:02 AM UTC:

Denis Vlasenko's patch has been commited.

Comment 8 by Miguel Pérez <wiseman1024> at Wed 20 Sep 2006 03:41:52 PM UTC:

I'd like to be able to set it to 0 ms, i.e. Escape behaving as 
Escape and nothing else.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Dec 25, 2008 at 12:49 UTC

added by ptsekov

@mc-butler
Copy link
Author

Changed by styx (@styx) on May 14, 2009 at 9:56 UTC (comment 1)

  • Milestone set to 4.7

@mc-butler
Copy link
Author

Changed by styx (@styx) on May 20, 2009 at 13:14 UTC (comment 2)

  • Milestone changed from 4.7 to future releases

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Nov 24, 2009 at 20:41 UTC (comment 3)

  • Type changed from defect to enhancement
  • Milestone changed from Future Releases to 4.7
  • Severity set to no branch

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jul 11, 2010 at 11:40 UTC (comment 4)

  • Cc set to ossi@….org

given that vda's patch was committed and serves the purpose well, i'd just close this ticket.

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jul 11, 2010 at 11:42 UTC (comment 5)

no, wait, the default timeout should be reduced. i'm running with 50ms (instead of 1s). that should be ok for most cases.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jul 11, 2010 at 11:49 UTC (comment 6)

If you can't use alt as meta, you need use esc as meta. Short timeout doesn't allow you use esc as meta. 1s is enough time to press next key.

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jul 11, 2010 at 11:54 UTC (comment 7)

that's besides the point. we are talking about the default. the default should not be optimized towards a few setups with broken/stone-aged terminals, but towards the majority.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jul 11, 2010 at 12:27 UTC (comment 8)

Yes, we are talking about the default. Current default is optimum for those people who need to use esc as meta not in terminal but in X Window.
Example: the alt-shift shortcut is used in X to change the keyboard language layout (en/ru, en/de, en/...). Can you use the alt-shift-/ shortcut to find files if MC is runing in termina emulator? If no, you need use esc shift-/ key combination. If timeout is short, you cannot time to press shift-/ after pressing esc.

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jul 11, 2010 at 12:50 UTC (comment 9)

if you have an x11 layout switcher which reacts to alt-shift even if some other key was pressed additionally, then you should a) kill the guy who made it and b) get yourself a sane switcher.

there really is no reason to break the experience of everyone else for the sake of a few people who use broken (or badly configured) software.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jul 11, 2010 at 14:13 UTC (comment 10)

  • Cc changed from ossi@….org to ossi@….org, zaytsev

Aha, we change the default and the shit hits the fan again. Both vda's patch and a config dialog setting are there now, for those who want to change it without any hassle. What's the point?

I agree that this ticket should be closed though.

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jul 11, 2010 at 14:28 UTC (comment 11)

so let it hit. no noteworthy detriment will come out of it.

the point is optimizing the out-of-the-box experience. delivering stuff that just works (for the vast majority). user friendliness, you know.

fwiw, afaict, the config dialog is not in, and imo it's good that way.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jul 11, 2010 at 15:07 UTC (comment 12)

It is in on 4.7.3-23-gc9d0301, f9 -> o -> c -> i.

User-friendliness is a relative notion. I am one of those, who often use esc as meta (and most of those, dealing with Cyrillic are for various reasons), so this change will de-optimize out-of-the-box experience for me.

Whom do I care most about...? :)

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jul 11, 2010 at 15:26 UTC (comment 13)

oh, there it is hidden. :)
it has no indicator that the env variable will override it, right?

i'd argue that as a user of a cyrillic layout you cannot have a good out-of-the-box experience in this regard anyway - no fresh user would know that he can create escape sequences manually. consequently it seems reasonable to optimize the case which has a chance to "just work" at all, and let those who will have to look into the manual anyway change the configuration.
regarding *your* personal experience (and the one of other experienced users): i don't think that changing one option more per new account is a particularly loathsome experience. ;)

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jul 11, 2010 at 15:28 UTC (comment 14)

I am not sure about the current state of affairs with the regards of the environment variable. If it is the case, this probably has to be documented and actually makes sense.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jul 12, 2010 at 10:38 UTC (comment 9.15)

Replying to ossi:

if you have an x11 layout switcher which reacts to alt-shift even if some other key was pressed additionally, then you should a) kill the guy who made it and b) get yourself a sane switcher.

there really is no reason to break the experience of everyone else for the sake of a few people who use broken (or badly configured) software.

Ok. forget alt-shift. This is lame example. What can you tell about meta-tab? In MC meta-tab is used for autocompletion in editor, command line, some input lines. In X11 the alt-tab is used to switch windows and MC doesn't get this event, of course. Since alt-tab cannot be used for autocompletion, the esc tab is a only way for that. The default 1s timeout allows you to use this feature, 50mc (or even 100ms) doesn't.

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jul 12, 2010 at 15:15 UTC (comment 16)

on a modern keyboard you could configure win-tab for window switching.

anyway, this is indeed an issue which annoys the heck out of me. and suggesting to use esc-tab instead is positively not a relevant suggestion. that's why some months ago in a different discussion about shortcuts i suggested using ctrl-space as a general solution for that problem.

so, you still need to come up with a good example. :P

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jul 12, 2010 at 16:13 UTC (comment 16.17)

Replying to ossi:

on a modern keyboard you could configure win-tab for window switching.

And you could configure MC with the same easiness. Where is the logic? :)

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jul 12, 2010 at 16:28 UTC (comment 17.18)

Replying to andrew_b:

And you could configure MC with the same easiness. Where is the logic? :)

a) applications are less likely to use the win(-dows (management)) key, so this creates potentially more compatibility in general
b) the so-called "legacy" window managers don't grab alt-tab, just like the linux console doesn't. so it's more in line with unix traditions to have that combo free for applications - otherwise mc wouldn't have used it in the first place
c) there is no word about excluding other approaches in it at all

and d) i still prefer changing the default mapping to ctrl-space, which is a common completion shortcut in IDEs and is not expected to cause other conflicts (except possibly in mc itself)

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 13, 2010 at 13:27 UTC (comment 19)

  • Resolution set to wontfix
  • Status changed from new to closed

So...

Esc key mode (single or double press) is available via configuration dialog. Default mode is double press. Timeout for single press can be set when the single press mode is activated.

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jan 11, 2014 at 15:49 UTC (comment 20)

  • Reporter changed from slavazanko to ossi
  • Branch state set to no branch
  • Cc changed from ossi@….org, zaytsev to zaytsev
  • Description edited

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Development

No branches or pull requests

1 participant