On Thursday, April 19, 2018 at 5:17:36 AM UTC-5, Edward K. Ream wrote:
> I misspoke. Alt-σ or Ctrl-ß certainly *should* be allowed, because
> (unless I am mistaken) σ and ß are, in fact, ascii characters.
>
> I had intended to say that the modifiers should be allowed if, say, 32 <=
> ord(ch) < 128. And to repeat, modifiers should be allowed for keys such as
> Home, End, etc.
>
Note that apparently simple tests can be fraught. There is a bug against
ks.isPlainKey. It ends with:
if s in string.printable:
return True
if len(s) > 1:
return False
return unicodedata.category(s).startswith('C')
Why this fails is mysterious. Perhaps the test should be:
return unicodedata.category(s).startswith('C') if len(s) == 1 else False
But I rather doubt that this will work. Or maybe the test against 'C' is
the culprit.
In any event, these kinds of unicode tests are trickier than I hoped.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.