How do I *completely* disable the Ctrl-O shortcut in Midnight Commander?

Mihai

I like using both Midnight Commander and Vim. In Vim, Ctrl-O is the "go to previous position" command, and in MC, by default, it toggles between the shell and the panel. I would like to be able to call Vim from MC, and use the Ctrl-O from Vim without MC intercepting it and yanking me back to the panel view.

I created a ~/.config/mc/mc.keymap with the following contents:

[main]
Shell =
[viewer]
Shell =
[diffviewer]
Shell =
[editor]
Shell =

This gets me halfway, in that it disables the shortcut when I call Vim using the F4 key. However, if I run Vim as a shell program, from the input line, and then press Ctrl-O, MC still intercepts it.

Is there a configuration option that I'm missing here?

Note: I'm reluctant to do any of the following:

  • change my default Vim key mappings
  • change my preferred editor or file manager
  • dig through the MC source code, patch, and recompile
Thomas Dickey

No, you did not overlook a configuration setting. It is hardcoded in the source file src/subshell/common.c, as a variable that "could" be made configurable, but is not:

/* The key for switching back to MC from the subshell */
/* *INDENT-OFF* */
static const char subshell_switch_key = XCTRL ('o') & 255;

It is only referenced in one place in the file: the case which you noticed.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

mc - Midnight commander - How do I sort so that directories are on top?

From Dev

How do I make the F-keys work in byobu, for midnight commander (mc), htop, etc?

From Dev

How can I disable the default Konsole shortcut (CTRL + ALT + T)?

From Dev

How do I disable a keyboard shortcut?

From Dev

How can I stop seeing hidden files in the Midnight Commander?

From Dev

How can I install Midnight Commander on Ubuntu 18.04.1?

From Dev

How can I run Midnight Commander opening an ftp connection on launch?

From Dev

How to sudo edit in Midnight Commander?

From Dev

How to disable Ctrl + Shift + C shortcut in Firefox?

From Dev

How do I completely disable bell in screen (both visual and audio)

From Dev

How do I disable notification balloons completely in XP?

From Dev

How do I completely disable password ssh logins?

From Dev

How do I disable the keyboard shortcut for menu in Linux Mint 13?

From Dev

How do I disable the Unity keyboard shortcut overlay?

From Dev

How do I disable a keyboard shortcut in gnome-shell?

From Dev

How do I disable "Lock screen" keyboard shortcut under Unity?

From Dev

Shortcut to send telnet session to background conflicts with Cisco terminal shortcut: Ctrl+Z.How do I change that?

From Dev

How Can I Disable the Global Shortcut CTRL + SHIFT + U in Linux Mint?

From Dev

How do I disable Ctrl+Alt+s to minimize a window?

From Dev

How do I disable Ctrl+Alt+s to minimize a window?

From Dev

How do I disable the ctrl + space hotkey for switching keyboard layout?

From Dev

How to change file permissions recursively on Midnight Commander?

From Dev

How to use command line completion in Midnight Commander?

From Dev

How to set Midnight Commander as the default File Manager?

From Dev

How to change UI language for midnight commander Mac

From Dev

How to change scroll speed in Midnight Commander?

From Dev

How to specify arguments for editor in Midnight Commander

From Dev

How to enable gedit editor in midnight commander?

From Dev

How to start Midnight Commander in one panel mode?

Related Related

  1. 1

    mc - Midnight commander - How do I sort so that directories are on top?

  2. 2

    How do I make the F-keys work in byobu, for midnight commander (mc), htop, etc?

  3. 3

    How can I disable the default Konsole shortcut (CTRL + ALT + T)?

  4. 4

    How do I disable a keyboard shortcut?

  5. 5

    How can I stop seeing hidden files in the Midnight Commander?

  6. 6

    How can I install Midnight Commander on Ubuntu 18.04.1?

  7. 7

    How can I run Midnight Commander opening an ftp connection on launch?

  8. 8

    How to sudo edit in Midnight Commander?

  9. 9

    How to disable Ctrl + Shift + C shortcut in Firefox?

  10. 10

    How do I completely disable bell in screen (both visual and audio)

  11. 11

    How do I disable notification balloons completely in XP?

  12. 12

    How do I completely disable password ssh logins?

  13. 13

    How do I disable the keyboard shortcut for menu in Linux Mint 13?

  14. 14

    How do I disable the Unity keyboard shortcut overlay?

  15. 15

    How do I disable a keyboard shortcut in gnome-shell?

  16. 16

    How do I disable "Lock screen" keyboard shortcut under Unity?

  17. 17

    Shortcut to send telnet session to background conflicts with Cisco terminal shortcut: Ctrl+Z.How do I change that?

  18. 18

    How Can I Disable the Global Shortcut CTRL + SHIFT + U in Linux Mint?

  19. 19

    How do I disable Ctrl+Alt+s to minimize a window?

  20. 20

    How do I disable Ctrl+Alt+s to minimize a window?

  21. 21

    How do I disable the ctrl + space hotkey for switching keyboard layout?

  22. 22

    How to change file permissions recursively on Midnight Commander?

  23. 23

    How to use command line completion in Midnight Commander?

  24. 24

    How to set Midnight Commander as the default File Manager?

  25. 25

    How to change UI language for midnight commander Mac

  26. 26

    How to change scroll speed in Midnight Commander?

  27. 27

    How to specify arguments for editor in Midnight Commander

  28. 28

    How to enable gedit editor in midnight commander?

  29. 29

    How to start Midnight Commander in one panel mode?

HotTag

Archive