My Keyhac setting
import sys
import os
import datetime
import subprocess
from keyhac import *
def configure(keymap):
# --------------------------------------------------------------------
# Text editer setting for editting config.py file
# Setting with program file path (Simple usage)
if 1:
keymap.editor = "Atom"
#keymap.editor = "Sublime Text 2"
# --------------------------------------------------------------------
# Customizing the display
# Font
keymap.setFont( "Osaka-Mono", 16 )
# Theme
keymap.setTheme("black")
# --------------------------------------------------------------------
# Global keymap which affects any windows
keymap_global = keymap.defineWindowKeymap()
# My setting
# Modify
if 1:
keymap.replaceKey( 102, "Alt" )
keymap.replaceKey( 104, "Fn" )
keymap_global[ "Fn-I" ] = "Up"
keymap_global[ "Fn-K" ] = "Down"
keymap_global[ "Fn-J" ] = "Left"
keymap_global[ "Fn-L" ] = "Right"
keymap_global[ "Cmd-Fn-I" ] = "Cmd-Up"
keymap_global[ "Cmd-Fn-K" ] = "Cmd-Down"
keymap_global[ "Cmd-Fn-J" ] = "Cmd-Left"
keymap_global[ "Cmd-Fn-L" ] = "Cmd-Right"
keymap_global[ "Shift-Fn-I" ] = "Shift-Up"
keymap_global[ "Shift-Fn-K" ] = "Shift-Down"
keymap_global[ "Shift-Fn-J" ] = "Shift-Left"
keymap_global[ "Shift-Fn-L" ] = "Shift-Right"
keymap_global[ "Cmd-Alt-Fn-I" ] = "Cmd-Alt-Up"
keymap_global[ "Cmd-Alt-Fn-K" ] = "Cmd-Alt-Down"
keymap_global[ "Cmd-Alt-Fn-J" ] = "Cmd-Alt-Left"
keymap_global[ "Cmd-Alt-Fn-L" ] = "Cmd-Alt-Right"
keymap_global[ "Cmd-Ctrl-Fn-I" ] = "Cmd-Ctrl-Up"
keymap_global[ "Cmd-Ctrl-Fn-K" ] = "Cmd-Ctrl-Down"
keymap_global[ "Cmd-Ctrl-Fn-J" ] = "Cmd-Ctrl-Left"
keymap_global[ "Cmd-Ctrl-Fn-L" ] = "Cmd-Ctrl-Right"
keymap_global[ "Shift-Cmd-Fn-I" ] = "Shift-Cmd-Up"
keymap_global[ "Shift-Cmd-Fn-K" ] = "Shift-Cmd-Down"
keymap_global[ "Shift-Cmd-Fn-J" ] = "Shift-Cmd-Left"
keymap_global[ "Shift-Cmd-Fn-L" ] = "Shift-Cmd-Right"
keymap_global[ "Alt-Fn-I" ] = "Alt-Up"
keymap_global[ "Alt-Fn-K" ] = "Alt-Down"
keymap_global[ "Alt-Fn-J" ] = "Alt-Left"
keymap_global[ "Alt-Fn-L" ] = "Alt-Right"
keymap_global[ "Shift-Alt-Fn-I" ] = "Shift-Alt-Up"
keymap_global[ "Shift-Alt-Fn-K" ] = "Shift-Alt-Down"
keymap_global[ "Shift-Alt-Fn-J" ] = "Shift-Alt-Left"
keymap_global[ "Shift-Alt-Fn-L" ] = "Shift-Alt-Right"
keymap_global[ "Fn-N" ] = "Enter"
keymap_global[ "Alt-Fn-N" ] = "Alt-Enter"
keymap_global[ "Cmd-Fn-N" ] = "Cmd-Enter"
keymap_global[ "Ctrl-Fn-N" ] = "Ctrl-Enter"
keymap_global[ "Shift-Fn-N" ] = "Shift-Enter"
keymap_global[ "Fn-Comma" ] = "Home"
keymap_global[ "Fn-Period" ] = "End"
keymap_global[ "Shift-Fn-Comma" ] = "Shift-Home"
keymap_global[ "Shift-Fn-Period" ] = "Shift-End"
keymap_global[ "Fn-H" ] = "Back"
keymap_global[ "Cmd-Fn-H" ] = "Cmd-Back"
keymap_global[ "Fn-O" ] = "PageUp"
keymap_global[ "Fn-P" ] = "PageDown"
keymap_global[ "Fn-Semicolon" ] = "Delete"
# One-shot modifier
if 1:
# Keep Eisuu and Kana
keymap_global[ "O-Alt" ] = "102"
keymap_global[ "O-Fn" ] = "104"
# SandS
# keymap.replaceKey("Space", "Shift")
# keymap_global[ "O-Shift" ] = "Spaceek"