dfhack/tools/python/hotkeynotedump.py

20 lines
345 B
Python

2011-03-15 14:33:39 -06:00
from context import Context, ContextManager
cm = ContextManager("Memory.xml")
df = cm.get_single_context()
df.attach()
gui = df.gui
2011-03-15 14:33:39 -06:00
print "Hotkeys"
hotkeys = gui.read_hotkeys()
2011-03-15 14:33:39 -06:00
for key in hotkeys:
print "x: %d\ny: %d\tz: %d\ttext: %s" % (key.x, key.y, key.z, key.name)
df.detach()
print "Done. Press any key to continue"
raw_input()