summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/init.el b/init.el
index 62d9d28..d0c205a 100644
--- a/init.el
+++ b/init.el
@@ -225,6 +225,22 @@ no effect."
(define-key global-map (vector 3 101) #'elfeed)
+;;; rime configuration to input Chinese.
+
+(load-after-function prepare-rime "rime-conf.el" "Load rime and launch it." nil
+ (durand-set-input-method))
+
+;; The effect of super is to apply bitwise or to the key with
+;; (ash 1 23). The codes are as follows.
+;;
+;; Alt Super Hyper Shift Control Meta
+;; 22 23 24 25 26 27
+
+;; However, for letters a-z, A-Z, [, ], \, ^, _, the effect of control
+;; is to subtract the upcased character by 64; for letters a-z, A-Z,
+;; the effect of shift is to apply `upcase' to it.
+(define-key global-map (vector (logior (ash 1 23) ?i)) #'prepare-rime)
+
;;; magit
(load-after-function magit "magit-conf.el" "Load magit and launch it." nil