Tips and Traps¶
Starting from Python 3.7,
dict
preserves insertion order (i.e.,dict
is ordered). There is no need to useOrderedDict
any more in Python 3.7+. However,set
in Python is implemented as an unordered hashset and thus is neither ordered nor sorted. A trick to dedup an iterablevalues
Map Keys in Linux
Note: For Vim users, it is appealing to make the Caps Lock
function like Escape
.
It is suggested that you make Caps Lock
an additonal Escape
rather than swap them.
This avoid inconsistent key mapping issues when you work remotely via VNC, NoMachine, etc.
Desktop Environment
Some desktop environment (e …
Map Keys in macOS
Update: As of MacOS Sierra 10.12.1,
the remapping of Caps Lock
to Escape
can be done natively in the Keyboard System Preferences pane.
Follow the steps below to remap Caps Lock to Escape (without relying on 3rd party software).
- Open System Preferences and click on
Keyboard
- Click on …
Map Keys in Windows
** Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement! **
If you are a heavy Vim user and you have work on Windows, it is suggested that you Swap the Caps Lock key with the Escape key. The swaped key mapping …