7 авг. 2017 г.

Mouse and keyboard support in Midnight Commander for Mac OS X

Somehow I broke mouse support in Midnight Commander while setting up a fresh Mac OS X. It took me the whole week to find the root cause and enable mouse in MC again. Here is the checklist:

  • Check that Mouse Reporting is enabled
    Terminal - Menu - View or Cmd+R hotkey
  • Find the value of TERM env variable
    echo $TERM in terminal or open Terminal Settings (Cmd+,), go to Profiles - look for Terminfo; it was set to xterm-256color in my case
  • Quit all Midnight Commander instances, if any
  • Edit ~/.config/mc/ini file, find corresponding terminal section, e.g. [xterm-256color] for my terminal, and remove all its entries
  • Start Midnight Commander
Keyboard support: to make Shift+Up and Shift+Down keys work in Midnight Commander, do the following:
  • Open Terminal Settings - Keyboard tab
  • Add Shift+Up - send text "\033[1;2A" (copy from Shift+Left and edit text)
  • Add Shift+Down - send text "\033[1;2B"

Комментариев нет:

Отправить комментарий