abouttreesummaryrefslogcommitdiff
path: root/srcs
AgeCommit message (Collapse)AuthorFilesLines
2022-07-03Compatibility with API level < 24Jules Aguillon1-1/+1
The Math.floorMod method was added on API level 24.
2022-06-24Revert "Remove the vibration settings"Jules Aguillon2-0/+5
Bring back the "Vibration" option. The duration option isn't added back because the vibration settings are still handled by Android. In fact, the option has no effect if the vibration are disabled in the system settings. This partially reverts commit ef03dfed5c802a855c4655204eee39a8769cfed7.
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 Aguillon7-76/+123
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-06Remove the interval between vibrationsJules Aguillon1-12/+3
This is no longer necessary since repeating key no longer cause a vibration.
2022-06-06Remove the vibration settingsJules Aguillon2-17/+4
Instead of using the vibrator directly, use performHapticFeedback, which will integrate better with the system settings.
2022-06-06Fix inconsistent text size in landscape modeJules Aguillon1-4/+8
Dimens weren't refreshed when the orientation changed. Dimens are not the right solution anyway, use scaling factors instead.
2022-06-06Increase horizontal spacing in landscape modeJules Aguillon1-2/+9
Space between the keys and margin on the left and right edges of the screen.
2022-06-06New setting: Keyboard height in landscape modeJules Aguillon1-4/+3
The previous fixed value of 55% was too high. The new default value is 50% and it is customizable.
2022-06-06Don't add extra keys to the numeric paneJules Aguillon1-13/+19
2022-06-06Remove the option "Show every accents"Jules Aguillon1-2/+2
This option cannot be implemented easily now that the set of "accents" (localized keys) isn't defined.
2022-06-06Refactor: Remove KeyValue.nameJules Aguillon6-120/+142
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 Aguillon4-7/+18
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 Aguillon6-202/+212
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 Aguillon5-67/+50
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 Aguillon3-83/+81
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 Aguillon10-242/+357
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-05Turkish layout & translation (#151)erqan1-0/+1
* Turkish layout & translation
2022-06-05Add combining 'accent_arrow_right'Jules Aguillon4-1/+32
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 Aguillon4-0/+31
Might be useful for some math characters.
2022-06-05Stop using flags for modifiersJules Aguillon9-378/+466
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-06-04Add colemak layout (#135)Djuric1-0/+1
2022-05-29Add layout: QWERTY (Hungarian)Jules Aguillon1-2/+3
2022-05-29Automatically place localized keys on the layoutsJules Aguillon3-25/+100
Layouts no longer need to mention every localized keys and dead keys. They are now placed automatically starting from the second row on the bottom-right corner. The "loc " prefix is not removed to still be able to define a more optimal and consistent placement for some extra keys (eg. 'ß' near 's'). Programming layouts no longer need to place every dead keys.
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-05-08Find closest key furtherJules Aguillon1-1/+1
The previous limit was checking d-1 and d+1, the new limit also tries d-2 and d+2.
2022-05-08Fix vibration when pointer move slightlyJules Aguillon2-24/+17
Fix the bug introduced in the parent commit.
2022-05-08Better handling of removed keys and swipe getureJules Aguillon3-34/+42
The "closest key" logic must be careful not to reveal keys removed by a modifier. Must check [_handler.onPointerSwipe] for every candidate values. [selected_value] is changed back to [selected_direction]. This adds a new bug: When the direction change, the selected value might not change but a vibration will be triggered anyway.
2022-05-08Improve nearest key computationJules Aguillon2-79/+35
getAtDirection was too hard to maintain and might contain bugs. Change slightly the meaning of directions and implement a the nearest key calculation as a loop.
2022-05-08only vibrate when the swipe key changesRodrigo Batista de Moraes2-31/+40
2022-05-08use the closest swipe key on swipeRodrigo Batista de Moraes2-19/+106
fix a direction
2022-05-07Set the color of the navigation barJules Aguillon2-0/+34
Since SDK 21, applications can set the background color of the navigation bar. This is normally simply an item in a theme but it is more complicated for keyboards.
2022-05-01Add support for Hungarian layout (#127)Tibor Billes1-0/+1
2022-05-01Fix latched pointers accumulating on the same keyJules Aguillon1-3/+6
It was possible to latch and lock the same modifier several time at the same time independently. Remove that.
2022-05-01Fix crash when IME not enabledJules Aguillon1-1/+2
This is unexpected but happened to a user. Perhaps because the OS returned bogus or fake results in imm.getEnabledInputMethodList ?
2022-04-30Fix modifiers not cleared when presses overlapJules Aguillon2-7/+26
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-30Record activated modifiers on key downJules Aguillon2-19/+25
The View no longer keeps flags for something other than rendering.
2022-04-24Remove build dependency on FontforgeJules Aguillon2-2/+2
The required version of fontforge (from 2020!) is not available in many distros. This is an annoying for contributors and greatly complicated the CI and F-Droid scripts. The generated font file is now included in the sources. Fontforge is still needed when adding new glyphs but this is not a common operation.
2022-04-24Added neo 2 layout (#125)matthiakl1-0/+1
* Added neo 2 layout * Move accents away from screen edge into second row
2022-04-24Add Double acute diacriticJules Aguillon3-1/+26
Will be used by the Hungarian language.
2022-04-24Fix cedilla glyph is invertedJules Aguillon1-4/+6
2022-04-24Add support for LithuanianJules Aguillon4-1/+35
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-16Fix compatibility with Android 6Jules Aguillon3-31/+41
Android 6 uses Java 1.7, the only incompatible feature in use was lambdas.
2022-04-06Fix mismatch layout nameJules Aguillon1-1/+1
The Korean layout id was not consistent and this caused a crash.
2022-04-06Fix compat with older version of AndroidJules Aguillon1-2/+2
Resources.getFloat is new from API 29.
2022-04-03Add the Programming Layout optionJules Aguillon4-12/+44
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.