improved key filtering on text-inputs