Commit Graph

12 Commits

Author SHA1 Message Date
Adrian
105a5a2f33
Added supported key for avoiding the pain of auto-caps (#725) 2024-07-27 12:27:05 +02:00
bokidori
6c786f2a1a
Update accent_circonflexe.json (#719)
Allow combining circumflex \u0302 for Cyrillic vowels, enabling users to express themselves accurately.

ја сам са̂м = I am alone
ја сам сам = I am am

да = yes
да̂ = give

код = at
ко̂д = code

Similar to #437 for aigo.
2024-07-25 23:12:55 +02:00
Jules Aguillon
2696f42144
Allow extending the compose key (#713)
This allows adding more compose sequences without modifying
en_US_UTF_8_Compose.pre.

This is done by grouping sequences files that should be merged together
into a directory. This also allows moving keysymdef.h into that
directory.
2024-07-21 23:37:07 +02:00
Jules Aguillon
91ace060bc Move diacritics mapping to the compose state machine
This replaces the switch cases in KeyModifier.java with JSON files, one
for each diacritic.

The number of states increases from 6727 to 7377. The apk size slightly
decreases (around 3kb).
2024-06-09 11:53:17 +02:00
Jules Aguillon
ecac6a77f8 compose: Compile several starting states
Sequences from several files are no longer merged but compiled to
separate starting states.

The plan is to use that to represent the diacritics.
2024-06-09 11:52:17 +02:00
Jules Aguillon
a886f6eede compose: Fix misbehaving due to encoding errors
Encoding errors in the compose data compiler due to:
- 'UTF-16' adds a BOM, use 'UTF-16-LE' instead
- 'str.encode' returns a byte array, use 'array' to have a 16-bit char
  array.
2024-06-09 10:35:38 +02:00
Jules Aguillon
cf1aaa3bdf Add compose sequences for Greek, Cyrillic, Hebrew and more
Parse key names from keysymdef.h, which is distributed with Xorg. The
Greek, Cyrillic and Hebrew sequences referenced these keysyms.

This increases the number of sequences from 2043 to 2668.
2024-05-29 15:56:08 +02:00
Jules Aguillon
39b3f50aa3 Allow compose sequence ending with more symbols
Change the compose state machine definition to allow final states that
are wider than 16-bits.

This increases the number of sequences that can be used from
en_US_UTF_8_Compose.pre from 2013 to 2043 (of 3201).
2024-05-29 15:02:08 +02:00
Jules Aguillon
940cf0deb8 compose: Parse json files and fix edge cases
There's no json file yet, this was part of an experiment.

Add a missing escape rule and detect colliding sequences.
2024-03-02 19:12:37 +01:00
Jules Aguillon
c2d5b14261 compose: Add a README.md
Mention the source of the sequences files.
2024-03-02 19:11:41 +01:00
Jules Aguillon
63e7ac2e94 compose: Add X11 compose sequences
compile.py implements a parser for X11's Compose.pre files. A lot of
code is necessary to interpret character names but thanksfully, the name
of most characters is contained in the file.

The state machine is compiled into two char arrays which unfortunately
requires an expensive initialisation and allocation.
2024-02-17 23:28:31 +01:00
Jules Aguillon
8c29073260 Compose key
The COMPOSE_PENDING modifier indicate whether a compose sequence is in
progress. The new key of kind Compose_pending sets the current state of
the sequence.

The compose sequences are compiled into a state machine by a python
script into a compact encoding.

The state of the pending compose is determined by the index of a state.
2024-02-17 23:28:31 +01:00