2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

keyhac を使って英数入力モード時のみ Ctrl-J で日本語入力モードにする

Posted at

SKKFEP を使っていて、Ctrl-J で日本語入力モードに変更したかった。
常に [全/半] キーにしてしまうと、日本語入力モード時の Ctrl-J が効かないので、以下を試す。


def zenhan_unless_zen():
  if ( keymap.wnd.getImeStatus() ):
    # pass-through
    keymap.InputKeyCommand( "C-J" )()
  else:
    # zen-han
    keymap.InputKeyCommand( "(243)" )()
keymap_global = keymap.defineWindowKeymap()
keymap_global[ "C-J" ] = zenhan_unless_zen

"(243)" は [全/半] キーのキーコード。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?