abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/ComposeKey.java
AgeCommit message (Collapse)AuthorFilesLines
2024-09-10Compose sequences can end in internal key namesJules Aguillon1-1/+1
This adds the '\n' and '\t' sequences to showcase the new feature.
2024-06-09compose: Fix misbehaving due to encoding errorsJules Aguillon1-5/+5
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-05-29Allow compose sequence ending with more symbolsJules Aguillon1-16/+33
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-03-18refactor: Implement Compose without global stateJules Aguillon1-11/+6
Thanks to the previous commit, a modifier key can now be more complex than just a KeyValue.Modifier. This allows a more elegant implementation of the compose key, that could be taken as a base for other features (eg. unicode hex entry, hangul) The COMPOSE_PENDING modifier is removed as keys of kind Compose_pending can act as a modifier. This has the advantage of highlighting the key that was last pressed in the sequence. Rules are added to Pointers: Non-special but latchable keys must clear latches and cannot be locked with a long press. These rules were not needed before but were intended.
2024-02-17compose: Grey out keys that are not in sequenceJules Aguillon1-2/+2
Keys that are not in the pending compose sequence are greyed out with the new 'FLAG_GREYED' flag.
2024-02-17compose: Don't remove keys not in sequenceJules Aguillon1-7/+14
Keys that are not part of any possible sequences are now dimmed and still usable instead of being removed, which felt weird.
2024-02-17compose: Add X11 compose sequencesJules Aguillon1-3/+3
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-17Compose keyJules Aguillon1-0/+55
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.