用户工具

站点工具


侧边栏

Navigation

karabiner

Karabiner

简介

设置

实例

private.xml
<?xml version="1.0"?>
      <root>
      <!--定义 app 名称-->
	<appdef>
    	<appname>word</appname>
    	<equal>com.microsoft.Word</equal>
  	</appdef>  	
  	<appdef>
  		<appname>MWeb</appname>
  		<equal>com.coderforart.MWeb</equal>
  	</appdef>
	<!--双击 cmd 替换 ctrl+space;呼出 Spotlight-->
        <item>
	      <name>Command_L x2 to Control_L+Space</name>
	      <identifier>remap.command_x2_to_controlLspace</identifier>
	      <autogen>__DoublePressModifier__ KeyCode::COMMAND_L, KeyCode::COMMAND_L, KeyCode::SPACE, ModifierFlag::CONTROL_L</autogen>
	</item>
        <!--定义输入法名称-->
	<inputsourcedef>
	      <name>MY_keylayout_zh_Hans</name>
	      <inputsourceid_prefix>com.apple.inputmethod.SCIM.ITABC</inputsourceid_prefix>
	</inputsourcedef>
	  <item>
	      <name>系统拼音:使用英文标点符号</name>
	      <identifier>private.quick_dotOfEnglish</identifier>
	      <inputsource_only>MY_keylayout_zh_Hans</inputsource_only>
	      <uielementrole_only>AXTextArea, AXTextField</uielementrole_only>
	      <only>MWeb</only>
	      <autogen>__KeyToKey__
	          KeyCode::DOT,
	          KeyCode::CAPSLOCK,
	          KeyCode::DOT,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::DOT, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::DOT, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::DOT, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::DOT, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::COMMA,
	          KeyCode::CAPSLOCK,
	          KeyCode::COMMA,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::COMMA, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::COMMA, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::COMMA, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::COMMA, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::SLASH,
	          KeyCode::CAPSLOCK,
	          KeyCode::SLASH,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::SLASH, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::SLASH, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::SLASH, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::SLASH, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::SEMICOLON,
	          KeyCode::CAPSLOCK,
	          KeyCode::SEMICOLON,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::SEMICOLON, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::SEMICOLON, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::SEMICOLON, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::SEMICOLON, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::QUOTE,
	          KeyCode::CAPSLOCK,
	          KeyCode::QUOTE,
	          KeyCode::CAPSLOCK,
	      </autogen>
	        <autogen>__KeyToKey__
	          KeyCode::BACKQUOTE,
	          KeyCode::CAPSLOCK,
	          KeyCode::BACKQUOTE,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::QUOTE, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::QUOTE, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::QUOTE, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::QUOTE, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BRACKET_LEFT,
	          KeyCode::CAPSLOCK,
	          KeyCode::BRACKET_LEFT,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BRACKET_LEFT, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::BRACKET_LEFT, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BRACKET_LEFT, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::BRACKET_LEFT, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BRACKET_RIGHT,
	          KeyCode::CAPSLOCK,
	          KeyCode::BRACKET_RIGHT,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BRACKET_RIGHT, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::BRACKET_RIGHT, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BRACKET_RIGHT, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::BRACKET_RIGHT, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BACKSLASH,
	          KeyCode::CAPSLOCK,
	          KeyCode::BACKSLASH,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BACKSLASH, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::BACKSLASH, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::BACKSLASH, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::BACKSLASH, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::MINUS,
	          KeyCode::CAPSLOCK,
	          KeyCode::MINUS,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::MINUS, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::MINUS, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::MINUS, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::MINUS, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::EQUAL,
	          KeyCode::CAPSLOCK,
	          KeyCode::EQUAL,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::EQUAL, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::EQUAL, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::EQUAL, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::EQUAL, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::KEY_1, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::KEY_1, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::KEY_1, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::KEY_1, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::KEY_2, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::KEY_2, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::KEY_2, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::KEY_2, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::KEY_3, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	          KeyCode::KEY_3, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::KEY_3, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	          KeyCode::KEY_3, ModifierFlag::SHIFT_L,
	          KeyCode::CAPSLOCK,
	      </autogen>
	      <autogen>__KeyToKey__
	          KeyCode::KEY_4, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_4, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_4, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_4, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_5, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_5, ModifierFlag::SHIFT_R,
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_5, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_5, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_6, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_6, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_6, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_6, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_7, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_7, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_7, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_7, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_8, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_8, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_8, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_8, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_9, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_9, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_9, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_9, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_0, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_0, ModifierFlag::SHIFT_R, 
	          KeyCode::CAPSLOCK,
	      </autogen> 
	      <autogen>__KeyToKey__ 
	          KeyCode::KEY_0, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	          KeyCode::KEY_0, ModifierFlag::SHIFT_L, 
	          KeyCode::CAPSLOCK, 
	      </autogen> 
	  </item>
	</root>
karabiner.txt · 最后更改: 2015/12/05 05:26 由 dr.j

Bitnami