gtk2/gtk/gtkrc.key.emacs
Owen Taylor 7b79dfbef8 Add a function to delete all bindings add by gtk_binding_parse_binding()
Fri Feb  8 18:46:13 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
	a function to delete all bindings add by
	gtk_binding_parse_binding() when rereading RC files.

	* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
	binding set content as well as RC content.

	* gtk/gtkbindings.c (binding_compose_params): Fix
	various GValue handling problems.

	* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
	for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
	C-k, M-\, M-d, C-d.

	* gtk/gtktextview.c (gtk_text_view_class_init): Remove
	same bindings as GtkEntry, plus C-n, C-p, C-space

        * gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
	Add Emacs and Default key themes.
2002-02-09 00:19:29 +00:00

56 lines
1.9 KiB
Plaintext

#
# A keybinding set implementing emacs-like keybindings
#
#
# Bindings for GtkTextView and GtkEntry
#
binding "gtk-emacs-text-entry"
{
bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) }
bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) }
bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) }
bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) }
bind "<alt>b" { "move-cursor" (words, -1, 0) }
bind "<shift><alt>b" { "move-cursor" (words, -1, 1) }
bind "<alt>f" { "move-cursor" (words, 1, 0) }
bind "<shift><alt>f" { "move-cursor" (words, 1, 1) }
bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) }
bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) }
bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) }
bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) }
bind "<ctrl>w" { "cut-clipboard" () }
bind "<ctrl>y" { "paste-clipboard" () }
bind "<ctrl>d" { "delete-from-cursor" (chars, 1) }
bind "<alt>d" { "delete-from-cursor" (word-ends, 1) }
bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) }
bind "<alt>backslash" { "delete-from-cursor" (whitespace, 1) }
bind "<alt>space" { "delete-from-cursor" (whitespace, 1)
"insert-at-cursor" (" ") }
bind "<alt>KP_Space" { "delete-from-cursor" (whitespace, 1)
"insert-at-cursor" (" ") }
}
#
# Bindings for GtkTextView
#
binding "gtk-emacs-text-view"
{
bind "<ctrl>p" { "move-cursor" (display-lines, -1, 0) }
bind "<shift><ctrl>p" { "move-cursor" (display-lines, -1, 1) }
bind "<ctrl>n" { "move-cursor" (display-lines, 1, 0) }
bind "<shift><ctrl>n" { "move-cursor" (display-lines, 1, 1) }
bind "<ctrl>space" { "set-anchor" () }
bind "<ctrl>KP_Space" { "set-anchor" () }
}
class "GtkEntry" binding "gtk-emacs-text-entry"
class "GtkTextView" binding "gtk-emacs-text-entry"
class "GtkTextView" binding "gtk-emacs-text-view"