# Elisp: Added one key-binding to dired-mode and lost basic dired functionality

I wanted an alternative to the awful C-^ shortcut for moving up one directory so I added the following to init file:

 (defun dc/dired-mode-keys ()
"User defined keys for dired mode."
(interactive)
(local-set-key (kbd "s-m" 'dired-up-directory)))


However, when I open Emacs with this code enabled (i.e., uncommented in the init file), I lose basic dired functionality. For example, when I press a to open a directory (in the same buffer), I get the following error in the mini-buffer.

Wrong number of arguments: (1 . 1), 2


I've confirmed that s-m is not a native key-binding in dired-mode (I believe very few if any super key combos are natively bound), and I'm pretty sure my code doesn't unbind any of the native key-bindings in dired-mode.

What am I doing wrong in the function above?

The "wrong number of arguments" error comes from the kbd inside dc/dired-mode-keys. Your parentheses are nested incorrectly, so you pass 2 arguments to kbd, but it expects only 1.
(local-set-key (kbd "s-m") 'dired-up-directory)