davidlallen
Deity
Attached is a small chunk of python which gives the user finer control over the camera to make cool screenshots, via some keyboard bindings. I did not write this, and I don't know exactly where it came from, probably it has been around for a while. It would go into the vanilla CvEventManager.py in onKbdEvent.
I have some python on top of BUG using 3.19. I have hooked into a number of events like onEndGameTurn using the BUG event manager. I cannot quite figure out how to attach these keyboard bindings. I see addShortcutHandler, but it is not clear how to use it. I can hook a simple key like "a" but I cannot figure out how to hook arrow keys, and the ctrl and shift variants.
What is the right magic word to bind ctrl-left-arrow in addShortcutHandler?
Also, I see that somebody has already bound these keys, since they cause a selected unit to move around or to queue a move order. Will I be able to bind on top of these keys, or is somebody stronger than BUG already binding them?
I have some python on top of BUG using 3.19. I have hooked into a number of events like onEndGameTurn using the BUG event manager. I cannot quite figure out how to attach these keyboard bindings. I see addShortcutHandler, but it is not clear how to use it. I can hook a simple key like "a" but I cannot figure out how to hook arrow keys, and the ctrl and shift variants.
What is the right magic word to bind ctrl-left-arrow in addShortcutHandler?
Also, I see that somebody has already bound these keys, since they cause a selected unit to move around or to queue a move order. Will I be able to bind on top of these keys, or is somebody stronger than BUG already binding them?