Created
June 7, 2020 02:25
-
-
Save tatesuke/1238faea005b07e00c27f3e9417339d8 to your computer and use it in GitHub Desktop.
keyhacの設定ファイル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
import pyauto | |
from keyhac import * | |
def configure(keymap): | |
configure_blobal(keymap) | |
def configure_blobal(keymap): | |
keymap_global = keymap.defineWindowKeymap() | |
# 変換/無変換キーでIME ON/OFF | |
keymap_global["O-(29)"] = lambda: keymap.wnd.setImeStatus(False) | |
keymap_global["O-(28)"] = lambda: keymap.wnd.setImeStatus(True) | |
# 無変換キーをユーザーモディファイヤキーに割り当て。 | |
keymap.defineModifier( 29, "User0" ) | |
# 無変換キー + HJKL で 矢印キー | |
keymap_global["U0-H"] = "Left" | |
keymap_global["U0-J"] = "Down" | |
keymap_global["U0-K"] = "Up" | |
keymap_global["U0-L"] = "Right" | |
keymap_global["U0-LShift-H"] = "Shift-Left" | |
keymap_global["U0-LShift-J"] = "Shift-Down" | |
keymap_global["U0-LShift-K"] = "Shift-Up" | |
keymap_global["U0-LShift-L"] = "Shift-Right" | |
# 無変換キー + ** でCtrl + ** | |
keymap_global["U0-A"] = "Ctrl-A" | |
keymap_global["U0-C"] = "Ctrl-C" | |
keymap_global["U0-D"] = "Ctrl-D" | |
keymap_global["U0-F"] = "Ctrl-F" | |
keymap_global["U0-S"] = "Ctrl-S" | |
keymap_global["U0-V"] = "Ctrl-V" | |
keymap_global["U0-X"] = "Ctrl-X" | |
keymap_global["U0-Z"] = "Ctrl-Z" | |
# Insertで日付挿入 | |
keymap_global["O-Insert"] = keymap.InputTextCommand(date.today().strftime("%Y-%m-%d")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment