Setting flags to control Keyboard behaviour.