more pythonic changes, repair global key press, add and reassign keys