added a key model to handel keyboard events