Ticket #3087 (new enhancement)

Opened 11 years ago

Last modified 8 years ago

User friendly representation of shortcut keys

Reported by: egmont Owned by:
Priority: minor Milestone: Future Releases
Component: mc-core Version: 4.8.10
Keywords: Cc: gotar@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Emacs style shortcut keys in the F9 dropdown menus (such as M-h) are really not user friendly, especially for new users.

What's that "C-"? Okay let's imagine one figures out it's Ctrl. Then what's "M-"??? The vast majority of users don't have a Meta key (they haven't ever heard about it), they have an Alt key. You may want to try to teach them about legacy Unix systems of ~30 years ago, but honestly today when pretty much all the keyboards have "Ctrl" and "Alt", who cares?

I recommend switching to shortcut key representations that are easy to understand and match the labeling of most keyboards and the current trends of desktop environments, that is: "Ctrl+" or "Alt+" followed by the uppercase letter. Representation in the F9 dropdown menu, as well as in the documentation (help, manual) should be updated too. These two words should be sent through gettext, e.g. German keyboards have "Strg" instead of "Ctrl".

If hardcore mc users insist, we could keep a config option to show the more compact Emacs representation in the F9 menu, but it shouldn't be the default.

A random article about the same issue: http://ergoemacs.org/emacs/modernization_meta_key.html

Change History

comment:1 Changed 11 years ago by gotar

  • Cc gotar@… added
  • Type changed from defect to enhancement

Yeah, and F1-F12 should be changed to 'Nth function key in upper row of the keyboard' for users that try to press uppercase letter 'F' with appropriate digit at the same time.

Linux terminal and all the libraries (readline) use meta. Xorg uses meta. Meta==ESC (not alt!). There are systems without Alt key. And there is no place for 'Ctrl' or 'Alt' long forms in general. Newbies won't use the shortcuts anyway (and mc at all).

Creating option for such thing is nothing more than clutter.

comment:2 follow-up: ↓ 7 Changed 11 years ago by ossi

you are being ridiculous about the function keys.

as the OP pointed out, the historical (and therefore internal) naming of the keys is utterly irrelevant.
i'll buy the space argument, but then it should *still* be A, not M. in fact, that was initially one of the most cryptic things for me when i came from DOS/NC (yep, one of the first applications i ever used as a total n00b) to MC (yup, one of the first applications i got familiar with on linux - so much for "newbies don't use mc". and yes, at the time linux environments were already graphical by default).

comment:3 follow-up: ↓ 8 Changed 11 years ago by egmont

I don't see space as an issue, there is room to display long shortcuts in the menu at 80 columns, at least in English. Could you point to a locale where it would be an issue?

Ideally I'd also change the bottom row to contain F1 F2... instead of 1 2..., but I understand space is a concern there.

If Meta==ESC then I wonder why we don't display the shortcut as such, e.g. "Quick cd: Esc C"?

Everyone's newbie at some point. And using an end user application (e.g. mc) is not the same level as digging into readline/Xorg configs. MC is still (and should remain) one of the best filemanagers for everyone, including newbies.

comment:4 follow-up: ↓ 9 Changed 11 years ago by egmont

Please note that the current manual page is totally inconsistent with itself (and with the dropdown's current notation):

It says "[...] and the Meta (sometimes labeled ALT or even Compose) keys". Instead of this, "Alt (sometimes labeled Meta or even Compose)" would fit better the current computer market.

It declares it's going to use S-<chr> to denote shift, but it never does, it always spells out "shift".

It declares it's going to use Alt-<chr> (yes, Alt, and not Meta!) and it does so most of the time, but sometimes it uses "M-", or both of them next to each other: "you may use M-e (Alt-e)". Heck if you need to represent the same shortcut key in two different ways for the user to understand then something's definitely wrong!

It uses both "C-" and "Ctrl-" inconsistently.

Mixing one letter names and longer names give combinations like "C-Shift-Enter" which just look crazy.

The name of some other keys also have multiple variants, e.g. "space" vs "Space" vs "Space bar", "next-page" vs "Next Page", "move-left" vs "Left", "down-key" vs "Down", "PageUp" vs "Page Up", "home" vs "Home", "a1" vs "A1" etc.

It says "View (F3, F13)", "Edit (F4, F14)", "Copy (F5, F15)", "Rename/Move (F6, F16)", but then "Quit (F10, Shift-F10)". Again, the last one is inconsistent with the rest. Given that most keyboards don't have F13 etc., Shift-F3 would sound more logical to me, and of course the "Learn keys" dialog should also be changed accordingly. Plus, the inline text in the manual says "Press F14 (usually F14)", "F15 (usually F15)", "F16 (usually F16)", which are clearly wrong.

It mentions "extended learn keys" (nb. I couldn't figure out how to get to this or what it is) which uses the notion like "ctrl-alt-right=\e[[1;6C", again, it's "alt" here and not "meta" and apparently it's something to be put in the ini file.

I understand that there do exist systems with Meta, F13-F20, A1 whatever keys... but how many? Should we really adopt the notion of shortcut keys to them, rather than to the vast majority of computers? See ticket #3089 where you (mc developers) just broke something for all non-GNU systems (probably including *BSD, MacOSX) and you're okay with that, but you're afraid to fix the shortcuts on the majority of today's computers because it would break them on some very special systems?

comment:5 follow-up: ↓ 6 Changed 11 years ago by ossi

semi-OT: about f13 vs shift-f3 ... caution! some linux kernel keymaps (at least the de-nodeadkeys i use) don't "double-map" keys (f11 could be also shift-f1), so f13 in fact shift-f1. this is obviously a royal PITA. the bright side is that i've observed this particular brain damage *only* on the linux console, so it may be possible to automatically work around this by accessing the console directly (which mc already does anyway, iirc).

comment:6 in reply to: ↑ 5 Changed 11 years ago by egmont

Replying to ossi:

semi-OT: about f13 vs shift-f3 ... caution!

This is indeed true and is a real PITA, if I had infinite amount of time this would be one of the bugs I'd like to fix. To make it complicated, there seem to exist forks of the keymap database (e.g. kbd versus console-data), and to make it even more complicated, the most standard keymap "us.kmap" does the exact opposite of what's hardwired in the kernel as the very default. So even agreeing on which of the two is the desired behavior would take tons of debate, I'm afraid.

comment:7 in reply to: ↑ 2 Changed 11 years ago by gotar

Replying to ossi:

you are being ridiculous about the function keys.

Only to show, that you can't make newbie's life easier at any cost.

as the OP pointed out, the historical (and therefore internal) naming of the keys is utterly irrelevant.

This is universal naming - using Alt is valid mostly for PC keyboards. I wouldn't mind this to be build-time detected (x86/x86_64) /ignoring the fact, that mc might be used remotely from entirely different machine/.

comment:8 in reply to: ↑ 3 Changed 11 years ago by gotar

Replying to egmont:

Ideally I'd also change the bottom row to contain F1 F2... instead of 1 2..., but I understand space is a concern there.

Or to M-1, M-2... :)

If Meta==ESC then I wonder why we don't display the shortcut as such, e.g. "Quick cd: Esc C"?

Well, maybe because escape key is also specific to some, but not all, keyboards?

Everyone's newbie at some point. And using an end user application (e.g. mc) is not the same level as digging into readline/Xorg configs. MC is still (and should remain) one of the best filemanagers for everyone, including newbies.

Honestly, I've never seen any newbie using keyboard shortcuts (or altering default settings). Don't get me wrong - I'm not against newbies using mc, I just said that newbies don't care - until they are not newbies, then it doesn't matter.

comment:9 in reply to: ↑ 4 ; follow-up: ↓ 10 Changed 11 years ago by gotar

Replying to egmont:

Please note that the current manual page is totally inconsistent with itself

What stops you from fixing that if you care?

but you're afraid to fix the shortcuts on the majority of today's computers because it would break them on some very special systems?

It's not a popularity contest, it's all about correctness.

Physical keyboard is only some input device, you cannot map names from some particular solution, even assuming it's dominant. Otherwise - please add support for Windows-key.

comment:10 in reply to: ↑ 9 ; follow-up: ↓ 12 Changed 11 years ago by egmont

Replying to gotar:

What stops you from fixing that if you care?

Your questions seems to imply that you believe one shouldn't file a ticket unless they already have a patch.

What stops me? Maybe I'd like to see buy-in from the developers first so that my time and work is not wasted. Maybe I don't have time at all. Maybe I'm already working on it right now. Maybe I'd like to see my other, more important patches get accepted before I proceed. Who knows?

It's not a popularity contest, it's all about correctness.

You seem to sacrify usability for correctness. Yes my proposed change would break something for how many users? Less than 1% I would guess. And you're worried about this (while you still don't care about that other "fix" which breaks something for way more users). In the mean time, my proposed change would make mc more usable for 99%+.

A newbie vs. non-newbie is not a question of waking up one morning with that "I'm no longer a noob" feeling. It's constant learning through continuous usage of software. If you perform the same action over and over again, you'll look into a shortcut that makes it faster. And the very last thing you'd want to face is the need to seek additional technical information which you don't care about the least. Finding a key on your keyboard shouldn't require understanding of Unix-specific virtual software layers and learning about ancient computer history or the kind of rare computers one will probably never see in their life. I'm sure 99% of our users just don't care about it, and they are right: they shouldn't need to care. Yes I'd like to sacrifice that remaining 1% for this goal (it's not any harder for them to reverse-map Alt to Meta in their head, and honestly why care if it's not technically correct? I thought we're developing mc for the end users.)

comment:11 follow-ups: ↓ 13 ↓ 14 Changed 11 years ago by ossi

the 1% vs 99% argument is actually way stronger than you present it. even *if* there are still some people with lisp machine keyboards, there is absolutely no way they don't know how a pc keyboard looks like. i'm fairly sure the inverse is not true for about 99.98% of the pc keyboard users.

a slighly more interesting problem are apple keyboards. they have alt, but traditionally they use the apple (command) key more like alt is used on pcs. is the mapping literal or equivalent?
and do we even care? do mac users use mc?

comment:12 in reply to: ↑ 10 ; follow-up: ↓ 15 Changed 11 years ago by gotar

Replying to egmont:

Replying to gotar:

What stops you from fixing that if you care?

Your questions seems to imply that you believe one shouldn't file a ticket unless they already have a patch.

When someone is capable to do so - this is not the code, it's a text. Just make it better if you care. Complaining about it's quality is pointless, I doubt anyone is willing to fix it, if it hasn't been done for now.

It's not a popularity contest, it's all about correctness.

You seem to sacrify usability for correctness. Yes my proposed change would break something for how many users? Less than 1% I would guess. And you're worried about this (while you still don't care about that other "fix" which breaks something for way more users). In the mean time, my proposed change would make mc more usable for 99%+.

There is no difference in usability and nothing breaks. I don't sacrifice anything, just require users to have basic knowledge. If they don't see the difference between bits (b) and Bytes (B), SI and binary unit prefixes (k/K/Ki/whatever), they would have problems anyway. Making all this wrong or long forms won't help anyone.

Finding a key on your keyboard shouldn't require understanding of Unix-specific virtual software layers and learning about ancient computer history or the kind of rare computers one will probably never see in their life.

Right Alt (on some keyboards AltGr?) is used sometimes for national characters (like in Poland) and so it's not Meta (but ISO_Level3_Shift). So with Alt prefix many newbies taught to use 2 hands while typing would press e.g. right Alt+f instead left Alt and this obviously won't work. Maybe print 'left Alt' then?

and honestly why care if it's not technically correct?

Because it's lame.

comment:13 in reply to: ↑ 11 Changed 11 years ago by gotar

Replying to ossi:

Don't forget about touchscreen keyboards - they often have Esc, while Alt is very rare. User familiar with PC keyboard would simply not find appropriate key, not knowing that Esc is Meta. Is this argument strong enough to change all the M-keys to E-keys?

and do we even care? do mac users use mc?

Ever heard about ssh? ;)

Last edited 11 years ago by gotar (previous) (diff)

comment:14 in reply to: ↑ 11 Changed 11 years ago by egmont

Replying to ossi:

a slighly more interesting problem are apple keyboards. they have alt, but traditionally they use the apple (command) key more like alt is used on pcs. is the mapping literal or equivalent?
and do we even care? do mac users use mc?

I used to, but I no longer have a mac. IIRC inside terminals the Alt key was the same as the Alt on PCs. The apple key is used for copy-paste and such combos (which is often ctrl+shift+ on graphical terminals).

comment:15 in reply to: ↑ 12 ; follow-up: ↓ 16 Changed 11 years ago by egmont

Replying to gotar:

There is no difference in usability and nothing breaks. I don't sacrifice anything, just require users to have basic knowledge.

What makes you believe that knowing what "Meta" is should be basic knowledge?

If they don't see the difference between bits (b) and Bytes (B), SI and binary unit prefixes (k/K/Ki/whatever), they would have problems anyway.

Oh damn... I never in my life cared about the difference between k/ki and it never caused a problem in using shortcut keys.

Right Alt (on some keyboards AltGr?) is used sometimes for national characters (like in Poland) and so it's not Meta (but ISO_Level3_Shift). So with Alt prefix many newbies taught to use 2 hands while typing would press e.g. right Alt+f instead left Alt and this obviously won't work. Maybe print 'left Alt' then?

In the vast majority of the cases, you buy a keyboard of a certain layout, and configure your OS to use that layout. In this case the labeling and the actual behavior match perfectly. Otherwise it's safe to assume that the user knows what he's doing. (I, for one, have Y and Z swapped compared to the labeling of keys. Of course I won't blame MC developers for not swapping them back in shortcut key notations.)

and honestly why care if it's not technically correct?

Because it's lame.

Nope. Telling a user to use a key that he doesn't have _is_ lame. The internals of any computer system are gazillions of ugly hacks and workarounds and legacy stuff built on top of each other. The goal is to hide it from the end user and give them something that's as easy to use as possible.

comment:16 in reply to: ↑ 15 ; follow-up: ↓ 17 Changed 11 years ago by gotar

Replying to egmont:

What makes you believe that knowing what "Meta" is should be basic knowledge?

info readline

The text M-k' is read as Meta-K' and describes the character produced when the Meta key (if you have one) is depressed, and the <k> key is pressed. The Meta key is labeled <ALT> on many keyboards. On keyboards with two keys labeled <ALT> (usually to either side of the space bar), the <ALT> on the left side is generally set to work as a Meta key. The <ALT> key on the right may also be configured to work as a Meta key or may be configured as some other modifier, such as a Compose key for typing accented characters.

If you do not have a Meta or <ALT> key, or another key working as a Meta key, the identical keystroke can be generated by typing <ESC> _first_, and then typing <k>. Either process is known as "metafying" the <k> key.

ncurses uses term Meta. Shells (zsh, bash) use meta key. xterm - meta again. There's no way for terminal user not to encounter this term. Most of TUI utilities (mail/news readers, IRC clients, editors etc) have key mappings configured with 'meta'. Sooner or later he will have to face that, thus I assume it is basic.

Right Alt (on some keyboards AltGr?) is used sometimes for national characters (like in Poland) and so it's not Meta (but ISO_Level3_Shift). So with Alt prefix many newbies taught to use 2 hands while typing would press e.g. right Alt+f instead left Alt and this obviously won't work. Maybe print 'left Alt' then?

In the vast majority of the cases, you buy a keyboard of a certain layout, and configure your OS to use that layout. In this case the labeling and the actual behavior match perfectly.

Nope. There is polish keyboard layout, but nobody uses it (except mechanical typewriters). In fact you can't buy polish keyboard. The fact that 'Right Alt'!='Alt' is confirmed by readline documentation I've quoted.

Telling a user to use a key that he doesn't have _is_ lame.

There is no 'X' key (capital), there is no 'ó' key, there is no '!' key - would you like to change 'C-x !' to 'C-x S-1' as well?

The internals of any computer system are gazillions of ugly hacks and workarounds and legacy stuff built on top of each other. The goal is to hide it from the end user and give them something that's as easy to use as possible.

Agreed. I simply don't agree that 'Meta' is some exotic term that should be avoided. And if someone decides it should - I'd vote for calling this 'escape' not 'alt', as it's more generic and true. And more robust - would work in broken terminal emulators (like misconfigured putty or inside screen), from crippled keyboards, might be used by handicapped people etc. and so it's better suited for 99,9% not only 99%.

Last edited 11 years ago by gotar (previous) (diff)

comment:17 in reply to: ↑ 16 ; follow-up: ↓ 18 Changed 11 years ago by egmont

Replying to gotar:

ncurses uses term Meta. Shells (zsh, bash) use meta key. xterm - meta again. There's no way for terminal user not to encounter this term. Most of TUI utilities (mail/news readers, IRC clients, editors etc) have key mappings configured with 'meta'. Sooner or later he will have to face that, thus I assume it is basic.

I just want to use a filemanager. I don't care about shells, about readline, about ncurses, or about any other command line applications. (I == probably most of the users.) Why do you insist that the user should learn about all these highly technical stuff before being able to use shortcut keys in a filemanager? Makes absolutely no sense to me.

Nope. There is polish keyboard layout, but nobody uses it (except mechanical typewriters). In fact you can't buy polish keyboard. The fact that 'Right Alt'!='Alt' is confirmed by readline documentation I've quoted.

I don't think the Polish keyboard layout is representative here.

There is no 'X' key (capital), there is no 'ó' key,

On my keyboard I do have a key labeled 'X' (capital), although indeed it usually produces a lowercase 'x'. I also happen to have an 'Ó' key usually producing 'ó'. My computer came with a non-English keyboard layout, and a Linux that does for every key what's labeled on it (including a key labeled Alt Gr which does different things than Alt).

there is no '!' key - would you like to change 'C-x !' to 'C-x S-1' as well?

Please don't be ridiculous.

Agreed. I simply don't agree that 'Meta' is some exotic term that should be avoided.

On contrary, I see absolutely no point why we'd ever ask anyone to get familiar with this term. It's of zero practical use to most users.

comment:18 in reply to: ↑ 17 ; follow-up: ↓ 19 Changed 11 years ago by gotar

Replying to egmont:

I just want to use a filemanager. I don't care about shells, about readline, about ncurses, or about any other command line applications. (I == probably most of the users.)

I'm sorry to inform you, that you are not nor represent most of the users. In fact you seem to be in minority, as I've never seen any ticket regarding this issue, never seen any question asking what meta is, so there is apparently no problem.

As I said: people capable of using keyboard shortcuts can handle this. All the rest prefers using GUI and if forced to use terminal apps, they make use of no more than 5% of features. This definitely does not include keyboard shortcuts.

Your complains look like "why there's so many light types here, I just want to drive a car!" Can't handle this, travel on bus.

Why do you insist [cut]

Because this is the only proper term. And why do you insist on imaginary problem? Why did you ignored my proposal of changing this to Esc-<key>? I've seen many times people (not necessarily newbies), trying to get Alt-<key> on keyboards without it.

that the user should learn about all these highly technical stuff before being able to use shortcut keys in a filemanager? Makes absolutely no sense to me.

Learning that "The Meta key is labeled <ALT> on many keyboards" is "highly technical stuff"? Don't be ridiculous.

Nope. There is polish keyboard layout, but nobody uses it (except mechanical typewriters). In fact you can't buy polish keyboard. The fact that 'Right Alt'!='Alt' is confirmed by readline documentation I've quoted.

I don't think the Polish keyboard layout is representative here.

I don't think readline documentation refers to polish keyboard only.

My computer came with a non-English keyboard layout, and a Linux that does for every key what's labeled on it (including a key labeled Alt Gr which does different things than Alt).

Oh, so if your keyboard distinguishes both Alts, you represent most of the users again?

there is no '!' key - would you like to change 'C-x !' to 'C-x S-1' as well?

Please don't be ridiculous.

I'm not - most newbies can locate digits on any keyboard, while all that marks above them are much harder to find. Especially when shift-2 produces @ or " depending on keyboard layout, that might be set wrong in operating system (and often is). Similar problem to F13+.

On contrary, I see absolutely no point why we'd ever ask anyone to get familiar with this term. It's of zero practical use to most users.

You have spoken to most users, haven't you? So one last time: most users would never ever use any shortcut. And those who can, have consistent terms in most of the terminal utilities.

Last edited 11 years ago by gotar (previous) (diff)

comment:19 in reply to: ↑ 18 Changed 11 years ago by egmont

Replying to gotar:

I'm sorry to inform you, that you are not nor represent most of the users.

I represent the majority of the users in the usability expectation that if something can be done with having to look up and learn an otherwise pretty useless fact, or straightforward immediately without looking up anything, they'd prefer not to have to waste their time on it.

In fact you seem to be in minority, as I've never seen any ticket regarding this issue, never seen any question asking what meta is, so there is apparently no problem.

This is probably because most users want to do 1 thing and 1 thing only: *use* the software as effectively as they can. They don't care about the internals, about the development community, about forums, about reporting issues. They don't want to learn, they don't want to read, they don't want to google, they just want to do one goddamn thing: *use* the software. It might have been different in the beginning of computer era, but nowadays it's expected from every software to make it as easy for the user as possible and not put obstacles in the way. Using the term "Meta" is such an unnecessary obstacle in usability.

Funny to hear that you believe I represent the minority, while I'm speaking for making it okay for 99%+ of the users, and you argue for technical correctness for the sake of the remaining less than 1%. Also, commenters in this ticket are 2:1 on my side so far.

Why did you ignored my proposal of changing this to Esc-<key>? I've seen many times people (not necessarily newbies), trying to get Alt-<key> on keyboards without it.

I didn't ignore it, in fact it was *my* proposal in comment 3. I'd be absolutely fine with Esc-<key>.

Learning that "The Meta key is labeled <ALT> on many keyboards" is "highly technical stuff"? Don't be ridiculous.

This is a piece of knowledge to practically zero usefulness, and an extra layer between the physical keyboard and the application which users shouldn't have to care about. We already skip this layer when we display "F1" as the shortcut key rather than "Esc O P", right? Why do we do it, then?

Oh, so if your keyboard distinguishes both Alts, you represent most of the users again?

Not what I said. My keyboard is physically labeled exactly as the default install of the operating system (after choosing my mother tounge) behaved. This is what the vast majority of users get. I'm sorry to hear if the Polish computer market doesn't offer this absolutely basic feature to the users (if I understand you correctly), but it must be an unfortunate exception. Most people either have a right "Alt" key which behaves just like the left one, or have a right "Alt Gr" key which behaves differently. MC shouldn't care which of the two is the case, since displaying "Alt" as the shortcut will be fine.

there is no '!' key - would you like to change 'C-x !' to 'C-x S-1' as well?

Please don't be ridiculous.

I'm not - most newbies can locate digits on any keyboard, while all that marks above them are much harder to find. Especially when shift-2 produces @ or " depending on keyboard layout, that might be set wrong in operating system (and often is). Similar problem to F13+.

Knowing how to type an "!" or "@" is basic knowledge required to use any computer, any software. MC can safely expect the user already knows this. You don't seem to acknowledge that Meta is miles away from this, interesting only to a very few power users, even within mc users it's only a small subset.

By the way, with keyboard layouts you just presented the perfect reason why "C-x S-1" would not just be ridiculous but also incorrect.

If we'd want to be technically correct, my Firefox shouldn't say the shortcut for new tab is Ctrl+T, it should say "whichever key is configured in your X Window to generate Control_L or Control_R, along with a key that generates "t" [perhaps abbvreviated to something like "(Control_L or Control_R) + t"]. I'm sure we agree that this shouldn't be implemented. What's behind the story? Omitting the technical details and abstraction layers in order to make it user friendly. Exactly what I'd like to see MC doing too. "Meta" in a terminal is pretty much the same concept as "Control_L" in X: a technical notion that 99%+ of the users don't give a damn about. Shortcut keys should be keys on the keyboard, not abstract concepts.

comment:20 Changed 8 years ago by egmont

See also #1507.

Note: See TracTickets for help on using tickets.