I want to change a couple of key bindings for @wasamasa's eyebrowse package, because I'm on a laptop and the keys < and > aren't easy to access.

The thing is, this package defines a custom prefix for all bindings (C-c C-w). This confuses me because I don't know if a normal

(define-key eyebrowse-mode-keymap (kbd "z") 'eyebrowse-prev-window-config)

will do the job.


If I understand the question correctly, you should be able to change bindings in the eyebrowse-mode-map (note, not ...-keymap) and access them with the default C-c C-w prefix:

(define-key eyebrowse-mode-map "z" 'eyebrowse-prev-window-config)

Now, C-c C-w z and C-c C-w < (the original default) should both call eyebrowse-prev-window-config.

EDIT: I'm a bit surprised that the above code didn't work (just tested it myself), but the following does. Note that you could also do (kbd "C-c C-w z"), but the advantage of the concat version is that it will reflect whatever you customized choice of prefix keys is:

(define-key eyebrowse-mode-map
  (kbd (concat eyebrowse-keymap-prefix "z")) 'eyebrowse-prev-window-config)
  • C-c C-w z is undefined – shackra Nov 3 '14 at 19:26
  • 1
    The working of the first version is dependent on how the keymap is defined. In general, it probably won't work. – Malabarba Nov 3 '14 at 20:08

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.