abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyValue.java
AgeCommit message (Collapse)AuthorFilesLines
2024-07-27Add new keyevent "menu" (#726)Nils Brederlow1-0/+1
* Update ExtraKeysPreference.java add "menu" to array of extra keys * Update KeyValue.java add menu keyevent
2024-07-21Allow extending the compose key (#713)Jules Aguillon1-1/+1
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-21Improve zwnj/halfspace symbol and Persian layout (#711)Reza Hosseinzadeh1-1/+2
* Fix persian's half-space invisibility * Add a 0.5 space before ظ in persian * Change the place of چ in persian * Change the width of backspace in persian * Rename zwnj to halfspace in KeyValue.java and beng_provat layout
2024-07-06Clipboard pane (#681)Jules Aguillon1-0/+4
This adds the clipboard pane, which allows to save an arbitrary number of clipboards and to paste them later. The key can be disabled in settings. Checking the "Recently copied text" checkbox will cause the keyboard to keep a temporary history of copied text. This history can only contain 3 elements which expire after 5 minutes. If this is unchecked, no history is collected. History entries can be pinned into the persisted list of pins.
2024-06-09compose: Compile several starting statesJules Aguillon1-1/+1
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-05-26Support the nnbsp characterJules Aguillon1-0/+1
2024-05-25Circle and round trip gestures (#640)Jules Aguillon1-2/+9
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-2/+49
* 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 the newline character '\n' in layoutsJules Aguillon1-0/+1
2024-05-02More precise and faster spacebar slider (#593)Jules Aguillon1-5/+20
* Make slider speed independent from swipe distance Swipe distances other than the default resulted in a slider that were not easy to control. * refactor: Add class Pointers.Sliding It holds the states and the code needed to make the slider work. 'Pointer.sliding' is set to [null] when sliding is not in progress. The implementation is changed not to depend on [downX] and [dx] but instead use the pointer's [x] coordinate directly. * Move the cursor further for faster slides In sliding mode, compute the speed of the pointer and use it to increase at which the cursor moves. * refactor: Separate kind for cursor movement keys This allows to define a key that moves the cursor more than one position at a time. This will be used to avoid lag during fast slider movements. * Reduce lag when sliding quickly on the spacebar Avoid sending key events in a loop while sliding quickly in a cursor movement key. Key of kind Cursor_move are "multiplied", meaning a single key event represents a movement of more than one position, reducing the number of key events sent. This is only for cursor move keys.
2024-04-03Fix space key without a symbolJules Aguillon1-1/+6
The symbol on the space key was accidentally lost in be97364 when the string "\r" (Java's only way to write "\x0D") was not replaced by "\xE00D".
2024-03-18refactor: Implement Compose without global stateJules Aguillon1-5/+10
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-1/+13
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-11refactor: Use internal flags in PointersJules Aguillon1-3/+4
'FLAG_LOCKED' and 'FLAG_FAKE_PTR' are only used within Pointers. Define new flags in Pointers and remove these from KeyValue. Also allows to define new flags.
2024-02-17compose: Grey out keys that are not in sequenceJules Aguillon1-5/+7
Keys that are not in the pending compose sequence are greyed out with the new 'FLAG_GREYED' flag.
2024-02-17Fix KeyValue flags layoutJules Aguillon1-17/+22
The kind field wasn't large enough to hold the new Compose_pending kind. The flags field is reduced in size by removing a free spot. The FLAGS_BITS mask is defined in a safer way.
2024-02-17compose: Add glyphJules Aguillon1-1/+1
2024-02-17Compose keyJules Aguillon1-1/+24
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-01-21Move layout definitions into srcs/layoutsJules Aguillon1-3/+3
This separates the layout definitions from the special layouts (bottom_row, greekmath) and other unrelated files (method, settings). This is also a more intuitive location for layouts and make the resource directory easier to navigate. Under the hood, layouts are copied back into build/generated-resources/xml.
2024-01-15Refactor: Clearer names for CHANGE_METHOD* eventsJules Aguillon1-4/+4
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-09-03Remove unused editing keys from the settingsJules Aguillon1-2/+3
These keys don't seem to have a purpose, which is confusing.
2023-08-20Refactor: Allow combining diacritics modifiersJules Aguillon1-8/+9
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-17Fix slider movements changing input focusJules Aguillon1-4/+16
The slider was repeatedly sending arrow keys, which change the focused input when the end of a text box is hit. A new key is added that implements cursor movements using the `InputConnection` API. The new keys are defined as `KeyValue.Editing`, which are no longer only context menu actions. The behavior when a selection has started is changed. The selection is modified instead of cleared even when shift isn't pressed or the selection would become empty. Fallbacks to sending arrow keys for editors that do not support the API, like Termux.
2023-08-06Add glyphs for editing keysJules Aguillon1-13/+23
All from Material Design Icons.
2023-08-06Elide custom keys labelsJules Aguillon1-1/+1
Make the font smaller for custom keys with a length above 1. Draw up to 4 characters on keys.
2023-08-05Translatable key descriptionsJules Aguillon1-20/+0
Key descriptions are shown in the "extra keys" option and can now be translated.
2023-08-02font: Move glyphs into the PUAJules Aguillon1-40/+40
Glyphs in the Private Use Area at uE000 will no longer conflict with fallback fonts in the "extra keys" option.
2023-07-30Allow more than 2 layoutsJules Aguillon1-4/+4
The two layout selection options are replaced by a ListGroupPreference that allow to enter an arbitrary amount of layouts. The "switch_second" and "switch_second_back" keys are replaced by "switch_forward" and "switch_backward", which allow to cycle through the selected layouts in two directions. Layouts are changed to place these two key on the space bar. The backward key is not shown if there's only two layouts.
2023-07-19Refactor: Make KeyValue.makeStringKey publicJules Aguillon1-9/+10
2023-06-28Accept some escaped keys in custom layoutsJules Aguillon1-0/+8
These symbols have special meaning when in `res/xml` and are escaped in standard layouts. The backslash is not stripped when parsed from the custom layout option. Treat these backslashed keys specifically to allow standard layouts to be passed back to the custom layout option.
2023-06-25Add Bengali Provat Layout (#357)Sabbir1-0/+3
* Add Bengali Provat Layout I added bengali_provat layout and renamed old bengali to actual layout name.
2023-06-03Add Voice Typing keyJules Aguillon1-0/+3
The new key switches to any installed "voice" input method. If several input methods matches, no effort is made to choose. Might misbehave with some input methods other than Google's on API < 28. It is placed on the middle of the arrows on the bottom bar. It is enabled by default and can be removed in the "Extra keys" option. The key is not removed from the keyboard if no voice input method exists.
2023-03-03Allow 8 symbols per keyJules Aguillon1-1/+8
'Keyboard.Key' now contains an array of size 9, giving each keyvalue an index. The algorithm for finding the nearest key during a swipe now needs 16 segments, which are now calculated as an angle. The algorithm does one more interation instead of 2 more, slightly reducing the sensitivity of corner values. The 'getAtDirection' function is moved into the Pointers class to clearly separate the two systems. The 'edgekey' attribute is now obsolete but is kept for compatibility. The flag is removed internally, key index are simply translated. Similarly, the 'slider' attribute now act on keys at index 5 and 6 instead of 2 and 3.
2023-02-12Option to switch to the previous input methodJules Aguillon1-0/+2
A new option changes the "change_method" into the new "change_method_prev". It switch to the previously used input method. A long press on "change_method_prev" sends "change_method". A new section is added in the settings and existing options are moved.
2023-02-09Vietnamese keyboard (#291)Kazoku1-1/+6
Added missing accent (horn, hook, dot below) Added layout Added accent font svg (by modified existing accent)
2023-01-31Add layouts 'he_il_1452_1' and 'he_il_1452_2'Ram Kromberg1-1/+45
2023-01-30Fix placeholder key not replacedJules Aguillon1-11/+19
Since fecc4dd, placeholder keys can't be compared by reference. Add a placeholder kind and defined placeholder values.
2023-01-29Remove the explicit hashmap in KeyValueJules Aguillon1-124/+118
Refactoring. Predefined keys are represented by a big switch statement rather than added into a hashmap.
2023-01-22Remove the modulated repeatJules Aguillon1-5/+5
It allowed to modulate the repeat speed of some keys (arrow, backspace, delete) by move the finger farther or closer to the key. In practice, this wasn't pratical and doesn't seem popular. It is removed in favor of a better mechanism for moving the cursor.
2022-12-30Add keys for every context menu actionsJules Aguillon1-1/+16
The most requested keys are undo and redo. Unfortunatly redo doesn't work reliably. The other context menu actions like share, assist and autofill are added even thought they are rarely useful or implemented.
2022-11-13Add editing keys: copy, paste, cut, select allJules Aguillon1-1/+26
2022-11-13Refactor: Use enum values in KeyValue.KindJules Aguillon1-38/+24
instead of maintaining a separate set of constants and a conversion function.
2022-11-13Allow switching quickly between two layoutsJules Aguillon1-2/+4
A new option allow to choose a secondary layout, the switching key is placed on the top edge of the space bar. The "Programming layout" option was basically doing that but it was possible to choose from a few layouts only. It is improved and renamed. The 'LayoutListPreference' allows setting the string for the first entry but otherwise share the rest of the array. Add nice icons from materialdesignicons.
2022-11-11Dim secondary keysJules Aguillon1-9/+11
Reduce the constrast of "secondary" labels. Modifiers (except diacritics), event and keyevent keys are considered secondary.
2022-11-05Add the bar diacritic dead keyJules Aguillon1-0/+2
Allows to type many of the "with stroke" or "with bar" latin letters.
2022-11-05Apply Fn firstJules Aguillon1-2/+2
It's otherwise impossible to type Ctrl+F keys.
2022-10-23Make the shift symbol biggerJules Aguillon1-1/+1
2022-10-23Show keys description in settingsJules Aguillon1-0/+19
The symbols alone might be hard to understand when scrolling through the "extra keys" option.