Ticket #1390 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

Key binding ctrl+t and marking files

Reported by: slackfan Owned by: iNode
Priority: minor Milestone: 4.7.0-pre3
Component: mc-core Version: master
Keywords: keybindings Cc: egmont@…, phil.krylov@…
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description (last modified by andrew_b) (diff)

Hello,
the new key binding of Ctrl+t to set_panel_encoding in the current git version leads to the problem, that there is whether now way to mark_file on mac os, because apple keyboards don't have an ins key like on pc keyboards, or the marking of files works different on these platforms which is pretty annoying.
Is there a solution?
screen.c (line 2300)

Change History

comment:1 Changed 10 years ago by slackfan

  • Version changed from 4.6.2 to master
  • Milestone changed from 4.7 to future releases

comment:2 Changed 10 years ago by slavazanko

  • Milestone changed from future releases to 4.7

hm... I think, we need to review this behaviuor. CTRL+T used in editor viewer, therefore ctrl+t it's a good solution for usage in panels too, IMHO.

And this ticket not for 'future releases'. Need to fix in near time. :)

comment:3 Changed 10 years ago by angel_il

  • Type changed from defect to task

In panel select menu (F4)
Options \ learn Keys...

select [Insert key ] and redefine this.

comment:4 Changed 10 years ago by angel_il

  • Type changed from task to enhancement
  • Milestone changed from 4.7 to 4.7.0-pre2

maybe change hotkey to: F18 (S-F8) ?

comment:5 Changed 10 years ago by andrew_b

I agree.

comment:6 Changed 10 years ago by iNode

  • Owner set to iNode
  • Status changed from new to accepted

Me too.

comment:7 Changed 10 years ago by iNode

But F18 used for delete_cmd_local

/* Invoked by F18. Remove selected file, regardless of marked files. */

Should we remap it too?

comment:8 follow-up: ↓ 9 Changed 10 years ago by ossi

no. i find it most ... unnatural to map something unrelated to deletion to something-f8. especially tagging, which is possibly the most harmless operation of all.

comment:9 in reply to: ↑ 8 Changed 10 years ago by angel_il

Replying to ossi:

no.

ok, just say your hotkey for this

comment:10 Changed 10 years ago by ossi

uh, why me? :D
hmm, a common shortcut to mark the current entry in file managers is ... space. too bad that we just used this for something else. :}
how about using shift-f3 for the directory size calculation? afair, it means "raw view" for files, which kinda makes no sense for directories, so the overload should be ok. that would free up space again.

comment:11 Changed 10 years ago by angel_il

we still talk about hotkey for select codesets?

comment:12 Changed 10 years ago by ossi

no, i ignored that. :D
but if tagging is moved to space, ctrl-t would be free for real. except that i don't get the part about "editor viewer".
anyway, one could also use some more bizarre hotkey like ctrl-# for charsets. dunno what the effect on non-latin keyboard layouts would be ...

comment:13 follow-up: ↓ 15 Changed 10 years ago by iNode

Still waiting for hotkey for select encoding. Please stop offtop.

comment:14 Changed 10 years ago by angel_il

  • Milestone changed from 4.7.0-pre2 to 4.7.0-pre3

comment:15 in reply to: ↑ 13 ; follow-up: ↓ 22 Changed 10 years ago by ligelowbee

  • Type changed from enhancement to defect

Replying to iNode:

Still waiting for hotkey for select encoding. Please stop offtop.

Why no revert to ctrl-t to tag files, and say ctrl-shift-t, or alt-shift-t for the encoding menu?

Just used mc on my friends mac, and low and behold, no insert key. This really needs a fix.

comment:16 follow-up: ↓ 17 Changed 10 years ago by iNode

C-S-t and M-S-t offten used by Xorg/DM for keyboard layout switching.

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

  • Description modified (diff)

Replying to iNode:

C-S-t and M-S-t offten used by Xorg/DM for keyboard layout switching.

C-t and C-S-t have identical esc sequencies. Thus, C-S-t cannot be used instead of C-t.
M-S-t can be used as Esc-S-t not A-S-t.

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

Replying to andrew_b:

Replying to iNode:

C-S-t and M-S-t offten used by Xorg/DM for keyboard layout switching.

C-t and C-S-t have identical esc sequencies. Thus, C-S-t cannot be used instead of C-t.
M-S-t can be used as Esc-S-t not A-S-t.

or what about alt-ctrl-t, or esc-ctrl-t, for set_panel_encoding?
personally I tag files way more often than I switch the panel encoding.

comment:19 in reply to: ↑ 18 Changed 10 years ago by andrew_b

Replying to ligelowbee:

C-t and C-S-t have identical esc sequencies. Thus, C-S-t cannot be used instead of C-t.
M-S-t can be used as Esc-S-t not A-S-t.

or what about alt-ctrl-t, or esc-ctrl-t, for set_panel_encoding?
personally I tag files way more often than I switch the panel encoding.

Please, try the following. Run 'cat' and press any keys and same keys with Ctrl, Alt, Shift modifiers. You'll see that Ctrl doesn't change esc sequencies: the esc seg of Ctrl-Alt-t is identical to the esc seq of Alt-t, for example. Thus, we cannot distinguish Alt-t and Ctrl-Alt-t shortcuts.

comment:20 Changed 10 years ago by slavazanko

may be, ALT+Shift+t ([T) better choice for charsets selection?

comment:21 Changed 10 years ago by iNode

Alt+Shift/Ctrl?-Shift and so on is change keyboard layout keys.

Please propose simple shortcuts or keyboard sequences, not Escape-Meta-Alt-Control-Shift...

comment:22 in reply to: ↑ 15 ; follow-up: ↓ 23 Changed 10 years ago by angel_il

Replying to ligelowbee:

Replying to iNode:

Still waiting for hotkey for select encoding. Please stop offtop.

Why no revert to ctrl-t to tag files, and say ctrl-shift-t, or alt-shift-t for the encoding menu?

just press F9 (menu) select "learn Keys...", select [Insert key ] and press the necessary keys

comment:23 in reply to: ↑ 22 Changed 10 years ago by ligelowbee

Replying to angel_il:

Replying to ligelowbee:

Replying to iNode:

Still waiting for hotkey for select encoding. Please stop offtop.

Why no revert to ctrl-t to tag files, and say ctrl-shift-t, or alt-shift-t for the encoding menu?

just press F9 (menu) select "learn Keys...", select [Insert key ] and press the necessary keys

I used the above mentioned f9->"learn keys" and set the [Insert key] to alt-space. Seems work well and I don't think it conflicts.

comment:24 Changed 10 years ago by egmont

  • Cc egmont@… added

I'm on mac too and was just about to report the same bug...

Why do we need a shortcut key at all for charset selection? It's already available in the Left and Right menus, and I don't think it's going to be an often used option. It's only useful if you have a broken/mixed system, in which case you should go ahead and fix that as soon as you can. I expect this option to be used more rarely than "Sort order" for example, which doesn't have a shortcut either.

There are workarounds for toggling files on Mac, such as mc's Learn keys, as well as the terminal's configuration, but obviously requiring any of these by a stable mc edition would be ridiculous. I expect to be able to toggle files out of the box.

Please revert the old behavior of Ctrl-T for the panels. Even if you don't find another shortcut for charset selection, that's okay, it's there in the menus and very quickly accessible by F9 L E or F9 R E (or whichever letter you choose for "E").

Ctrl-T for charset selection in Editor/Viewer? would be fine, as it doesn't do anything in 4.6 either.

comment:25 Changed 10 years ago by iNode

I don't think it's going to be an often used option.

It's really often used action, i.e. by exUSSR users.
I'm agree, C-t should be used to selection,
but Select charset also should have shortcut and
it should be consistent in editor/viewer/panel/whatever...

comment:26 Changed 10 years ago by arekm

I just wanted to report that ctrl+t no longer works as it was in 4.6 and found this ticket...

Please return to previous (4.6) ctrl+t behaviour.

comment:27 Changed 10 years ago by slavazanko

  • Blocked By 212 added

Just await for complete of #212

I hope, this help to you.

comment:28 Changed 9 years ago by angel_il

  • Status changed from accepted to testing
  • Resolution set to wontfix

change mc.keymap if you need

comment:29 Changed 9 years ago by angel_il

  • Status changed from testing to closed

comment:30 Changed 9 years ago by slavazanko

  • Blocked By 212 removed

angel_il: Need to give mire info :)

To ticketstarter: now feel to free change ${prefix}/etc/mc/mc.keymap file.
For example, like this:

[panel]
...
PanelSetPanelEncoding = ctrl-u

instread of

PanelSetPanelEncoding = ctrl-t

Enjoy. :)

comment:31 Changed 9 years ago by slavazanko

In additional:

[panel]
PanelMarkFile = ins, ctrl-t

comment:32 Changed 9 years ago by phil

  • Status changed from closed to reopened
  • Resolution wontfix deleted

ok but it would be much better if file tagging worked on macbooks right out of the box (like it did in 4.6 with ctrl-t) without a need to edit mc.keymap. Please restore ctrl-t for tagging and move charsets to some other key.

comment:33 Changed 9 years ago by angel_il

  • Status changed from reopened to closed
  • Resolution set to wontfix
[panel]
PanelMarkFile = ins; ctrl-t

comment:34 Changed 9 years ago by phil

Basically, C-e looks like best candidate for 'E'ncoding shortcut.

angel_il: I clearly understand that you tell me to modify mc.keymap. I want to say that such basic function as tagging a file should work out of the box on such popular machine as mac is, so mc.keymap should be modified not on my mac, but in mc git tree.

comment:35 Changed 9 years ago by slavazanko

phil, is MacOS have packages (like Fedora/redhat - rpm; or Debian/Ubuntu? - deb)?

If yes - is able to make mc binary package (as you like) for all mac-users?

comment:36 follow-up: ↓ 37 Changed 9 years ago by iNode

  • Keywords keybindings added
  • Status changed from closed to reopened
  • Resolution wontfix deleted

C-e is a standard end of line (shell/emacs/etc.)

should work out of the box on such popular machine as mac

Who lied to you? Popular OS is MS Windows (c)(tm). Mac is just one
of good unix-like systems (probably most user friendly but just one of all).

I propose remap C-t to select file, not cause of Mac, but cause it's old well known default.
For select encoding we can use S-F6 (F16) cause it's free for now, AFAIK.
If there is no other objections I'll do it.

(Please don't response like "Stop reopen ticket, bastard!" we are not in RedHat).

comment:37 in reply to: ↑ 36 Changed 9 years ago by phil

  • Cc phil.krylov@… added

Replying to iNode:

C-e is a standard end of line (shell/emacs/etc.)

Oh sorry, I forgot it.

I propose remap C-t to select file, not cause of Mac, but cause it's old well known default.

Me too, but Mac is another good argument.

For select encoding we can use S-F6 (F16) cause it's free for now, AFAIK.
If there is no other objections I'll do it.

I suggest M-e. S-F6 is traditionally (Far) used to Rename/Move? file under cursor (instead of selected files). Well, NC used it to Rename/Move? file specified by user in the dialog box, but it's less useful (and differs only in that Far automatically fills the filename field with file under cursor).

comment:38 Changed 9 years ago by angel_il

S-F8 good for me, but no good for all.

comment:39 Changed 9 years ago by iNode

  • Status changed from reopened to accepted
  • severity changed from no branch to on review

Yes, M-e looks good.

(just for note, why C-S-t does not work when C-S is layout switch keys - very old Xorg bug)

branch: 1390_fileselect_binding (parent:master)
changeset 1aed94842d89970cb2aae033cafa239afae50076

comment:40 Changed 9 years ago by egmont

(IIRC S-F8 deletes the file under the cursor, even if some others are highlighted. How about S-F7 or S-F9? I can't tell off the top of my head if they're used.)

There are two issues I cannot understand but would really like to.

1.

How come some people are perfectly satisfied with not being able to toggle files _by default_? Hey, wake up! It's no longer the early 90s when Unix was only used by geeks who loved reading manuals and hacking the system for the pure glory of hacking it. mc is a tool, users want to use it for achieving goals other than understanding how cool features mc itself has.

I'm pretty sure I'm not the only user who wants to first _install_, and then right in the very next moment _use_ mc. Without spending I don't know how much time figuring out why C-t doesn't toggle anymore, cursing, rtfming, googling, looking at or even patching the course, or finding the config file, understanding its syntax, editing it - or giving up and reverting to the previous version - before being able to use it.

Configurable hotkeys are really great, thanks for that - but it cannot be an excuse for shipping with unusable default.

2.

Why is this "choose encoding" support suddenly so freaking important?

Shamelessly, mc is one of the last applications catching up with proper Unicode support - many years behind most apps. Anyone who's annoyed by multiple charsets should have by now migrated to UTF-8, because clearly that's the long term way to go, and clearly causes way less problems than any other solution. Since this option is new in mc, I'm pretty sure those who need it already have their personal favorite workarounds.

This is one of the very few options in mc that I wouldn't call "feature" but would rather call "workaround". Reason being that in a well designed environment this option wouldn't be necessary - but the environment in which mc lives in is not well designed. In most cases it's controllable by the user - it's mostly up the user to fix his environment, that is, convert filenames to utf-8 once for all. Yep there are places where you can't do it, such as CDs, pendrives from the neighbor etc. Hence having such an option in mc is really great - but still, we're talking about a workaround for a broken system which these users already live in, not having this workaround in mc yet, so probably they've already come up with their approach of handling this.

For years many people have been begging for nothing more than proper UTF-8 support in mc - that is, for mc to work out of the box in a completely UTF-8 environment. Suddenly mc does not only want to address this (((still a few bugs remain, which I'd really like to see handled with extremely high priority))), but all the sudden wants to solve all the mixed-charset conversion issues as well. Something that's not a final goal, but some transient state towards UTF-8. I personally don't think these two (full UTF-8 vs. mixed charset) are equally important.

So... why is this "choose your own encoding" support suddenly out of the blue so extremely important that it needs a single-key shortcut _by default_? Really, why??? What's wrong with having no direct shortcut (that is only having a three-keypress shortcut, such as F9 L E) _by default_? Remember, we're not talking about a _feature_, we're talking about a _workaround_ needed only by those who have a broken system.

There have been some really great _features_ in mc for many years, such as Advanced chown or Sort order, they don't have a direct shortcut either. Why should charset selection be any more important than these?

Thanks to the great new feature of custom shortcut, anyone who really often needs this workaround can go ahead and define a short hotkey for himself if he wants to. Why waste a shortcut for something that's useless to anyone who have a properly set up system?

Thanks for reading this long comment, and thank in advance for any answers to my questions.

comment:41 Changed 9 years ago by iNode

First of all, thanks for your reports.

To your comment:

1) Fixed, please wait for approve of changeset.
2) So:

  • Cause of multiboot
  • Cause of FTP with no UTF-8 encoding
  • Cause of there is old archives/files with no UTF-8 content


and so on...

So, for now, please calm down and wait for approve of this changeset.

p.s. Sort (and, maybe, hotkey for it) should be added soon.

comment:42 Changed 9 years ago by slavazanko

  • Votes for changeset set to slavazanko

Okay, vote here.

comment:43 Changed 9 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il
  • severity changed from on review to approved

comment:44 Changed 9 years ago by andrew_b

  • Votes for changeset slavazanko angel_il deleted
  • severity changed from approved to on rework

Menu items also must be modified. So rework, please.

comment:45 Changed 9 years ago by iNode

  • severity changed from on rework to on review

andrew_b, thanks for remind.

menu update changeset: ab6c9ef6df882ff2ed2dc2e9cfafcdaf07ec7136

comment:46 Changed 9 years ago by ossi

i'd be cautious about assigning meta shortcuts too generously. in "proper" guis, they are traditionally reserved for activating menus. as it happens, mc's menu activation is broken, but once it it fixed, free shortcuts will be needed. and with the growing number of features, soon more top-level menus will be needed. and alt-e ist a rather common shortcut for menu activation ...

comment:47 Changed 9 years ago by iNode

We has much hotkeys with Meta: M-h, M->, M-<, M-c, M-? and so on, so GNOME terminal's problems (and such of other "proper" teminal emulators) is it's usability problems.

comment:48 Changed 9 years ago by zaytsev

Yes, Metas are tricky... I have for instance to patch X.Org every time so that I can use Left Alt + Left Shift for keyboard layout switching and free Right Alt + Right Shift + / for search :-)

But M+e sounds very good to me. THANKS!!!

comment:49 Changed 9 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:50 Changed 9 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il
  • severity changed from on review to approved

comment:51 Changed 9 years ago by iNode

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko angel_il to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:52 Changed 9 years ago by iNode

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.