basic handling of key events