abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyValue.java
AgeCommit message (Collapse)AuthorFilesLines
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.
2022-06-05Add the 'accent_slash' modifierJules Aguillon1-0/+3
Might be useful for some math characters.
2022-06-05Stop using flags for modifiersJules Aguillon1-94/+88
There was no free bits left to add new modifiers. Instead of increasing the width of the 'flags' field, refactor the way modifiers are represented and used. Modifers are now represented as independent values and stored in the 'code' field. A flag is added to distinguish between modifiers and keys with a key event. The most notable change is that modifiers can no longer be or-ed into a single value but have to be represented as an array.
2022-05-08Specify localized keys in each layoutsJules Aguillon1-15/+26
Each layouts can chose which key are localized instead of specifying it globally for each key. Important keys are no longer removed from layouts if the 'extra_keys' mechanism is not working properly. This can happen if language tags specified in method.xml don't match the user's language. Removed some currency symbols from some layouts. They are all in the Fn layer.
2022-04-30Fix modifiers not cleared when presses overlapJules Aguillon1-3/+4
When typing fast, a second key might be pressed before the first is released. Clearing modifiers earlier would prevent this but would break modifiers placed in corners (especially the accent keys). Instead, don't take latched modifiers into account when registering the second press. A new flag is needed to not interfere with holding modifers, which is merged with the norepeat flag.
2022-04-24Add Double acute diacriticJules Aguillon1-1/+4
Will be used by the Hungarian language.
2022-04-24Add support for LithuanianJules Aguillon1-1/+5
Requires two new diacritics: ogonek and dot_above. The new accents are also added to the Latvian layout as the two language can be close but not to the other localized layouts. A new mechanism is needed to reproducibly add extra keys to layouts without manual placement.
2022-04-03Add the Programming Layout optionJules Aguillon1-2/+4
Allow specifying a layout for programming and add a key for switching to it easily. The switching key is placed on the top edge of the space bar. The option has no effect by default because the ergonomic isn't ideal, it needs to be enabled explicitly. Users of Latin-script languages certainly prefer to use one layout (for programming or not). This feature might be removed in favor of a better language-switching mechanisms in the future.
2022-04-03Rename the Meta keyJules Aguillon1-1/+1
The symbol isn't clear enough.
2022-04-03Swap Ctrl and switch_numeric keysJules Aguillon1-2/+2
The switch_numeric key is generally more important, especially in the numeric pane.
2022-04-02Update Space GlyphRaphael1-1/+1
Revert to previous version, the original google material icon, which is not rounded, and it looks better with the rest of the keyboard, also more correct to represent the open box unicode space char, instead of a smile
2022-04-02`Arrows` and `Box` system (#114)Raphael1-1/+6
* Add `Arrows` and `Box` accent system
2022-03-31Add non-breaking space as Fn+SpaceArenaL51-0/+1
2022-03-25Add glyphs for Tab, Backspace and DeleteJules Aguillon1-3/+3
Tab is from IcoMoon. Backspace and Delete are from materialdesignicons.
2022-03-19Add F11 and F12Jules Aguillon1-0/+2
These keys are shown only when Fn is activated, "placeholder" keys are placed in the layouts.
2022-03-18Add glyphs for accent keysJules Aguillon1-9/+9
The "dotted circle" character combined with the accent was badly rendered on many devices.
2022-03-18Build all special glyphs from SVGJules Aguillon1-10/+10
Recover the provenance of each glyphs and remove the base_font.ttf file.
2022-03-17Stateless build of the special font fileJules Aguillon1-4/+4
Keep the glyphs in SVG format and build the font using a FontForge script. A part of the previous font is kept because the sources is lost. This adds a new dependency to the build system, fontforge.
2022-03-13Improve symbols for Sup, Sub and OrdJules Aguillon1-3/+3
2022-03-13Define localized keys as a set instead of flagsJules Aguillon1-25/+14
Using flags for removing keys like € and ß need too many flags and won't scale to more localized keys.
2022-03-06Make the font smaller for the action keyJules Aguillon1-1/+6
2022-03-05Clicking twice on CTRL or ALT will lock them in 'ON' state (#72)Raphael1-1/+6
* Clicking twice on CTRL or ALT will lock them in 'ON' state * Make Locking behaviour optional, configurable in preferences * Nest the new settings into a different page To avoid spamming the settings page and repetition in the summaries. Cannot be a popup unfortunately because that would require API >= 11. * Add Fn and Meta Co-authored-by: Jules Aguillon <jules@j3s.fr>
2022-03-05Improve the code for dynamic updates of the layoutJules Aguillon1-1/+0
2022-02-27Reduce the text size for some keysJules Aguillon1-13/+17
The symbols are now smaller for Shift, Space, Backspace, Delete and some keys on the bottom row. The previous rule was to make the text smaller for symbols made of several characters. This is changed to a flag approach.
2022-02-26Update symbols from unicode to font-IconRaphael1-7/+6
2022-02-21Improve modulated key repeatJules Aguillon1-2/+2
Change the formula: don't use an external constant, add a state. It's now the ratio between where the finger is at the first repeat and where it is now. Keep the repeat going when swiping into an other key. Currently only for arrows: It's now possible to go from an arrow to an other without waiting again for the key repeat timeout. The backspace and delete keys don't work well with this.
2022-02-20Move pointer handling code to its own classJules Aguillon1-2/+2
Separate the concerns and have a clearer interface between the two parts of the code.
2022-02-19Localize € and £Jules Aguillon1-5/+6
Show these characters only for users that have the corresponding locale installed (a supported eu language for €, en-GB for £). Add these characters to most layouts.
2022-02-19add-ordinal-numbers-symbol-systemRaphael1-2/+5
2022-02-13Use the improved font for shift, globe, enter and spaceJules Aguillon1-5/+11
These glyph were available in the custom font but not used yet.
2022-02-06Replace unusual return symbolMax Schillinger1-1/+1