Skip to content

Commit

Permalink
Add global-map to transparent keypad leader
Browse files Browse the repository at this point in the history
  • Loading branch information
DogLooksGood committed Jan 11, 2025
1 parent 398b161 commit 3a5c11a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions meow-keypad.el
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,15 @@ x f' to execute `C-x C-f' or `C-x f' when `C-x C-f' is not bound."
(meow--keypad-quit)
(if (or (eq t meow-keypad-leader-transparent)
(eq meow--keypad-previous-state meow-keypad-leader-transparent))
(let* ((local (lookup-key (current-local-map) (meow--parse-input-event last-input-event)))
(cmd (command-remapping local)))
(call-interactively (or cmd local 'undefined)))
(let* ((key (meow--parse-input-event last-input-event))
(local (lookup-key (current-local-map) key))
(global (lookup-key (current-global-map) key))
(origin-cmd (or local global))
(remapped-cmd (command-remapping origin-cmd))
(cmd-to-call (if (member remapped-cmd '(undefined nil))
(or origin-cmd 'undefined)
remapped-cmd)))
(call-interactively cmd-to-call))
(message "%s is undefined" key-str))
t)))))

Expand Down

0 comments on commit 3a5c11a

Please sign in to comment.