-
-
Save jbking/126282 to your computer and use it in GitHub Desktop.
the function how to get a keyboard layout
This file contains 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 using-azerty? () | |
(condition-case nil | |
(let ((buffer (get-buffer-create "*using-azerty?*")) | |
return) | |
(set-buffer buffer) | |
(erase-buffer) | |
(call-process-shell-command "setxkbmap" nil buffer nil "-print") | |
(goto-char (point-min)) | |
(setq return (search-forward "azerty" nil t)) | |
(kill-buffer buffer) | |
return) | |
(error (message "got a error in 'using-azerty?'") nil))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment