Ticket #3947 (closed defect: duplicate)

Opened 6 years ago

Last modified 6 years ago

Can't re-define keys for files selecting/unselecting

Reported by: evengerova Owned by:
Priority: major Milestone:
Component: mc-key-bindings Version: master
Keywords: keymap select unselect Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

When I use any "+" or any "-" mc shows select/unselect menu.
I want to re-define the keys since at the moment I can't specify options using "-" in the command I type in the bottom of the page (unselect menu appears).
I tried to re-define in $HOME/.config/mc/mc.keymap and in /etc/mc/mc.keymap (tried to specify ctrl-plus and ctrl-minus), but looks like the setting is ignored.

LC_MESSAGES=C mc -V
GNU Midnight Commander 4.8.19
Built with GLib 2.53.4
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
[helen@aule ~]$ LC_MESSAGES=C mc -F
Home directory: /home/helen
Profile root directory: /home/helen

[System data]

Config directory: /etc/mc/
Data directory: /usr/share/mc/
File extension handlers: /usr/libexec/mc/ext.d/
VFS plugins and scripts: /usr/libexec/mc/

extfs.d: /usr/libexec/mc/extfs.d/
fish: /usr/libexec/mc/fish/

[User data]

Config directory: /home/helen/.config/mc/
Data directory: /home/helen/.local/share/mc/

skins: /home/helen/.local/share/mc/skins/
extfs.d: /home/helen/.local/share/mc/extfs.d/
fish: /home/helen/.local/share/mc/fish/
mcedit macros: /home/helen/.local/share/mc/mc.macros
mcedit external macros: /home/helen/.local/share/mc/mcedit/macros.d/macro.*

Cache directory: /home/helen/.cache/mc/

[helen@aule ~]$ mc --configure-options

'--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wno-strict-aliasing' '--disable-rpath' '--enable-aspell' '--enable-charset' '--enable-largefile' '--enable-vfs-cpio' '--enable-vfs-extfs' '--enable-vfs-fish' '--enable-vfs-ftp' '--enable-vfs-sfs' '--enable-vfs-sftp' '--enable-vfs-smb' '--enable-vfs-tar' '--with-x' '--with-gpm-mouse' '--with-screen=slang' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'LDFLAGS=-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Change History

comment:1 Changed 6 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone Future Releases deleted

Closed as duplicate of #3664.

comment:2 Changed 6 years ago by evengerova

I've read #3664, but have not understood: should '-' result in unselect menu if command line is not empty or not? 7.X allowed to enter '-' in the command line. Is the new approach bug or feature?

comment:3 Changed 6 years ago by andrew_b

There are two options in the ini file:

alternate_plus_minus (not documented in the man page): if true, use '+', '-', '\' and '*' keys normally. For select/unselect, use 'M-+', 'M--' and 'M-*'.

only_leading_plus_minus: allow special treatment for '+', '-', '*' in the command line (select, unselect, reverse selection) only if the command line is empty. You don't need to quote those characters in the middle of the command line. On the other hand, you cannot use them to change selection when the command line is not empty.

Perhaps the behavior is not quite correct.

Note: See TracTickets for help on using tickets.