[clug] MC command line -> mc.keymap

Scott Ferguson scott.ferguson.clug at gmail.com
Sun Apr 26 00:26:49 MDT 2015


On 26/04/15 02:22, Bryan Kilgallin wrote:
> Thanks, Scott:
> 
<snipped>
> 
>> That blank line 'should' be a CLI - you simply type command in it.
> 
> I haven't got much sense from it!
> 
> {Warning
> 
> The Commander can't change to the directory that
> the subshell claims you are in. Perhaps you have
> deleted your working directory, or given yourself
> extra access permissions with the "su" command?}

"That" (output) makes sense to me.

> 
>> If you need to see the output of a command press Ctrl+O to "switch
>> out" of mc.
> 
> OK, yes, I saw the list that I had requested, in a fish shell window.


It's possible mc won't work fully with fish - it's designed to work with
bash, tcsh, and zsh (that is 'if' you mean the shell fish, rather than
the "file sh"/fish network protocol)

> 
>> Mc will still be running and can be returned to by repeating the command.
> 
> Yes, I found that. But what is the use of entering a command on one line
> of Midnight Commander--when the latter has to be switched out in order
> to see the results?

Because you don't always 'need' to see the output of a command - unless
it was unsuccessful. e.g.:-
rm test*
cd
touch test
mount /dev/sdg2 /mnt

<snipped>

> 
> The Windows key becomes "Super".
> 
> { The Super key serves a special function inUnity. If you press the
> Super key, the Dash is displayed. If you pressand holdthe Super key, an
> overlay showing many of Unity's keyboard shortcuts appears until you
> release the Super key.}

As previously suggested - you have some keys pre-assigned.
http://i.stack.imgur.com/krD8y.jpg

NOTE: there are two "super keys" SUPER_L (left, keysym 0xffeb, keycode
133) and SUPER_R (right, keysym 0xffec, keycode 134).

Before you try assigning mc hotkeys to use other meta keys see my
comments further down about mc and Esc as a meta-key. Note that any key
can be set as a meta (*modifier*) key - but assigning them for terminal
use is a little tricky as you'd probably have to modify the terminal
handling of the keys as well as the app (e.g. mc).

You'd be best getting help with Unity/Ubuntu/GNOME from someone who
actually use it (not me).

I'd suggest you stick to default settings until your experience is
complete enough to safely start tweaking/hacking your setup *especially*
if you don't keep detailed notes of changes.

The reason I suggested mc in the first place was that it's useful for
newbies when working in a *non-gui* (text mode) environment. i.e. a
terminal session on your phone, using it on your Ubuntu whatever desktop
is kind of redundant as your file manager has the same capabilities.

> 
>> You may also have dedicated email, browser, and search buttons.
> 
> My keyboard has a "FN" key between Alt and Ctl on the right hand side.
> 
> /etc/mc/mc.keymap
> 
> I had experimented with "sup-" before the key numbers. Running into the
> hassle that Unity had pre-set meaning to the Super key. But I have since
> forgotten in which configuration file that Midnight Commander key
> designation was! 

mc hot key designations are in /etc/mc/mc.keymap and ~/.mc/mc.keymap
man mc
/Redefine hotkey bindings

You 'can' change the mc hotkeys to ones that are *not* used by Unity -
but if you do I'd suggest you cp /etc/mc/mc.keymap ~/.mc/mc.keymap and
then customise the local config file. But first ensure you have a
*compelling* reason to change things in the first place as it could
result in you becoming more confused(?)

http://linuxcommand.org/lc3_adv_mc.php:-
"Midnight Commander allows the Esc key to function as a Meta-key. In
cases where a function key or Alt-key combination is not available due
to interference from outside programs, use the Esc key instead. For
example, to input the F1 key, press and release the Esc key followed by
the "1" key (use "0" for F10). The same method works with troublesome
Alt-key combinations. For example, to enter Alt-t, press and release the
Esc key followed by the "t" key. To close dialog boxes in Midnight
Commander, press the Esc key twice."

Also see:-
mc -> Options... -> Learn keys...

and read the fine mc man file just in case you are asking questions you
could answer yourself e.g. don't skip the section on Miscellaneous Keys
man mc
/Miscellaneous Keys

NOTE: most of the info from the man file can be found in mc's internal
help (press F1). Pressing F1 is also good place to start looking for
help in most gui programs.


> And I was not able to guess the abbreviation for that
> "FN" key, to use in that file.
> 

It's possible mc doesn't have an abbreviation for keys that are specific
to Microsoft keyboards.


Kind regards


More information about the linux mailing list