Control restriction

My question is briefly that the player controls will be turned off, so we will lock the keyboard, but if the camera-controlled player is on, I wonder if the player will be able to look right and do all the controls. lockable keyboard, we will only allow certain keys to be pressed.