Skip to content

:bind ("<menu>" . ryo-modal-mode) does not work #66

@ghost

Description

I want to use the <menu> key to toggle ryo mode but it does not work. It gets bound, but pressing it does the default action for <mode>.

my config:

(use-package ryo-modal
  :ensure t
  :commands ryo-modal-mode
  :bind ("<menu>" . ryo-modal-mode)
  :hook
	(prog-mode . ryo-modal-mode)
	(text-mode . ryo-modal-mode)
  :config
  (ryo-modal-keys
   ("<menu>"  ryo-modal-mode)
  
   ;; Movement
   ("i" previous-line)
   ("j" backward-char)
   ("k" next-line)
   ("l" forward-char)
   ("u" backward-word)
   ("o" forward-word)

   ;; Editing
   ("y" undo)
   ("x" kill-region)
   ("c" kill-ring-save)
   ("v" yank)
   ("z" comment-dwim)

   ;; Window
   ("-" split-window-below)
   ("=" split-window-right)
   ("[" switch-to-prev-buffer)
   ("]" switch-to-next-buffer)
   ("a" execute-extended-command)

   ("," ryo-modal-repeat)
   ("f" ryo-modal-mode)
   ("n" isearch-forward)
   ("t" set-mark-command)
   ("h" beginning-of-line-text)
   (";" end-of-line)
   ("'" delete-other-windows)
   ("#" expand-abbrev)

   ;; Misc
   ("C-=" text-scale-increase)
   ("C--" text-scale-decrease)
   ;; Space map
   ("SPC"
    (("SPC" shia/disable-ryo-modal)
     ("f" switch-to-buffer :name "Switch to buffer")
     ("h" beginning-of-buffer :name "Go to buffer beginning")
     ("n" end-of-buffer :name "Go to buffer end")
     ("r" query-replace :name "Find")
     ("i e" find-file :name "Open file")
     ("i d" ibuffer :name "List buffers")
     (", x" save-buffers-kill-terminal :name "Save and exit")
     ("s" exchange-point-and-mark)
     ("a" mark-whole-buffer :name "Select All")
     ("k r" query-replace-regexp :name "Find regex")
     ("u" kill-current-buffer :name "Close File")
     (";" save-buffer :name "Save file")
     ("i ;" write-file :name "Save File As")
     ("m" dired-jump)
     ("i p" bookmark-set)
     ("i i" bookmark-bmenu-list)
     ("i o" bookmark-jump)
     ("p" recenter-top-bottom :name "Center the current line")
     ("/ m" magit-status)
     (", m" eval-last-sexp)
     ("j c" man)
     ("d c" insert-char)
     ("i f" find-file-at-point)))

   )

  (ryo-modal-keys
   ;; First argument to ryo-modal-keys may be a list of keywords.
   ;; These keywords will be applied to all keybindings.
   (:norepeat t)
   ("0" "M-0")
   ("1" "M-1")
   ("2" "M-2")
   ("3" "M-3")
   ("4" "M-4")
   ("5" "M-5")
   ("6" "M-6")
   ("7" "M-7")
   ("8" "M-8")

   ("9" "M-9")))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions