In emacs-26.1, I am enabling the Japanese input method as follows ...
(toggle-enable-multibyte-characters 1)
(set-language-environment "Japanese")
(set-input-method "japanese")
(setq coding-system-for-read 'utf-8-unix)
(setq coding-system-for-write 'utf-8-unix)
This works fine and gives me hiragana characters when I enter their romaji equivalents, but SPC
is mapped to a selection dialog for kanji characters. I want SPC
to be mapped simply as self-insert-command
, and I'd like to remap the kanji selection dialog to a different key sequence.
I tried the following, but it had no effect ...
(define-key kkc-keymap " " 'self-insert-command)
(define-key kkc-keymap "\C-^" 'kkc-next)
SPC
still got me into the kanji selection dialog, and C-^
did nothing.
I'm not sure, but it seems like there is code somewhere in kkc.el
which forces kkc-next
to be mapped to SPC
, no matter what.
Short of completely rewriting some of the code in emacs-26.1/lisp/international/kkc.el
, is there any way to remap the kanji selection dialog to something other than SPC
?
(kbd "SPC")
instead of" "
?(kbd "SPC")
does not change the behavior. Concerning the question of the correct keymap: in looking at the code inkkc.el
, it seems thatkkc-keymap
is the one to use, but I am not sure. I'm hoping someone who is more familiar with the Japanese input method can help.fundamental-mode
. Also, inkkc.el
, it seems like there is special logic to explicitly traverse thekkc-keymap
in a non-standard manner when characters are being typed, even though the mode is stillfundamental-mode
. Anyway, I'm still digging into this and will report whatever I ultimately come up with.