Fixed a bug in keymap.py Also moved installation thread code to another file