{
dpyinfo->super_mod_mask = GDK_MOD4_MASK;
}
+
+ state = GDK_HYPER_MASK;
+ r = gdk_keymap_map_virtual_modifiers (keymap, &state);
+ if (r)
+ {
+ /* Hyper key exists. */
+ if (state == GDK_HYPER_MASK)
+ {
+ dpyinfo->hyper_mod_mask = GDK_MOD3_MASK; /* maybe this is hyper. */
+ }
+ else
+ {
+ dpyinfo->hyper_mod_mask = state & ~GDK_HYPER_MASK;
+ }
+ }
+ else
+ {
+ dpyinfo->hyper_mod_mask = GDK_MOD3_MASK;
+ }
}
static void
mod |= mod_alt;
if (state & dpyinfo->super_mod_mask)
mod |= mod_super;
- if (state & GDK_HYPER_MASK)
+ if (state & dpyinfo->hyper_mod_mask)
mod |= mod_hyper;
return mod;
}
if (state & mod_super)
mask |= dpyinfo->super_mod_mask;
if (state & mod_hyper)
- mask |= GDK_HYPER_MASK;
+ mask |= dpyinfo->hyper_mod_mask;
if (state & shift_modifier)
mask |= GDK_SHIFT_MASK;
if (state & mod_ctrl)
{
/* While super is pressed, gtk_im_context_filter_keypress() always process the
* key events ignoring super.
- * As a work around, don't call it while super is pressed...
+ * As a work around, don't call it while super or hyper are pressed...
*/
struct pgtk_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
- if (!(event->key.state & dpyinfo->super_mod_mask))
+ if (!(event->key.state & (dpyinfo->super_mod_mask | dpyinfo->hyper_mod_mask)))
{
if (pgtk_im_filter_keypress (f, &event->key))
return TRUE;
struct frame *last_mouse_glyph_frame;
/* Modifier masks in gdk */
- int meta_mod_mask, alt_mod_mask, super_mod_mask;
+ int meta_mod_mask, alt_mod_mask, super_mod_mask, hyper_mod_mask;
/* The last click event. */
GdkEvent *last_click_event;