abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyModifier.java
AgeCommit message (Collapse)AuthorFilesLines
2026-04-24Fix the spacebar in Hangul combining (#1244)Jules Aguillon1-2/+10
* Fix the spacebar in Hangul combining The encoding for the spacebar changed and the Hangul combining code was not updated. * Change the default layout for Korean
2026-02-19Autocomplete on space bar and undo on delete (#1179)Jules Aguillon1-63/+98
* 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.
2026-02-19Refactor: KeyValue constants (#1180)Jules Aguillon1-3/+3
* Refactor: KeyValue constants Add constants for keys that are accessed from the app's code. This simplifies the fake pointer handling in Keyboard2View. * Refactor: Pre-compute action key replacement The action key and the enter swap are pre-computed in EditorConfig. This simplifies the code.
2026-01-31Avoid loops in modmaps (#1167)Jules Aguillon1-0/+11
It was possible to define a loop that would crash the app with the following modmap: <ctrl a="left" b="left:ctrl,left"/> With this change, modmap are not taken into account while evaluating macros. The modmap above modifies ctrl+left into ctrl+left.
2026-01-30Option to switch to the previously used keyboard (#1165)Jules Aguillon1-1/+2
The "Switch to the last used keyboard" is renamed to "Switching between input methods" and allows to select "Switch to last used", which was the default in older releases.
2026-01-18Add the small capital letters dead key (#1156)Jules Aguillon1-0/+1
* Add the small capital letters dead key It can be added to the keyboard from the settings or into custom layouts as `accent_small_caps`. Add all the symbols listed on https://en.wikipedia.org/wiki/Small_caps
2025-08-31Use the <fn /> mappings first when typing a gesture (#1085)Jules Aguillon1-0/+7
This allows assigning mappings to letters without changing the Shift mappings and making uppercase impossible to type. For gestures, the Shift modifier is still applied first, unless a custom mapping for <fn/> is set for the key.
2025-04-15Add class Modmap and test KeyModifierJules Aguillon1-5/+5
2025-03-15Selection mode (#913)Jules Aguillon1-0/+29
* Selection mode: Space to cancel the selection This adds the "selection mode", which is activated when text is selected in the text box. The selection mode is exited when the selection is cleared. While the selection mode is activated, the Space and Esc keys are modified into the "selection cancel" key, which remove the selection without changing the text. The space bar is otherwise easy to type by accident during a selection and causes the selected text to be deleted. * Selection mode: Move each ends of selection separately with slider When the selection mode is activated, the space bar sliders change how they affect the selection: - The left side of the slider moves the left position of the selection. To shrink the selection from the left side, the slider must be activated by sliding to the left, extending the selection temporarilly, then by sliding to the right. - The right side of the slider affects the right position if the selection.
2025-03-01Add 'delete_word' and 'forward_delete_word' keysJules Aguillon1-0/+7
These keys are the equivalent of ctrl+backspace and ctrl+delete, respectively. They can be reached with Gesture+backspace and Gesture+delete respectively.
2025-02-23Apply compose sequences to String keysJules Aguillon1-22/+38
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-08Remove binding fn+shift = capslockJules Aguillon1-14/+17
This made is hard to type fn+shift. gesture+shift still locks shift.
2025-01-03Lock shift with a gestureJules Aguillon1-0/+10
The circle gesture locks shift. It is also the case for the round-trip gesture if shift is in a corner.
2024-12-31Fn: redo and pasteAsPlainText as undo and pasteJules Aguillon1-0/+11
Allows typing redo and pasteAsPlainText easily with Fn or the round-trip gesture without adding them to the keyboard.
2024-12-19Added tamil layout (#833)Jagadeeshan S1-0/+1
Signed-off-by: Jagadeeshan S <jagadeeshan.s@addverb.com>
2024-12-11Move numpad script maps to the compose systemJules Aguillon1-174/+21
This removes the Map_char interface, which required a lot of boilerplate to use.
2024-12-07Add support for KannadaJules Aguillon1-0/+22
Add language support for Kannada, including a layout and numerals.
2024-12-07Add double grave accent (#779)Zitrone1-0/+1
2024-11-16Don't apply Fn to space bar left and rightJules Aguillon1-11/+0
"home" and "end" on the spacebar slider are not useful.
2024-09-10Define the Shift modifier using the compose mechanismJules Aguillon1-61/+4
2024-09-10Define the Fn modifier using the compose mechanismJules Aguillon1-188/+3
This removes 100Kb from the app.
2024-07-28Map Fn+Cursor_move to home/end (#728)bokidori1-0/+11
Fn modifier switches cursor_left to home key, cursor_right to end key
2024-07-25Allow Ctrl modmaps in layoutsJules Aguillon1-1/+14
The 'ctrl' modmap is different from the other modmaps as it also applies the built-in Ctrl modifier to the resulting character, even if it was first modified by the custom modmap. For example, this will map Ctrl+в to Ctrl+V (not to v): <ctrl a="в" b="v"/> This is intended to add keyboard shortcuts in non-latin layouts. A caveat is that the latin character appears on the keyboard while Ctrl is activated.
2024-06-09Refactor: Remove the KeyModifier cacheJules Aguillon1-29/+3
2024-06-09Move diacritics mapping to the compose state machineJules Aguillon1-582/+62
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-05-25Circle and round trip gestures (#640)Jules Aguillon1-5/+13
This implements clockwise/anticlockwise circle and round trip gestures inspired by Messagease. The circle gestures start after a small threshold to avoid making the regular swipe too hard to aim. The gestures do: - circle: The center symbol with Shift applied, with a fallback on Fn - round trip: Same as the circle gesture but applied to a side symbol - anticlockwise circle: Nothing currently. It is intended to be made configurable per-layout in the future. The new Gesture class keeps track of what the pointer is doing while it moves on a key. It replaces the 'selected_direction' integer.
2024-05-02Hangul support (#595)Jules Aguillon1-0/+110
* Hangul support This works with two new kinds of keys (Hangul_initial and Hangul_medial) that carry a precomposed hangul syllable and act as modifiers. The hangul syllables are composed algorithmically. * Add shift layer to Dubeolsik layout
2024-05-02allow for <fn ...> in <modmap> (#626)alotbsol5551-0/+6
2024-05-02Clear cache when changing layoutJules Aguillon1-1/+8
Due to the modmap, the cache must be cleared when switching layout to or from a layout that contain a modmap. This is broken since 3f6b6fd23, which moves the modmap handling into KeyModifier.
2024-04-25Add more accented characters to KeyModifier.java (#622)JapanYoshi1-3/+67
2024-04-01refactor: Apply the modmap in KeyModifierJules Aguillon1-0/+11
This makes possible to apply other modifiers to mapped keys and ensures that the modmap really override the shift key behavior.
2024-03-18refactor: Implement Compose without global stateJules Aguillon1-11/+2
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-03-18refactor: Allow modifier of other key kindsJules Aguillon1-0/+10
Allow keys of a kind other than Modifier to be a modifier. This requires writing a compareTo function for KeyValue. Fields are compared in this order: Kind, value, flags, symbol.
2024-03-03Gujarati phonetic layout (#562)Yogesh-B1-0/+47
added shift modifier characters Add support for gujarati numerals Co-authored-by: yogesh-b <yogesh@improwised.com>
2024-02-17Compose keyJules Aguillon1-1/+14
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-06Add more Russian vowels combined with acute accentJules Aguillon1-0/+1
2024-01-21Add Russian vowels combined with the acute accentJules Aguillon1-0/+2
2024-01-15Refactor: Clearer names for CHANGE_METHOD* eventsJules Aguillon1-1/+1
The keys are not renamed to retain compatibility.
2024-01-13Refactor: New namespace for preference classesJules Aguillon1-1/+1
2023-12-30Bring the voice IME chooser with a long pressJules Aguillon1-0/+2
2023-12-26Separate arabic layouts with hindu or arabic numeralsJules Aguillon1-2/+2
This reverts the Tusinian layout (1af4e45) and instead introduce a new arabic PC layout with arabic numbers. Layouts are renamed: - arab_pc => arab_pc_hindu - arab_pc_tn => arab_pc
2023-12-26Add layout attribute 'numpad_script'Jules Aguillon1-3/+3
This new attribute is now used instead of 'script' for modifying the numpad according to the selected layout's script. If not provided, it defaults to the value of 'script'.
2023-10-21Add '₽' to Russian layout and to the Fn layerJules Aguillon1-2/+3
Other currencies are moved on the Fn layer for consistency with the compose key.
2023-10-20Add page_up, page_down, home, end to extra keysJules Aguillon1-0/+4
The new keys are placed on the corner of the arrow keys. Key descriptions are added. They are removed from the Fn layer to avoid showing up twice.
2023-09-09Capitalize the first letter of custom keysJules Aguillon1-1/+2
This is more useful than turning the entire string full caps.
2023-09-03Per-script numpadJules Aguillon1-1/+104
The numeric layout and the optional right hand side numpad are modified to show the digits belonging to the script used in the current layout. The numpads are still defined as it was before. The digits are changed in `modify_numpad` if needed.
2023-08-20Add missing combining accentsJules Aguillon1-27/+34
Implement the combinations that were previously not possible and were commented out. Also remove `apply_dead_char` and `apply_combining` and make all dead-keys definitions uniform.
2023-08-20Refactor: Allow combining diacritics modifiersJules Aguillon1-320/+318
Change the API of `KeyModifier.Map_char` to allow returning a string instead of a single 16 bits char. This allows to return combining diacritics. This also gets rid of `apply_map_or_dead_char`, maps can have their own fallback.
2023-08-18Add Bitcoin symbol to Fn+b (#434)Eluc1-0/+1
2023-08-07Add Superscript and Subscript letterssdrapha1-3/+39