error handling; keyboard behaviour