Add keyboard event handler