x11 - Register hotkey with only modifiers in Linux -


i'm using this sample set hotkey in program in linux x11 graphic system. problem don't understand how set hotkey combinations ctrl+alt , ctrl+shift, i.e. without key, modifers. i'm trying this:

keycode key = xkeysymtokeycode(display, 0); //no key code xgrabkey(display, key, controlmask | shiftmask, grabwin, true, grabmodeasync, grabmodeasync); 

but it's not working. however, working (kind of):

 keycode key = xkeysymtokeycode(display, xk_alt_l); //alt key  xgrabkey(display, key, controlmask, grabwin, true, grabmodeasync, grabmodeasync); 

i don't solution, because:

  1. logically wrong
  2. it's fires when ctrl+alt pressed, not alt+ctrl, i.e. pressing order important
  3. it's blocking other combinations in windows ctrl , alt keys.

what doing wrong?


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -