Adding Key bindings to Text widgets



Hi: I'm trying to add key bindings to text widgets, [specifically, I want 
to bind <alt> / to a word complation function ]

I found the following, but I can't find any examples of it's use:

binding name 
{
  bind key 
  { 
    signalname (param, ...)
    ...
  }
  ...
}

Presumably something like:

binding "meta_slash"
{
    bind "<alt> slash"
    {
        "changed" (param)
    }
}

widget "*GtkText" bind "meta_slash"

[ I'm assuming the key names here are those from keysymdef.h with the XK
  stripped ]

But I'm not sure what 'param' should be.

Is this the right approach? Also, do I have to use a gtkrc file to do
this, or is there a purely in-program way of doing this?

-- 
Vivek





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