pjheslin / diogenes

Diogenes: an environment for reading Latin and Greek
https://d.iogen.es/d
Other
56 stars 10 forks source link

Problems with typing accented Unicode Greek #70

Closed SnakyGrain closed 3 years ago

SnakyGrain commented 3 years ago

Hi Peter at al.

I am having a problem with the latest version of Diogenes - I suspect it might be a problem with Electron - but the utility I use to type Unicode Greek (RoboGreek) does not seem to play nicely with the text windows. RoboGreek hooks the keyboard and replaces ordinary letters (e.g. 'a') with the appropriate Unicode Greek equivalent (e.g. α). The unaccented letters work fine. However, the way one adds accents in RoboGreek is to type the letter, and then an accent key: RoboGreek stores the last letter typed (e.g. α), then if the 'acute accent' key is pressed it works out the code for ά and the sends a backspace character (to get rid of the α) and then sends the accented character ά. However, these accented characters do not work in Diogenes (in some cases both characters appear (e.g. αά), in some cases no character appears).

This is a particular problem when trying to use the Inflexion search, which does not work with unaccented Unicode Greek, or with betacode.

There are ways around this (one could just type the word in another program and then copy and paste), but I was wondering whether this was anything that could be easily fixed. Alternatively, and this is something I have thought for a while, it might be useful if the inflexion search could display the same flexibility as the Search window, i.e. that you could type Greek without accents (or even BetaCode). Obviously that might result in more results, but users who are after a specific accented form would still have the option of adding diacritics (though not with RoboGreek).

Anyway, thanks again for a great program.

best wishes,

Matthew

pjheslin commented 3 years ago

As you say, this is an issue with Electron. It may be that this is a transient bug which will be fixed when I update Diogenes to use a more recent version of Electron, which I plan to do soon. On the other hand, it seems that RoboGreek, which I wasn't aware of, implements a keyboard in a non-standard way. So there might be a more fundamental incompatibility. You could test it with another application that uses Electron (e.g. Atom) to see if RoboGreek works there.

SnakyGrain commented 3 years ago

Thanks for this. I've just checked now and it doesn't play nicely with Atom either - it seems that sending a backspace followed by another character is the problem for Electron. Or perhaps it reveals some problems in the ancient code that RoboGreek runs (the main code was written years ago in VB6 and still keeps going, and I haven't had the time to switch everything over to vb.net). Anyway, I've now added an option to RoboGreek that allows the user to build the character in a separate window before 'typing' it, and that seems to work fine.

But forgetting RoboGreek for the moment, I still wonder if it might be useful to be able to run the inflexion search without typing accents...

Thanks again for looking into this!

best wishes,

Matthew

pjheslin commented 3 years ago

With respect to inflexion search, I may not be understanding you properly. When I go to Search -> Inflected forms and enter some Greek letters, accents are ignored completely when showing lemmata that match that sequence of letters. So unaccented Greek works fine there -- indeed accents are disregarded in this context. Have I misunderstood?

SnakyGrain commented 3 years ago

Sorry - my fault - I didn't make it clear. I was talking about Lookup / Inflexion rather than Search / Inflected Forms. There φίλον gives a match, but φιλον does not. Obviously there will many cases where the result will depend on the accentuation, but perhaps the user could be presented with a choice of possibilities...

pjheslin commented 3 years ago

Ah, I see what you mean now. Diogenes looks up the form you enter from a long list of inflected forms that all contain accents. There is no easy or quick way to do that lookup without accents. I'm afraid that implementing this properly would require an effort out of proportion to the minor benefit.