abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/ComposeKey.java
AgeCommit message (Collapse)AuthorFilesLines
2026-02-19Autocomplete on space bar and undo on delete (#1179)Jules Aguillon1-4/+8
* Refactor: Implement the space key as an editing action The space key is no longer a CHAR key but now an EDITING key. This allows changing the behavior of the space bar while allowing custom layout users to define a key outputing a space as before. KeyModifier and ComposeKey are updated to treat the space key as before. * Enter the best suggestion when the space bar is pressed * Refactor: Implement backspace as an editing action * Undo suggestion when delete is pressed The delete key (backspace internally) undoes the suggestion if the last action done was entering the suggestion with either the space bar or the candidates view. * Add an option to enable space bar autocomplete This option is off by default. Undoing a completion with backspace works in any case. * Refactor: Track selection emptyness in CurrentlyTypedWord This removes an expensive RPC call.
2025-02-27Fix crash due to empty strings in keysJules Aguillon1-1/+3
2025-02-23Apply compose sequences to String keysJules Aguillon1-17/+25
This is mostly useful for characters that do not fit on a single 16-bit char. Shift sequences for 𝕨𝕩𝕗𝕘𝕤 are added for illustration.
2025-02-08Add a glyph for cancelling the compose keyJules Aguillon1-1/+1
2025-02-04Pressing the compose key exits the pending sequenceJules Aguillon1-1/+3
Allows stopping a compose sequence without typing anything. This is also a more intuitive behavior rather than starting a new sequence.
2024-12-11Move numpad script maps to the compose systemJules Aguillon1-1/+1
This removes the Map_char interface, which required a lot of boilerplate to use.
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.