keymap now controls which events to wait for

keymap elements are dicts at last =)
updated todos