When I type in a CJK language, I would still like to be able to use emacs key bindings such as M-x, as well as vi keys in evil-mode normal-state. Is there a way to make emacs register the keyboard input as a US keyboard only when a modifier is pressed? Also, maybe more difficult, is there a way to make evil normal state register keypresses in the US keyboard (without manually mapping every single command to its CJK equivalent)?
You need to select an input method. It will allow you to use, say, a QWERTY keyboard layout for commands, but switch between QWERTY and CJK for inserting text.
The keybinding for toggle-input-method
is set to C-\
by default. You can also customize the default-input-method
variable.
C-u C-\ chinese-py
etc). It would be nice to have Emacs handle this automatically when a non-Latin keyboard layout is selected in the OS, though. – legoscia Jun 11 '15 at 14:59