Compose sequences can end in internal key names

This adds the '\n' and '\t' sequences to showcase the new feature.
This commit is contained in:
Jules Aguillon 2024-09-10 22:16:49 +02:00
parent c886a89b11
commit c57ae83bfa
3 changed files with 5 additions and 1 deletions

View File

@ -3,5 +3,9 @@
"s": "Š", "s": "Š",
"c": "Č", "c": "Č",
"z": "Ž" "z": "Ž"
},
"\\": {
"n": "\\n",
"t": "\\t"
} }
} }

View File

@ -42,7 +42,7 @@ public final class ComposeKey
else if (next_header == 0xFFFF) // String final state else if (next_header == 0xFFFF) // String final state
{ {
int next_length = edges[next]; int next_length = edges[next];
return KeyValue.makeStringKey( return KeyValue.getKeyByName(
new String(states, next + 1, next_length - 1)); new String(states, next + 1, next_length - 1));
} }
else // Character final state. else // Character final state.