complex hotkey

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

complex hotkey

kyanh-2
hi all,

some KDE applications have some complex hotkey (like Emacs:) for
example, `control +meta +K +E', `control +meta +X +F', etc.

Is there any way to implement this feature for a GTK application?

Thank you for reply.

[hidden email] [ http://winefish.berlios.de/ ]

_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: complex hotkey

Paul Davis
On Wed, 2006-02-01 at 12:41 +0100, [hidden email] wrote:
> hi all,
>
> some KDE applications have some complex hotkey (like Emacs:) for
> example, `control +meta +K +E', `control +meta +X +F', etc.
>
> Is there any way to implement this feature for a GTK application?

depends on what you mean by implement.

Gtk accelerators are by definition combinations of a single non-modifier
keyval with 0 or more modifiers. You therefore cannot use Gtk
accelerators for this purpose.

You can write your own key handling code, probably using either the
key_press and key_release events on a top level window, or a keysnooper.
This code is free to do anything it wants.

--p


_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: complex hotkey

kyanh-2
Hi,

> depends on what you mean by implement.
>
> Gtk accelerators are by definition combinations of
> a single non-modifier
> keyval with 0 or more modifiers. You therefore cannot use Gtk
> accelerators for this purpose.
>
> You can write your own key handling code,
> probably using either the
> key_press and key_release events on a top
> level window, or a keysnooper.
> This code is free to do anything it wants.
>
I am currently use `keysnooper' for autocompletion.
It's quite hard... (in my opinion).

I asked the question as I wondered there's an easy way.

Thank you very much!

kyanh

_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list