diff options
-rw-r--r-- | input-conf.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/input-conf.el b/input-conf.el index 986286a..a735741 100644 --- a/input-conf.el +++ b/input-conf.el @@ -37,5 +37,30 @@ (setq-default default-input-method "devanagari-kyoto-harvard") +(defvar durand-input-method-list nil + "The list of input methods that I oft use.") + +(setq durand-input-method-list + (list "devanagari-kyoto-harvard" + "tamil99" + "chinese-zozy")) + +(defun durand-toggle-input () + "Toggle input method with my customizations." + (interactive) + (cond + ((null current-input-method) + (let ((input-method + (minibuffer-with-setup-hook + #'durand-headlong-minibuffer-setup-hook + (completing-read + "Input method: " durand-input-method-list + nil t nil nil "devanagari-kyoto-harvard")))) + (activate-input-method input-method))) + ((deactivate-input-method)))) + +(define-key global-map (vector ?\C-\\) #'durand-toggle-input) +(define-key global-map (vector 3 ?i) #'durand-toggle-input) + (provide 'input-conf) ;;; input-conf.el ends here |