[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Keybindings in GTK/GNOME2



Christian Marillat wrote:
> Ivo Timmermans <ivo@o2w.nl> writes:
> > Does anyone know if it is possible to customize some keybindings for
> > editing text in Gtk2 applications?  In particular, I would like
> > Control-H to behave as backspace, and Control-U should clear a text
> > entry field.  Is it at all possible to do this?
> 
> Yes, in the control center "Keyboard Shortcuts" entry.

I can only select the Emacs theme there, and set some useless
GNOME-wide keyboard shortcuts.  (Useless in the sense that I don't
ever use these anyway.)

> See /usr/share/themes/Emacs/gtk-2.0-key/gtkrc and
> /usr/share/themes/Default/gtk-2.0-key/gtkrc for exemple configuration
> files.

The Default key theme file is almost empty.  The Emacs one is somewhat
helpful, but where can I find what values are accepted, and what they
mean?

For example, I tried emulating C-u with:

	bind "<ctrl>u" { "delete-from-cursor" (paragraph-ends, 1, 0) }

The 1 and 0 are wild guesses.  If I try to use this with pan, I get:

	(pan:12089): Gtk-WARNING **: gtk_binding_entry_activate(): binding "gtk-emacs-text-entry::<Control>u": signature mismatch for signal "delete-from-cursor" in the `GtkEntry' class ancestry

This isn't particularly helpful, what can I do to solve this?

Another thing: I tried using <meta> here, which does not work.  How
should I bind something using the meta (mod4) modifier?


	Ivo

-- 
Floating point exception



Reply to: