Allows you to enter frequently used parentheses and equals in python without Shift

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. ** **

1. Install karabiner

First install from here https://pqrs.org/osx/karabiner/index.html.ja

2. Swap numbers and symbols

Open Preference and Check change Num Key (1 ... 0)

スクリーンショット 2016-02-19 10.41.21.png

This will swap the numbers and symbols.

3. Assign = to 0

Open the Misc & Uninstall tab and click Open private.xml スクリーンショット 2016-02-19 10.54.09.png

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.

スクリーンショット 2016-02-19 10.46.52.png

I'm used to flipping numbers, Basically, you can comfortably code python with this.

Recommended Posts

Allows you to enter frequently used parentheses and equals in python without Shift
Jedi-vim shortcut command that allows you to refer to the definition source and definition destination in Python
8 Frequently Used Commands in Python Django
Detect keystrokes in Python (without Enter)
[python] Frequently used techniques in machine learning
How to use is and == in Python
Create a plugin that allows you to search Sublime Text 3 tabs in Python
How to generate permutations in Python and C ++
Send messages to Skype and Chatwork in Python
To represent date, time, time, and seconds in Python
How to plot autocorrelation and partial autocorrelation in python
[Introduction to Python] Summary of functions and methods that frequently appear in Python [Problem format]
What to do if you run python in IntelliJ and end with an error
Convert timezoned date and time to Unixtime in Python2.7
Note the frequently used options in Python + Selenium + Chrome
% And str.format () in Python. Which one do you use?
[Python] How to sort dict in list and instance in list
Comparison table of frequently used processes of Python and Clojure
A learning roadmap that allows you to develop and publish services from scratch with Python
[Python3] Code that can be used when you want to resize images in folder units
Script to count and stop up to 5 seconds in Python in Blender
Try to make it using GUI and PyQt in Python
How to swap elements in an array in Python, and how to reverse an array.
Application to display and search local memos (diary) in Python
How to import a file anywhere you like in Python
[Introduction to Udemy Python 3 + Application] 36. How to use In and Not
Display numbers and letters assigned to variables in python print
Tips for coding short and easy to read in Python
A standard way to develop and distribute packages in Python
Useful tricks related to list and for statements in Python
Comparison of how to use higher-order functions in Python 2 and 3
Introduction to Effectiveness Verification Chapters 4 and 5 are written in Python
Object-oriented in C: Refactored "○ ✕ game" and ported it to Python
How to execute external shell scripts and commands in python
Just try to receive a webhook in ngrok and python
How to log in to AtCoder with Python and submit automatically
When you want to replace multiple characters in a string without using regular expressions in python3 series