Re: [gtk-list] Re: New key-binding system



>> Can you have multi-key bindings?

Owen> As of right now, it is not. It wouldn't be impossible to add
Owen> (and is present, for instance, in Tk, and I think also in Xt),

FYI, Tk gets it wrong.  In Tk, if you have a binding for a sequence
like "abc" and a binding for "bc", both will fire when you type in
"abc".  I think this is hardly ever what you want, but then I'm
partial to the Emacs keymap model.

Owen> [ There are some slighlty sticky issues to worry about - on the
Owen> matching side - for instance, we do have key-release bindings as
Owen> well (or I think we decided to add them), so you need to make

Another approach would be to have the keybinding code gloss over this
by removing low-level events it doesn't care about.  I don't know what
the real goal is, though, so I don't know if this is a good idea.

Owen> I suppose it would help with pseudo-vi bindings as well as
Owen> pseudo-emacs bindings, though. You could get things like 'dd' to
Owen> work, though not 'y4w'.

Yeah, vi requires more state than just a keymap.  So does Emacs if you
want to handle prefix arguments.

Owen>  bind "xyz" { "activate-menu" ("File/Quit") }

Hmm.  I hope this doesn't work by looking at the actual menu labels.
That will fail if the program uses gettext.

Tom



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