python 我的Keyhac设置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 我的Keyhac设置相关的知识,希望对你有一定的参考价值。

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"

以上是关于python 我的Keyhac设置的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf 配置keyhac

apache_conf config.py - Keyhac配置

python 我的背景设置1和2

python 我的战略背景设置

python 路径怎么设置,我的python2.7在usr-lip 下而不在usr-bin.path变量怎么设置求教

在逻辑回归中,如何在 python 中为我的虚拟变量设置“参考水平”