Skip to content

Ignoring certain keys #367

Answered by agzam
agzam asked this question in Q&A
Discussion options

You must be logged in to vote

Oh, turns out, that is fairly simple with :setup-children, e.g.:

   :setup-children
   (lambda (_)
     (transient-parse-suffixes
      'expreg-transient
      (mapcar
       (lambda (key-map)
         (let* ((s? (stringp key-map))
                (key (if s? key-map (car key-map)))
                (cmd (if s? 
                         (lambda ()
                           (interactive)
                           (setq unread-command-events (listify-key-sequence (kbd key))))
                         (cadr key-map)))
                (transient? (and (not s?) (caddr key-map) t)))
           (list key
                 (format "%s" key)
                 cmd
                 :transient transient

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by agzam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant