I have key bindings created with zsh such as:

bindkey -s "^[l" 'ls -lrt --color=always\n'

that I want to execute in ConEmu by holding "Alt" and pressling "l". It just prints a rectangle character at my prompt. If I instead press "esc" followed by "l" it behaves as expected, listing the directory contents.

How do I configure ConEmu to pass the meta modifier to the shell so that I can execute key bindings using the "Alt" key?

(I'm not looking for alternate solutions - I want to source my .zshrc which I use on my Mac and Linux hosts, and the file contains many key bindings I rely on to do my work)

  • Update: It looks like my Winzsh install is old and buggy, and my Cygwin versions of ZSH are inconsistent. Getting rid of all my old Cygwin installations (by removing PATH references to their bin folders) and putting "xterm*eightBit: False" in my .Xdefaults file all collectively solved the problem. Though even Conemu works which doesn't rely on .Xdefaults. – Sridhar Sarnobat Jan 26 '14 at 20:24

ConEmu acts as real console window. That means, that your shell just failed to process correct keypresses. You may check that running it from standard Windows console (run your shell from Win+R). I believe, there is a way to configure your shell, to force it process Windows keypresses.

But, if you want ConEmu to send other sequences to console window when you press Alt+l you can create GuiMacro

  1. Goto settings page "Keys & Macro"
  2. Choose entry macro in the list (Macro 01)
  3. Type following macro print("\el")
  4. Choose your hotkey - Alt+L
  5. Save settings
| improve this answer | |
  • Both very helpful tips. Thank you very much for the quick reply Maximus. – Sridhar Sarnobat Jan 19 '14 at 20:47
  • Just a followup - winzsh is quite old. A newer version is available in Cygwin. When I installed this, everything was fine. I'm almost disappointed how simple the solution is because I still don't really get what's happening under the covers. – Sridhar Sarnobat Feb 3 '14 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.