For some reason when I press Up, Down, Left or Right keys on keyboard in dired+ mode, emacs reads them all as M-O key, which I found out by describe-key command in dired+ buffer. I have no config regarding diredp in my config, just that:

(use-package dired+
  :ensure t)

Also, when pressing arrow keys in diredp in minibuffer appears change owner of auto-save-list, and depending on Up, Down, Left, Right, character appear in input field are A, B, D, C, which is even more confusing.

In ordinary dired buffer arrow keys appears normally. Also I'm working in emacs-nox session.

  • Can you reproduce this starting with emacs -Q? If so, please post a step-by-step recipe to repro the problem, starting with emacs -Q and loading dired+.el with just M-x load-file. If you don't see the problem with emacs -Q, even after loading dired+.el, then recursively bisect your init file to find the culprit.
    – Drew
    Commented Nov 11, 2017 at 16:59
  • Also, please mention your Emacs version: M-x emacs-version. (I don't know what emacs-nox means.)
    – Drew
    Commented Nov 11, 2017 at 17:01
  • Neither vanilla Dired nor Dired+ binds M-O (by which I guess you mean M-S-o) or M-o to dired-do-chown, which is sems to be the command that is getting invoked when you use an arrow key. They also do not bind arrow keys to that command. A guess is that something else in your init file is causing this.
    – Drew
    Commented Nov 11, 2017 at 17:06
  • 2
    I was bitten by this issue 3 years ago and wrote briefly about it on reddit/r/emacs.
    – Omar
    Commented Dec 16, 2017 at 2:42
  • 4
    Possible duplicate of Dired+ key binding issues in terminal emacs
    – Stefan
    Commented Dec 16, 2017 at 3:14

2 Answers 2


I was able to solve this by configuring dired+ followingly:

(use-package dired+
  ;; This binding messes with the arrow keys, for some reason.
  (unbind-key "M-O" dired-mode-map))
  • That removes the Dired+ binding of M-S-o (aka M-O). It does not answer the question of why the arrow keys are getting redirected to M-O.
    – Drew
    Commented Dec 16, 2017 at 0:45

There is a user option, diredp-bind-problematic-terminal-keys, that has this effect:

diredp-bind-problematic-terminal-keys is a variable defined in dired+.el.

Its value is t


Non-nil means bind some keys that might not work in a text-only terminal.

This applies to keys that use modifiers Meta and Shift together. If you use Emacs in text-only terminal and your terminal does not support the use of such keys then customize this option to nil.

You can customize this variable.

You might try customizing that option to nil.

The Dired+ doc has this prominent section (in the Commentary of dired+.el):

If You Use Dired+ in Terminal Mode

By default, Dired+ binds some keys that can be problematic in some terminals when you use Emacs in terminal mode (i.e., emacs -nw). This is controlled by option diredp-bind-problematic-terminal-keys.

In particular, keys that use modifiers Meta and Shift together can be problematic. If you use Dired+ in a text-only terminal, and you find that your terminal does not support such keys, then you might want to customize the option to set the value to nil, and then bind the commands to some other keys, which your terminal supports.

The problematic keys used by Dired+ include these:

 `M-M`   (aka `M-S-m`)   - `diredp-chmod-this-file`
 `M-O`   (aka `M-S-o`)   - `diredp-chown-this-file`
 `M-T`   (aka `M-S-t`)   - `diredp-touch-this-file`
 `C-M-B` (aka `C-M-S-b`) - `diredp-do-bookmark-in-bookmark-file`
 `C-M-G` (aka `C-M-S-g`) - `diredp-chgrp-this-file`
 `C-M-R` (aka `C-M-S-r`) - `diredp-toggle-find-file-reuse-dir`
 `C-M-T` (aka `C-M-S-t`) - `dired-do-touch`
 `M-+ M-B`   (aka `M-+ M-S-b`) -  `diredp-do-bookmark-dirs-recursive`
 `M-+ C-M-B` (aka `M-+ C-M-S-b`) - `diredp-do-bookmark-in-bookmark-file-recursive`
 `M-+ C-M-T` (aka `M-+ C-M-S-t`) - `diredp-do-touch-recursive`

(See also (info "(org) TTY keys") for more information about keys that can be problematic in a text-only terminal.)

HTH. Sorry for any trouble.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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