Question

I have noticed that I cannot enter Russian or Arabic text in NSSecureTextField.

If my keyboard is set to Russian, for example, as soon as I click on NSSecureTextField, my keyboard automatically changes to English which then reverts back to Russian when I exist NSSecureTextField.

Similarly, I cannot set my keyboard to Arabic as long as a NSSecureTextField is active.

There may be more languages other than Arabic and Russian.

Why doesn't NSSecureTextField support passwords in some languages? Are there any security issues? Will it break OSX Keychain?

I need to know so that if I override this behavior, I will be aware of the possible side effects.

Secondly, is there any custom NSSecureTextField like control that supports all languages? My search returned nil.

Was it helpful?

Solution

NSSecureTextField restricts the available input methods to avoid displaying password text as inline marked text or in an editing window. This also disables some multiple-key “dead key” combinations, used to input accented characters, for example.

About Input Methods

Some input methods display your input in an intermediate form before committing it, in order to let you perform language- or writing system-specific operations that interpret clicks and keyboard input specially while you're entering the text. Some display text "inline" in a text view, where the text will ultimately end up, and some display the intermediate input in a separate floating window.

For example, the Hiragana input method for Japanese displays inline text in which you can choose different interpretations of the input before committing it to the text content. Another example is when entering accented characters via "dead keys", where you first enter the accent, then the base key: the accent is displayed as inline text highlighted in yellow.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top