help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to genererate 'C-x @ c' from within a custom keymap


From: andrés ramírez
Subject: Re: how to genererate 'C-x @ c' from within a custom keymap
Date: Tue, 26 Jul 2022 15:47:53 +0000

Hi. Stefan.
My comments below.

>>>>> "Stefan" == Stefan Monnier via Users list for the GNU Emacs text editor 
>>>>> <help-gnu-emacs@gnu.org> writes:

    Stefan> `event-apply-control-modifier` has to be used within a *remapping* 
keymap, i.e. one of
    Stefan> `input-decode-map`, `(local-)function-key-map`, or 
`key-translation-map`.

That comment lead me to the documentation of 
--8<---------------cut here---------------start------------->8---
(info "(elisp) Translation Keymaps")
--8<---------------cut here---------------end--------------->8---

There. hyperify was found.

After reading it I ended with this:

--8<---------------cut here---------------start------------->8---
(define-key ik-launch-keymap "c" 'launch-keymap/controlrify)
(defun launch-keymap/metarify () (interactive) (execute-kbd-macro 
(event-apply-control-modifier nil)))
--8<---------------cut here---------------end--------------->8---

It works (half way). C-a C-e are posible. But not C-x.

Perhaps execute-kbd-macro is not the right function.

Best Regards




reply via email to

[Prev in Thread] Current Thread [Next in Thread]