Python script for keyboard robot control