Re: Alt+Button click and events
- From: "richard boaz" <ivor boaz gmail com>
- To: "Toralf Lund" <toralf procaptura com>
- Cc: gtk-list gnome org
- Subject: Re: Alt+Button click and events
- Date: Wed, 9 Jul 2008 11:20:02 +0200
not sure what's could be going wrong since you didn't supply any code, but...
first, see the accelerator documentation:
http://library.gnome.org/devel/gtk/stable/gtk-Keyboard-Accelerators.html#gtk-accelerator-set-default-mod-mask
and to "see" if the ALT key is pressed, in your mouse callback:
gboolean mouse(GtkWidget *widget, GdkEventButton *event, gpointer nil)
{
static guint modifiers = gtk_accelerator_get_default_mod_mask();
gboolean ALTkeyActive;
ALTkeyActive = ((event->state & modifiers) == GDK_MOD1_MASK) ? TRUE : FALSE;
switch (ALTkeyActive)
{
case TRUE: // do something when pressed
break;
case FALSE: // do something when not pressed
break;
}
}
cheers,
richard
On Wed, Jul 9, 2008 at 10:32 AM, Toralf Lund <
toralf procaptura com> wrote:
I have an odd feeling that this is a stupid question because I'm overlooking something very obvious, but does Alt+Mouse button click have any special meaning in Gtk?
What I mean to say is, I have an application where I draw to a drawing area widget, and also handle various events for it "by hand" via the button-press-event and button-release-event signal, among others. This all works rather fine, but if the Alt button is pressed, my event handlers doesn't seem to "see" the button presses. Is there any obvious reason for this?
- Toralf
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]