abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyValue.java
AgeCommit message (Collapse)AuthorFilesLines
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.
2022-10-23Refactor: Remove boilerplate for symbol keysJules Aguillon1-33/+49
2022-10-23Add the capslock keyJules Aguillon1-1/+3
The key enable caps lock immediately. It does nothing if caps lock is already enabled. It is not present on the keyboard by default but a place is defined on every layout, top-right of the shift key. It can be enabled in the settings. The icon is from materialdesignicons.com.
2022-10-15Add the breve diacriticJules Aguillon1-16/+22
2022-07-30Fix auto-capitalisation interfering with caps lockJules Aguillon1-0/+1
Add a flag to recognize fake pointers and avoid clearing the intentionally locked shift key.
2022-07-09Add key for switching to the greekmath paneJules Aguillon1-1/+3
The key is placed on the 3rd row of the numeric pane, by taking some space from the shift key.
2022-06-24Fix F12 being turned into F11Jules Aguillon1-1/+6
The "f11_placeholder" and "f12_placeholder" keys were equals since 31d6a70. Add an incrementing id into the unused key value to differentiate placeholder values.
2022-06-24Fix localized key not in predefined positionJules Aguillon1-19/+1
The "loc " prefix for predefining a place for an "extra key" was broken since 31d6a70. The FLAG_LOCALIZED flag cannot be used anymore, as adding it to any key would turn it into a different key that wouldn't be recognized by parts of the code comparing the keys (placing the extra keys). Add an other layer in KeyboardData to store such informations.
2022-06-06Refactor: Remove KeyValue.nameJules Aguillon1-13/+31
This makes KeyValue objects smaller. 'equals' and 'hashCode' are now implemented too. Key names are still used to recognise keys with special meaning, but not for comparing keys anymore.
2022-06-05Fix "REMOVED" key appearing when typing Fn and ShiftJules Aguillon1-0/+2
Since cc571ea
2022-06-05Refactor: Make KeyValue finalJules Aguillon1-1/+1
The class has a complicated internal logic, it is no longer reasonable to extend it.
2022-06-05Refactor: Merge KeyValue._code and _flags fieldsJules Aguillon1-40/+54
With a small number of flags now, it's possible to remove one more field.
2022-06-05Refactor: Separate Events and Keyevents and use enumsJules Aguillon1-122/+127
Negative values for internal events are preventing further refactoring. Add a new kind of key and split internal events (now Event) and Android's key events (now Keyevent). Use enums events and modifiers outside of the KeyValue class. Internally, they are converted to and from integer.
2022-06-05Refactor: Merge KeyValue.char and code fieldsJules Aguillon1-52/+43
These two fields couldn't have an interesting value at the same time. As we can no longer rely on a special value to distinguish between what's the kind, the kind of the key is explicitly encoded in the two most significative bits of the _flags field. Extra nice thing: This removes the special values 'EVENT_NONE' and 'CHAR_NONE'.
2022-06-05Refactor: Associate key events in KeyModifierJules Aguillon1-62/+12
Two advantages: - No need to distinguish modifiers in KeyEventHandler. The KeyValue is enough to decide what action to do. - Keys are never a Char and Event at the same time, fields can be merged.
2022-06-05Refactor: Abstract KeyValue fieldsJules Aguillon1-13/+75
The meaning of the public fields of KeyValue was quite complicated and not handled consistently accross the app. Make these fields private and add a more abstract API on top. The meaning of these fields changed recently and it wasn't an easy change. I plan on making more changes in the future.
2022-06-05Add combining 'accent_arrow_right'Jules Aguillon1-0/+2
It's the first modifier that uses combining diacritics. Whether it should be represented as a modifier or a new kind of key can be reconsidered later.