2 * (C) Copyright 2004-2007 Shawn Betts
3 * (C) Copyright 2007-2010 John J. Foerch
4 * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
5 * (C) Copyright 2009 Deniz Dogan
7 * Use, modification, and distribution are subject to the terms specified in the
11 define_fallthrough(text_keymap, match_text_keys);
13 define_key(text_keymap, match_text_keys, null, $fallthrough);
16 define_key(text_keymap, "C-a", "beginning-of-line");
17 define_key(text_keymap, "C-e", "end-of-line");
18 define_key(text_keymap, "C-b", "backward-char");
19 define_key(text_keymap, "left", "backward-char");
20 define_key(text_keymap, "M-b", "backward-word");
21 define_key(text_keymap, "C-left", "backward-word");
22 define_key(text_keymap, "M-left", "backward-word");
23 define_key(text_keymap, "C-f", "forward-char");
24 define_key(text_keymap, "right", "forward-char");
25 define_key(text_keymap, "M-f", "forward-word");
26 define_key(text_keymap, "C-right", "forward-word");
27 define_key(text_keymap, "M-right", "forward-word");
28 define_key(text_keymap, "home", "beginning-of-line");
29 define_key(text_keymap, "end", "end-of-line");
31 // Copy-paste-kill-delete
32 define_key(text_keymap, "C-y", "yank");
33 define_key(text_keymap, "C-w", "kill-region");
34 define_key(text_keymap, "M-w", "kill-ring-save");
35 define_key(text_keymap, "C-k", "cut-to-end-of-line");
36 define_key(text_keymap, "S-delete", "kill-region");
37 define_key(text_keymap, "S-back_space", "cmd_deleteCharBackward");
38 define_key(text_keymap, "back_space", "cmd_deleteCharBackward");
39 define_key(text_keymap, "M-back_space", "cmd_deleteWordBackward");
40 define_key(text_keymap, "C-d", "cmd_deleteCharForward");
41 define_key(text_keymap, "delete", "cmd_deleteCharForward");
42 define_key(text_keymap, "M-d", "cmd_deleteWordForward");
43 define_key(text_keymap, "C-delete", "cmd_deleteWordForward");
44 define_key(text_keymap, "C-back_space", "cmd_deleteWordBackward");
47 define_key(text_keymap, "C-?","cmd_redo");
48 define_key(text_keymap, "C-_", "cmd_undo");
49 define_key(text_keymap, "C-x u", "cmd_undo");
50 define_key(text_keymap, "C-/", "cmd_undo");
53 define_key(text_keymap, "C-x h", "cmd_selectAll");
54 define_key(text_keymap, "C-space", "set-mark");
55 define_key(text_keymap, "C-@", "set-mark");
56 define_key(text_keymap, "S-home", "cmd_selectBeginLine");
57 define_key(text_keymap, "S-end", "cmd_selectEndLine");
58 define_key(text_keymap, "C-S-left", "cmd_selectWordPrevious");
59 define_key(text_keymap, "C-S-right", "cmd_selectWordNext");
60 define_key(text_keymap, "S-insert", "paste-x-primary-selection");
63 define_key(text_keymap, "M-l", "downcase-word");
64 define_key(text_keymap, "M-u", "upcase-word");
65 define_key(text_keymap, "M-c", "capitalize-word");
66 define_key(text_keymap, "C-t", "transpose-chars");
67 define_key(text_keymap, "M-(", "insert-parentheses");