Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HHKB-ish setting for Karabiner
#!/bin/sh
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner
$cli set remap.fn_consumer_to_fkeys_f5 1
/bin/echo -n .
$cli set general.dont_remap_apple_keyboard 1
/bin/echo -n .
$cli set remap.fn_consumer_to_fkeys_f7 1
/bin/echo -n .
$cli set general.dont_remap_apple_pointing 1
/bin/echo -n .
$cli set remap.fkeys_to_consumer_f5 1
/bin/echo -n .
$cli set remap.fkeys_to_consumer_f1 1
/bin/echo -n .
$cli set remap.shiftR2fn 1 # If you want to Shift R to Fn
# $cli set remap.controlR2fn 1 # If you want to control R to Fn
/bin/echo -n .
$cli set remap.fn_consumer_to_fkeys_f10 1
/bin/echo -n .
$cli set remap.fkeys_to_consumer_f10 1
/bin/echo -n .
$cli set remap.fn_num_to_function 1
/bin/echo -n .
$cli set remap.fn_consumer_to_fkeys_f1 1
/bin/echo -n .
$cli set remap.fn_sp_to_arrow 1
/bin/echo -n .
$cli set remap.fkeys_to_consumer_f3_lion 1
/bin/echo -n .
$cli set remap.fn_consumer_to_fkeys_f3 1
/bin/echo -n .
$cli set remap.fkeys_to_consumer_f7 1
/bin/echo -n .
$cli set remap.optionL2commandL 1
/bin/echo -n .
$cli set remap.commandL2optionL 1
/bin/echo -n .
/bin/echo
<?xml version="1.0"?>
<root>
<item>
<name>HHKB style</name>
<item>
<name>Fn+{1~=} to F1 ~ F12</name>
<identifier>remap.fn_num_to_function</identifier>
<autogen>__KeyToKey__ KeyCode::KEY_1, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F1</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_2, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F2</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_3, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F3</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_4, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F4</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_5, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F5</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_6, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F6</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_7, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F7</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_8, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F8</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_9, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F9</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_0, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F10</autogen>
<autogen>__KeyToKey__ KeyCode::MINUS, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F11</autogen>
<autogen>__KeyToKey__ KeyCode::EQUAL, ModifierFlag::FN, KeyCode::VK_NONE, KeyCode::F12</autogen>
</item>
<item>
<name>F13(print screen) to Eject</name>
<identifier>remap.fn_psc_to_eject</identifier>
<autogen>__KeyToKey__ KeyCode::F13, ConsumerKeyCode::EJECT</autogen>
</item>
<item>
<name>F13(print screen) to Power</name>
<identifier>remap.fn_psc_to_power</identifier>
<autogen>__KeyToKey__ KeyCode::F13, ConsumerKeyCode::POWER</autogen>
</item>
<item>
<name>Fn + ;['/ to arrow key</name>
<identifier>remap.fn_sp_to_arrow</identifier>
<autogen>__KeyToKey__ KeyCode::SEMICOLON, ModifierFlag::FN, KeyCode::CURSOR_LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::BRACKET_LEFT, ModifierFlag::FN, KeyCode::CURSOR_UP</autogen>
<autogen>__KeyToKey__ KeyCode::QUOTE, ModifierFlag::FN, KeyCode::CURSOR_RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::SLASH, ModifierFlag::FN, KeyCode::CURSOR_DOWN</autogen>
</item>
</item>
<item> <!-- for korean 메뉴에 있는건 예전 키맵(Cmd_L+Space라서 Ctrl_L+Space 를 Option_R 로 맵핑 -->
<name>Option_R to Hangul key</name>
<item>
<name>Option_R to Hangul key</name>
<not>VIRTUALMACHINE, REMOTEDESKTOPCONNECTION</not>
<identifier>remap.ksc_optionR2controlSpace</identifier>
<autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::SPACE, ModifierFlag::CONTROL_L, Option::NOREPEAT</autogen>
</item>
</item>
<item>
<name>For Ajazz Geek AK33</name>
<item>
<name>End to Up Arrow</name>
<identifier>remap.ajazz_end_to_up</identifier>
<autogen>__KeyToKey__ KeyCode::END, KeyCode::CURSOR_UP</autogen>
</item>
<item>
<name>PgDn to Enter</name>
<identifier>remap.ajazz_pgdn_to_enter</identifier>
<autogen>__KeyToKey__ KeyCode::PAGEDOWN, KeyCode::RETURN</autogen>
</item>
<item>
<name>PgUp to backslash</name>
<identifier>remap.ajazz_pgup_to_backslash</identifier>
<autogen>__KeyToKey__ KeyCode::PAGEUP, ModifierFlag::FN, KeyCode::BACKSLASH</autogen>
</item>
<item>
<name>Shift PgUp to Shift backslash</name>
<identifier>remap.ajazz_shift_pgup_to_shift_backslash</identifier>
<autogen>__KeyToKey__ KeyCode::PAGEUP, KeyCode::SHIFT_L, ModifierFlag::FN, KeyCode::BACKSLASH</autogen>
</item>
<item>
<name>Home/Pause to backspace</name>
<identifier>remap.ajazz_home_to_backspace</identifier>
<autogen>__KeyToKey__ KeyCode::HOME, KeyCode::DELETE</autogen>
<autogen>__KeyToKey__ KeyCode::HOME, ModifierFlag::FN, KeyCode::DELETE</autogen>
</item>
<item>
<name>Del to Eject</name>
<identifier>remap.ajazz_del_to_eject</identifier>
<autogen>__KeyToKey__ KeyCode::FORWARD_DELETE, ConsumerKeyCode::EJECT</autogen>
</item>
<item>
<name>Del to Power</name>
<identifier>remap.ajazz_del_to_power</identifier>
<autogen>__KeyToKey__ KeyCode::FORWARD_DELETE, ConsumerKeyCode::POWER</autogen>
</item>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.