Re: Ctrl-A, Ctrl-E have no effect

Actually, I do seem to have the problem solved, and also to have achieved something I did not think possible, completely consistent keystroke behavior across the three apps I use most, vim lynx and mc, within both screen and fluxbox.

The problem with mc seemed to derive from that it has multiple configuration files, in /etc, /root, /usr/share, and ~/.config, and I believe these are hierarchical, that is you cannot change behavior lower down that hierarchy if it was defined differently at a higher level.

So I destroyed every mc directory except that in /etc, and worked with that to get the results I wanted.  Another complication was that, in xterm, Alt+ key combos produce accented (8 bit ascii characters) instead of whatever control function one expected.  Although that behavior can be prevented in xterm, I found it more expedient to keep it, and not use Alt+ combinations at all.

Back in mc.keymap, apparently you can specify any key combo you want, and mc will respond to it, so long as there are no other complicating factors such as I have described.  So now I have Ctrl+A for Home, Ctrl+E for End, Ctrl+F for PageDown and Ctrl+B for PageUp, identically in vim, lynx and mc, and Ctrl+z <window Number> to switch between apps in both screen and fluxbox.

Once the appropriate behavior was obtained in mc, I simply copied the mc directories in /etc and /root (this one does not contain mc.keymap, but an ini file and a filepath hotkey list and a couple of others whose purpose I did not determine) into /usr and ~/.config respectively, and I now have completely identical behavior from mc both as user and as root.

On Sat, Dec 13, 2014 at 4:45 AM, Paul Sokolovsky <pmiscml gmail com> wrote:

On Sun, 7 Dec 2014 09:51:06 -0800
Graham Lawrence <gl00637 gmail com> wrote:

> > > My laptop lacks certain keys, notably Home, End, PgUp and
> > > PgDown.  Alt-V and Ctrl-V provide the function of PgUp and
> > > PgDown.  Supposedly Ctrl-A and Ctrl-E should supply those of
> > > Home and End, but in fact do nothing.
> >
> > Hmm, and prooflinks for "should" part?
> Not sure what you mean by this, but I'm referring to
> both /etc/mc/mc.keymap and /etc/mc/mc.default.keymap as the source of
> "should ...", which on my system lists these two entries
>     Home = ctrl-a; alt-lt; home; a1
>     End = ctrl-e; alt-gt; end; c1
> None of these options  work for me.

Yes, that's what I meant, thanks. I just find it surprising in
non-exciting sense that there're too many key combos in mc, not known
to many people (for example, I find it quite confusing that Ctrl+V is
bound to "page down").

> > > I've tried putting
> > > other key combos in mc.keymap instead, but they also had no
> > > effect.
> > >
> > > Do I need to make a special compile of MC to get their
> > > particular functionality, or is there some other means to
> > > that end?
> >
> > You can try "Learn keys" functionality to redefine mc keys to some
> > extent.
> >
> That I did, with no success.  I duly pressed <Space> with Home and
> End the current selection, pressed Ctrl-A/E respectively and then
> repeated that key-combo when the Help message cleared, but in neither
> case did it then show OK for the choice.

I can confirm that it doesn't work for me either (with git master).

Out of curiosity, do you have your keys broken, or you one of these
laptop novelties which don't have important keys? In the latter case, I
gather there should be hardware/firmware key combos to emulate Home,
End, PgUp, PgDn, etc. At least, that's what I have on Samsung ARM

Otherwise, yes, I guess the only option currently is to patch source

Best regards,
 Paul                          mailto:pmiscml gmail com

Graham Lawrence

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]