Re: Setting up global key bindings



>> >  - another way to setup global key bindings ?
>> 
>> what you're doing sounds right for most applications.
>
>does it? I don't think it does. Having hidden key bindings is a very
>bad idea from an UI-design point of view. So in order to bind keys to
>certain actions, these actions should appear in a menu. You can then
>add the keybindings to the menu entries. This gives you documented key

did you read what he wrote? he is talking about binding keys to
*macros* that may not correspond to any existing action in the
system. if you write software that includes, say, guile as an
extension language, then keys can be bound to powerful and complex
operations that do not appear on any menu.

>bindings, no fiddling with GDK events and you can even allow your
>users to reassign key-bindings on the fly. All with writing very
>little code since GTK+ provides a rich and powerful API to handle menu
>accelerators.

all true for the nice "traditional" GTK+ apps that most people are
writing. not true for more complex programs. menu accelerators do not
work reliably for programs with multiple top-level windows, for example.

--p



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