I've done python -> dll, but not the reverse. I can maybe take a look.
What little I know:
-All the source files that starts with "Cy" are related to python interaction.
-dll functions that can be called from python are listed in files that end with "interface", e.g. CyGlobalContextInterface1.cpp
-Those files that ends with "interface" can be considered as simple indexes that glue py and dll together. They simply redirect the python call to the appropriate "Cy" file which again communicate with the "Cv" files.
-All the pyrthon functions listed in CyGlobalContextInterface1 would probably redirect to a function located in the CyGlobalContext.cpp which would again have a direct line of communication with the CvGlobalContext.cpp.
I can get it working if I add a function to the GC. Seems a bit messy to put it there, though. Where is this CyInterface:shiftKey function defined in dll? I couldn't find it
.
Sorry about that, CyInterface is not in the sdk, it is an object hidden away in the exe. When I work in python it is not always clear to me when I'm using exe or dll functions.. ^^
I think your options are Global Context and CvGame\CyGame
Closest I found was in CyInfoInterface for CvInterfaceModeInfo there is isShiftDown
Didn't know about that one.
Edit: I'll test those functions within CvInterfaceModeInfo right away.
EditEdit: Nope, they all returned False.
print CvInterfaceModeInfo().isAltDown()
print CvInterfaceModeInfo().isShiftDown()
print CvInterfaceModeInfo().isCtrlDown()
print CvInterfaceModeInfo().isAltDownAlt()
print CvInterfaceModeInfo().isShiftDownAlt()
print CvInterfaceModeInfo().isCtrlDownAlt()
I had them called 10 times a second while playing a bit with the buttons in-game.
Those Values are probably only updated when doing something quite specific in-game, like some unit action in the line of "go to" or something.