-
Notifications
You must be signed in to change notification settings - Fork 2
/
DefaultKeyBinding.dict
60 lines (50 loc) · 2.23 KB
/
DefaultKeyBinding.dict
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
/* ~/Library/KeyBindings/DefaultKeyBinding.dict
Below cheat sheet taken from: https://gist.github.com/trusktr/1e5e516df4e8032cbc3d
Here is a rough cheatsheet for syntax.
Key Modifiers
^ : Ctrl
$ : Shift
~ : Option (Alt)
@ : Command (Apple)
# : Numeric Keypad
Non-Printable Key Codes
Standard
Up Arrow: \UF700 Backspace: \U0008 F1: \UF704
Down Arrow: \UF701 Tab: \U0009 F2: \UF705
Left Arrow: \UF702 Escape: \U001B F3: \UF706
Right Arrow: \UF703 Enter: \U000A ...
Insert: \UF727 Page Up: \UF72C
Delete: \UF728 Page Down: \UF72D
Home: \UF729 Print Screen: \UF72E
End: \UF72B Scroll Lock: \UF72F
Break: \UF732 Pause: \UF730
SysReq: \UF731 Menu: \UF735
Help: \UF746
OS X
delete: \U007F
*/
{
// This section changes the Home and End key behaviour.
"\UF729" = moveToBeginningOfLine:; // Home
"\UF72B" = moveToEndOfLine:; // End
"$\UF729" = moveToBeginningOfLineAndModifySelection:; // Shift+Home
"$\UF72B" = moveToEndOfLineAndModifySelection:; // Shift+End
"^\UF729" = moveToBeginningOfDocument:; // Ctrl+Home
"^\UF72B" = moveToEndOfDocument:; // Ctrl+End
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // Ctrl+Shift+Home
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // Ctrl+Shift+End
// This section swaps the Cmd+Arrow key behaviour with Alt+Arrow.
"@\UF702" = moveWordBackward:; // Cmd+LeftArrow
"@\UF703" = moveWordForward:; // Cmd+RightArrow
// Lucas 2020-05-21 Disable the alt arrows for the time-being
// "~\UF702" = moveToBeginningOfLine:; // Opt+LeftArrow
// "~\UF703" = moveToEndOfLine:; // Opt+RightArrow
"@$\UF702" = moveWordBackwardAndModifySelection:; // Cmd+Shift+LeftArrow
"@$\UF703" = moveWordForwardAndModifySelection:; // Cmd+Shift+RightArrow
// "~$\UF702" = moveToBeginningOfLineAndModifySelection:; // Opt+Shift+LeftArrow
// "~$\UF703" = moveToEndOfLineAndModifySelection:; // Opt+Shift+RightArrow
// Delete a word backwards
"@\U007f" = deleteWordBackward:; //Cmd+backspace
// Delete a word forwards
"@\UF728" = deleteWordForward:; //Cmd+delete
}