I recently started using python on mac I think it's basically a simple and easy-to-remember language. However, it is a little stressful that ** frequently used parentheses and equals can only be entered while holding down shift **. So I put a carabiner so that I can enter parentheses and equals without Shift on the JIS layout keyboard.
** * karabiner is software that changes the keyboard assignment for mac. ** **
First install from here https://pqrs.org/osx/karabiner/index.html.ja
Open Preference and Check change Num Key (1 ... 0)
This will swap the numbers and symbols.
Open the Misc & Uninstall tab and click Open private.xml
Edit and save as follows.
private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Swap minus(-) and equal(=)</name>
<identifier>private.swap_minus_and_equal</identifier>
<modifier_not>
ModifierFlag::COMMAND_L,
ModifierFlag::COMMAND_R,
ModifierFlag::CONTROL_L,
ModifierFlag::CONTROL_R,
ModifierFlag::FN,
ModifierFlag::OPTION_L,
ModifierFlag::OPTION_R,
</modifier_not>
<autogen>__KeyToKey__ KeyCode::KEY_0, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::KEY_0</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_0, KeyCode::MINUS, ModifierFlag::SHIFT_L</autogen>
</item>
</root>
Go back to the Change Key tab and click Reload XML private.xml is reflected.
If you search with swap minus, items will appear, so check it.
I'm used to flipping numbers, Basically, you can comfortably code python with this.
Recommended Posts