TGMainFrame BindKey

Hey all!

I have not found this anywhere:

Can someone plz tell me, how to find the right integers for TGMainFrame’s BindKey (http://root.cern.ch/root/html/TGMainFrame.html#TGMainFrame:BindKey). Especially I don’t know what int is to use for the modifier. For the keycode i found some pages, but the keycodes are no integers.

Furthermore:
Am i assuming right, that the Bool “BindKey” changes to False, if i press the right key (or combinations)?

At the moment i have

self.ctrl = self.BindKey(self,0,0)

, where self of course is a TGMainFrame. The zeros are only for dummy purposes.

Thx, Cheers,

Daniel

Daniel,

this is outside my expertise, you’ll likely get better response on the ROOT Support subforum.

However, searching through the ROOT sources shows that the first integer argument should be of this kind:gVirtualX->KeysymToKeycode(kKey_Up) and the second, the modifier, is a flag of such kind:kKeyShiftMask | kKeyLockMask
You’ll find all these constants defined in $ROOTSYS/include/KeySymbols.h.

HTH,
Wim