asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.9k stars 299 forks source link

Greek vowels with special accents are split into diacritic-letter pair during typing #588

Open cdokolas opened 1 year ago

cdokolas commented 1 year ago

Some letters with accents are produced by "dead key" combinations (see Keyboard layouts with dead keys).

In the modern Greek language (not ancient Greek), there are certain accent combinations in common use. These are implemented in the Greek Layout and there are three main dead key combinations: SHIFT-;, SHIFT-:, and CTRL-ALT-;, producing the "accented vowel", "vowel with 'dialytika'" and "vowel with accent and 'dialytika'".

Sample with iota:

Note: Not all vowels can take on 'dialytika'. The only ones that do are iota and iota and upsilon.

The problem: When a dead-key combination involving 'dialytika' is used the output is with the diacritic on the left of the plain vowel, instead of the correct codepoint. I.e. ¨ι instead of ϊ and ΅ι instead of ΐ.

I suppose that there could be such combinations in other languages that reproduce the problem.

rahmanusta commented 11 months ago

Hi,

I need some more info. If it is about shortcuts, you can customize it on Settings.

https://github.com/asciidocfx/AsciidocFX/releases/tag/v1.8.6

cdokolas commented 11 months ago

@rahmanusta: This has nothing to do with shortcuts. Any other way I can be helpful?

gillesB commented 11 months ago

AsciidocFX uses Ace as editor, so the problem could also be located there. Have you e.g. tried to the special accents there? You can test them e.g. here: https://ace.c9.io/build/kitchen-sink.html

cdokolas commented 11 months ago

AsciidocFX uses Ace as editor, so the problem could also be located there. Have you e.g. tried to the special accents there? You can test them e.g. here: https://ace.c9.io/build/kitchen-sink.html

No success duplicating during testing. I tried changing some of the settings, but everything kept working fine. Do you know of any specific settings I should enable/disable?

Here is the output from the debugger window when typing the Iota with 'dialytika': ϊ (U+03CA):

{ _: "keydown", range: [0,0], value: "\n\n\n\n\n\n\n\n", key: { code: "ShiftLeft", key: "Shift", keyCode: 16}, modifier: "shift-"},
{ _: "keydown", range: [0,0], value: "\n\n\n\n\n\n\n\n", key: { code: "Semicolon", key: "Dead", keyCode: 59}, modifier: "shift-"},
{ _: "keyup", range: [0,0], value: "\n\n\n\n\n\n\n\n", key: { code: "Semicolon", key: "Dead", keyCode: 59}, modifier: "shift-"},
{ _: "keyup", range: [0,0], value: "\n\n\n\n\n\n\n\n", key: { code: "ShiftLeft", key: "Shift", keyCode: 16}},
{ _: "keydown", range: [0,0], value: "\n\n\n\n\n\n\n\n", key: { code: "KeyI", key: "ϊ", keyCode: 73}},
{ _: "keypress", range: [0,0], value: "\n\n\n\n\n\n\n\n", key: { code: "KeyI", key: "ϊ", keyCode: 970}},
{ _: "input", data: "ϊ", inputType: "insertText", range: [1,1], value: "ϊ\n\n\n\n\n\n\n\n"},
{ _: "keyup", range: [1,1], value: "ϊ\n\n\n\n\n\n\n\n", key: { code: "KeyI", key: "ι", keyCode: 73}},