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

Accelerator Sequences



Dear all,
I would like to implement keyboard accelerators with these features:

a previously defined multiple key sequence, say "abc" (without control, 
shift, alt, +, or any other mask), works the normal way in an activated text 
entry but anywhere else it is seen as an accelerator sequence. I would
like this to work with menuitems but also with buttons (so I can pop up 
menus attached to buttons), and I would like to make these key sequences 
not visible. Can this be done with the features of the current standard 
GTK accelerator? 

This might be just a problem with documentation: apparently there are not 
less than 28 GTK functions dealing with accelerator keys, but the only 
explanation I could find about this was half a page in Eric Harlow's book.
Eric's example works fine with me, is just not enough:

GtkAccelGroup *accel_group;

accel_group = gtk_accel_group_new ();
gtk_accel_group_attach (accel_group, GTK_OBJECT (window));
gtk_widget_add_accelerator (menu_item, "activate", accel_group, 'c',
GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);

Any help? Thanks!

Carlos Pereira,
Technical University of Lisboa,
Portugal



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