]> Pileus Git - ~andy/gtk/blob - gtk/gtkrc.key.emacs
new function (gtk_tree_view_column_create_button): use g_signal_* instead
[~andy/gtk] / gtk / gtkrc.key.emacs
1 #
2 # A keybinding set implementing emacs-like keybindings
3 #
4
5 #
6 # Bindings for GtkTextView and GtkEntry
7 #
8 binding "gtk-emacs-text-entry"
9 {
10   bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) }
11   bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) }
12   bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) }
13   bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) }
14
15   bind "<alt>b" { "move-cursor" (words, -1, 0) }
16   bind "<shift><alt>b" { "move-cursor" (words, -1, 1) }
17   bind "<alt>f" { "move-cursor" (words, 1, 0) }
18   bind "<shift><alt>f" { "move-cursor" (words, 1, 1) }
19
20   bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) }
21   bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) }
22   bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) }
23   bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) }
24
25   bind "<ctrl>w" { "cut-clipboard" () }
26   bind "<ctrl>y" { "paste-clipboard" () }
27
28   bind "<ctrl>d" { "delete-from-cursor" (chars, 1) }
29   bind "<alt>d" { "delete-from-cursor" (word-ends, 1) }
30   bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) }
31   bind "<alt>backslash" { "delete-from-cursor" (whitespace, 1) }
32
33   bind "<alt>space" { "delete-from-cursor" (whitespace, 1)
34                       "insert-at-cursor" (" ") }
35   bind "<alt>KP_Space" { "delete-from-cursor" (whitespace, 1)
36                          "insert-at-cursor" (" ")  }
37 }
38
39 #
40 # Bindings for GtkTextView
41 #
42 binding "gtk-emacs-text-view"
43 {
44   bind "<ctrl>p" { "move-cursor" (display-lines, -1, 0) }
45   bind "<shift><ctrl>p" { "move-cursor" (display-lines, -1, 1) }
46   bind "<ctrl>n" { "move-cursor" (display-lines, 1, 0) }
47   bind "<shift><ctrl>n" { "move-cursor" (display-lines, 1, 1) }
48
49   bind "<ctrl>space" { "set-anchor" () }
50   bind "<ctrl>KP_Space" { "set-anchor" () }
51 }
52
53 #
54 # Bindings for GtkTreeView
55 #
56 binding "gtk-emacs-tree-view"
57 {
58   bind "<ctrl>s" { "start-interactive-search" () }
59   bind "<ctrl>f" { "move-cursor" (logical-positions, 1) }
60   bind "<ctrl>b" { "move-cursor" (logical-positions, -1) }
61 }
62
63 class "GtkEntry" binding "gtk-emacs-text-entry"
64 class "GtkTextView" binding "gtk-emacs-text-entry"
65 class "GtkTextView" binding "gtk-emacs-text-view"
66 class "GtkTreeView" binding "gtk-emacs-tree-view"