added validations to key and keyboards