Closed aurimasy closed 3 months ago
Logic for entering edit mode on type is here
Right now, it checks if the key pressed is a printable character within the ASCII range from space ( ) to tilde (~).
Tell me if #959 works for you.
Thank you for your fast response.
It looks like /[\p{L}\p{M}\p{N}]/ug.test(event.key) &&
works well with non-English letters in Lithuanian, Russian, German. But it misses other symbols such as +, -, !, etc. Maybe better to use /[\p{L}\p{M}\p{N}\p{P}\p{S}]/ug.test(event.key) &&
in that case?
What symbols are typically shared with the number keys?
The unicode for symbols seems pretty broad:
\p{S} or \p{Symbol}: math symbols, currency signs, dingbats, box-drawing characters, etc.
\p{Sm} or \p{Math_Symbol}: any mathematical symbol.
\p{Sc} or \p{Currency_Symbol}: any currency sign.
\p{Sk} or \p{Modifier_Symbol}: a combining character (mark) as a full character on its own.
\p{So} or \p{Other_Symbol}: various symbols that are not math symbols, currency signs, or combining
added symbols and punctation
What symbols are typically shared with the number keys?
The unicode for symbols seems pretty broad:
\p{S} or \p{Symbol}: math symbols, currency signs, dingbats, box-drawing characters, etc. \p{Sm} or \p{Math_Symbol}: any mathematical symbol. \p{Sc} or \p{Currency_Symbol}: any currency sign. \p{Sk} or \p{Modifier_Symbol}: a combining character (mark) as a full character on its own. \p{So} or \p{Other_Symbol}: various symbols that are not math symbols, currency signs, or combining
I am not sure if \p{Other_Symbol}
is really useful, but it is included with \p{S}
and this shouldn't be an issue.
Anyway, /[\p{L}\p{M}\p{N}\p{S}\p{P}]/ug.test(event.key) &&
does all the work. :)
Steps to reproduce:
Tested in browsers: Google Chrome Version 125.0.6422.113 (Official Build) (64-bit) Firefox 126.0 (64-bit) OS: Windows 11 Pro 23H2 22631.3593