I'm writing a leap motion blender input plugin, largely because the existing efforts seem to have stalled.
One of the problematic issues with the leap is that after moving / scaling / rotating an object, there's no good way to 'stop' the leap input. Even using both hand, the leap often awkwardly tracks tiny jitters as you change gesture or add/remove hands.
The best solution seems to be to control the input of the leap by keyboard input; eg. hold down control to designate input mode, and release it to 'drop' the object or stop rotating the camera.
However, I'm having trouble trying to catch this sort of input from the plugin api.
I've looked at
bpy.context.window_manager.keyconfigs, but it doesn't seem helpful.
How can I catch the input of keydown / keyup on control keys?
It's worth noting that I have explored the idea of adding new keyconfig's to 'start leap mode' and 'stop leap mode' using operators (eg. cntl -Z start, cntl-shift-Z stop, or whatever) but finding free easy-to-press key bindings is really tricky and it is, practically speaking, really awkward. So uh... if you were going to suggest that, dont? It's not really a good solution.
(Incidentally, the existing efforts at leap bindings were all tease and no action, frustratingly; that sucks. If you want to see what I've done, such as it is, the source is located here: https://github.com/shadowmint/leap-blender)