Add the handling for keyboard