keyboard command, cleaned code from inside main