Created
August 11, 2023 07:44
-
-
Save jeeger/5d78788bf8629e6ec1610c460e2e4a0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun emacs-ime (&optional close-frame) | |
(interactive) | |
(let ((char (with-temp-buffer | |
(call-interactively 'insert-char) | |
(buffer-string)))) | |
(when close-frame | |
(delete-frame)) | |
(gui-set-selection 'CLIPBOARD char) | |
(start-process "xdotool" | |
"*emacs-ime*" | |
"xdotool" "sleep" "0.5" "type" char))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment