Skip to content

Instantly share code, notes, and snippets.

@zenglian

zenglian/layout-en.md

Last active Aug 30, 2018
Embed
What would you like to do?
Optimize Keyboard Layout for Developers

Optimize Keyboard Layout for Developers

Design

For most people, " is much more frequently used than '.
For most developers,Esc is much more frequently used than Caps Lock.
For programmers of Java/JavaScript/C/C++/C# etc, {/} is more frequently used than [/].

So it's not bad to swap them.

Configuration

Linux

Note the first letter of the file name must be upper case. Ohterwise it does not work after reboot. See more info of xmodmap

xmodmap -pke > ~/.Xmodmap
cp ~/.Xmodmap ~/.Xmodmap.bak
vim ~/.Xmodmap      			
xmodmap ~/.Xmodmap 			

~/.Xmodmap (only modified lines, the 2nd column shift+key)


...
keycode  34 = braceleft bracketleft braceleft bracketleft
keycode  35 = braceright bracketright braceright bracketright
...
keycode  48 = quotedbl apostrophe quotedbl apostrophe
...
keycode 254 =
keycode 255 =

! Swap Caps Lock and Esc
! remove Lock = Caps_Lock
! keysym Escape = Caps_Lock
! keysym Caps_Lock = Escape
! add Lock = Caps_Lock
                                                              

Windows

Use Keytweak and Keyboard Layout Manager.

Practice

I used this layout for several years. It's easy to get familiar with it. You can buy sticky paper note and override the chars on these keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment