Update master.py with th code for keyboard control mode.