You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type any non-English letter with a keyboard (e.g. Lithuanian ž, German ö, or Russian ш). The cell does not enter edit mode.
Typing the letters that are the same as English enters edit mode.
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
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
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. :)
Activity
BrianHung commentedon Jun 1, 2024
Logic for entering edit mode on type is here
glide-data-grid/packages/core/src/data-editor/data-editor.tsx
Lines 3339 to 3359 in 5983dca
Right now, it checks if the key pressed is a printable character within the ASCII range from space ( ) to tilde (~).
BrianHung commentedon Jun 1, 2024
Tell me if #959 works for you.
aurimasy commentedon Jun 3, 2024
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?BrianHung commentedon Jun 4, 2024
What symbols are typically shared with the number keys?
The unicode for symbols seems pretty broad:
BrianHung commentedon Jun 4, 2024
added symbols and punctation
aurimasy commentedon Jun 5, 2024
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. :)