update code for keyboard