How can I use gdk_keymap_translate_keyboard_state to get the keysym for a key without modifier?

28 Views Asked by At

To find the keySym of the unshifted key I want to use the function gdk_keymap_translate_keyboard_state on a german Keyboard (key 58 is labeled m,M,µ) I can find KeySyms for different modifierStates like that:

//To get the Keysym (Ret_KeySym) for the Key 58 + **ShiftKey** I can do:

gdk_keymap_translate_keyboard_state (keymap, 58, GDK_SHIFT_MASK, 0, Ret_keySym, NULL, NULL, &consumed); 



//To get the Keysym (Ret_KeySym) for the Key 58 + **CapsLockKey** I can do:

gdk_keymap_translate_keyboard_state (keymap, 58, GDK_LOCK_MASK, 0, Ret_keySym, NULL, NULL, &consumed);     

How can I get the Keysym (Ret_KeySym) for the Key 58 +unshifted ?

gdk_keymap_translate_keyboard_state (keymap, 58, ?????? , 0, Ret_keySym, NULL, NULL, &consumed);   

There is no entry for unshifted in the enum for the keystates...

typedef enum
{
  GDK_SHIFT_MASK    = 1 << 0,
  GDK_LOCK_MASK     = 1 << 1,
  GDK_CONTROL_MASK  = 1 << 2,
  GDK_MOD1_MASK     = 1 << 3,
  GDK_MOD2_MASK     = 1 << 4,
  GDK_MOD3_MASK     = 1 << 5,
  GDK_MOD4_MASK     = 1 << 6,
  GDK_MOD5_MASK     = 1 << 7
  ...
} GdkModifierType;
0

There are 0 best solutions below