finished keyboard control