-
Notifications
You must be signed in to change notification settings - Fork 35
/
os_x_qwerty.dict.txt
80 lines (61 loc) · 2.04 KB
/
os_x_qwerty.dict.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
DATE: 2010-06-15
VERSION: 1.0
AUTHOR: Xah Lee
DESCRIPTION: Mac OS X keybinding file for the ErgoEmacs keybinding for QWERTY layout.
INSTALL:
Rename this file to “DefaultKeyBinding.dict”
Then, place the file in this dir:
“~/Library/KeyBindings/DefaultKeyBinding.dict”
Create the “KeyBindings” dir if you don't have it already.
Go to your system preference, “Keyboard & Mouse” panel, and swap
Control and Command key positions. So, Control is right under your
thumb.
Now, launch or re-launch any Cocoa application, such as TextEdit. The app should now use ErgoEmacs keybinding.
If you are using emacs, you might want to put the following lines in your “.emacs”:
(setq mac-control-modifier 'meta)
(setq mac-command-modifier 'control)
These lines works for Cocoa emacs, may not work for Carbon Emacs.
Some references:
• How To Create Keybinding In Mac OS X
http://xahlee.org/emacs/osx_keybinding.html
• ErgoEmacs Keybinding
http://xahlee.org/emacs/ergonomic_emacs_keybinding.html
• How to Swap Modifier Keys on OS X
http://xahlee.org/emacs/osx_swapping_modifier_keys.html
If you like to use Option key instead of Control, you can change all ^
to ~ in this file. However, due to some limitations of the OS X
keybinding system, the following won't work:
• Opt+n for move cursor right
• Opt+e for deleting a char to the left
• Opt+u for deleting a char to the right
*/
{
"^i" = "moveUp:";
"^k" = "moveDown:";
"^j" = "moveLeft:";
"^l" = "moveRight:";
"^o" = "moveWordRight:";
"^u" = "moveWordLeft:";
"^h" = "moveToBeginningOfLine:";
"^H" = "moveToEndOfLine:";
"^I" = "pageUp:";
"^K" = "pageDown:";
"^U" = "moveToBeginningOfParagraph:";
"^O" = "moveToEndOfParagraph:";
"^J" = "moveToBeginningOfDocument:";
"^L" = "moveToEndOfDocument:";
"^d" = "deleteBackward:";
"^f" = "deleteForward:";
"^e" = "deleteWordBackward:";
"^r" = "deleteWordForward:";
"^Z" = "redo:";
"^z" = "undo:";
"^x" = "cut:";
"^X" = ("selectAll:", "cut:");
"^c" = "copy:";
"^C" = ("selectAll:", "copy:");
"^v" = "paste:";
"^8" = "selectWord:";
"^ " = "setMark:";
}