fixed inputs to only accept valid keys