abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Config.java
AgeCommit message (Collapse)AuthorFilesLines
2025-07-01Fix extra bottom margin when navbar buttons absent (#1024)Jules Aguillon1-3/+0
* Fix extra bottom margin when navbar buttons absent Fix the extra space that was appearing when the gesture-navigation bar didn't contain the "switch IME" or "close IME" buttons. This was found on OneUI 7 with the two "keyboard key" related options turned off. * Remove unneeded nav bar detection and width computation
2025-06-29Add option to also disable number entry layout (#1007)Matej Drobnič1-3/+8
2025-05-30Fix high keyboard height making it overflowsJules Aguillon1-7/+3
The calculation for the size of each rows now avoid making the keyboard bigger than the screen if the Keyboard Height option is unusually high. The height calculation with the default settings is changed slightly, it is now assuming that a layout is 3.95 rows high instead of 4. This is because the bottom row is usually 0.95% the size of other rows.
2025-05-22Better support for foldable devices (#982)Matej Drobnič1-14/+43
* Add AndroidX WindowManager unfortunately, this seems to be the only way to get fold state, native Android APIs are internal. To add this, we need to update some dependencies, raise java version and raise compile SDK. * adds separate layouts and separate layout settings for folded and unfolded state of the device. The affected settings are: + the margin bottom settings + the horizontal margin settings + the keyboard height settings * Update shell.nix
2025-03-27Remove symbols from the number row by default (#964)Jules Aguillon1-3/+11
The number row option is changed into a ListPreference and controls whether the number row contains symbols or not. Co-authored-by: Joey Schaff <j@jaoh.xyz>
2025-02-03Even slower slidedzaima1-1/+1
2025-01-11Make the space bar slider slightly less sensitiveJules Aguillon1-1/+1
2024-12-26Refactor: Move code to LayoutModifierJules Aguillon1-217/+1
Layout modifying functions are removed from Config to LayoutModifier as static classes. The two classes are (weakly) mutually dependent, the refactoring is purely for the purpose of making shorter classes. The only change is that 'modify_numpad' is changed to remove duplicated code. This has the side effect of making the "double tap for caps lock" option affect the shift key in the numpad.
2024-12-26Proper support for Android 15 edge-to-edge (#848)Jules Aguillon1-0/+3
The keyboard background now extends under the system bars and display cutout on Android 15 but the keys do not. The back and IME switching buttons that appear in the navigation bar require special care to not overlap with the keyboard. The launcher and settings activity are also fixed.
2024-12-18Fix crash when opening the numpadJules Aguillon1-5/+12
2024-12-11Move numpad script maps to the compose systemJules Aguillon1-6/+6
This removes the Map_char interface, which required a lot of boilerplate to use.
2024-12-06Persist state of clipboard history checkboxJules Aguillon1-0/+6
2024-10-27Stable extra keys position when number row is addedJules Aguillon1-2/+2
Add the extra keys to the keyboard before the number row is added, as that interferes with the "preferred pos" system.
2024-10-26Rosé Pine Theme (#788)Kalan Walmsley1-0/+1
2024-09-29Add complex keys (#774)Jules Aguillon1-2/+1
This allows to add new kinds of keys that need more data without making KeyValue's footprint bigger for common keys. This changes the [_symbol] field into [_payload], which holds the same as the previous field for more common keys but can hold bigger objects for keys of the new "Complex" kind. This also adds a complex key: String keys with a symbol different than the outputted string. Unit tests are added as the Java language is not helpful in making robust code.
2024-09-21Increase default label size (#747)bokidori1-1/+1
Change default label size to 1.15
2024-07-06Add locale_extra_keys keyboard attributeJules Aguillon1-1/+1
This attribute can be used to disable adding the extra keys from method.xml.
2024-07-06Add support for Android 12+ dynamic colors (#647)TadaCZE1-1/+7
2024-07-06Clipboard pane (#681)Jules Aguillon1-0/+2
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-30Option to disable key repeatJules Aguillon1-0/+2
Internally "key repeat" is reword into "long press" when the same mechanism was used for both features. The constraint that 'timeoutWhat' must be set to '-1' when no message is expected has been lifted to simplify the code.
2024-06-09Option to tweak or disable the circle gestureJules Aguillon1-0/+2
2024-05-29Fix uninitialized bottom_row when editing custom layoutJules Aguillon1-10/+26
This happen when opening the settings from the launcher activity without ever opening the keyboard. To remove this bug entirely, the KeyboardData.init method is removed, the pieces needing initialization are now cached in Config.
2024-05-02More precise and faster spacebar slider (#593)Jules Aguillon1-1/+1
* 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-02-28Modify the number row according to the numpad scriptJules Aguillon1-11/+25
The same way as the numpad is modified.
2024-02-28Fix localized numpad outputing wester arabic numbersJules Aguillon1-2/+2
The number keys were constructed in the wrong way: the rendered symbol was correct but not the underlying character that is typed.
2024-02-22Ensure the layout contain the config keyJules Aguillon1-0/+3
Without the config key, the user risk being locked in a custom layout that lacks an escape key like 'switch_numpad', 'change_method', etc..
2024-02-14Don't invert the pin entry layoutJules Aguillon1-0/+21
The pin entry layout shouldn't be inverted as the letter indications would be meaningless and the order would be opposite to what the option specifies. The enter and action key are swapped as the automatic swapping is also removed.
2024-02-10Fix various linter warningsJules Aguillon1-1/+1
Among others: - Use `apply` instead of `commit` when saving shared preferences. - Avoid inlined Api - Remove unused resources
2024-02-10Drop support for Android versions below 3.0Jules Aguillon1-7/+3
Android 3.0 (API level 11) was released in Feb 2011. These versions were already unsupported due to unavoidable calls to: - MotionEvent.getActionMasked() (API 8) And avoidable calls to: - SharedPreferences.Editor.putStringSet() (API 11)
2024-02-10Custom border settings (#524)RetrogisusDEV1-0/+7
2024-01-28Redefined the key margin options in percentJules Aguillon1-9/+6
Define the key margin options relative to the baseline dimensions of keys. This removes the doubling of the horizontal margin in landscape mode.
2024-01-26Send down event for modifiers on timeJules Aguillon1-1/+2
This allows to use modifiers in combination with other inputs like a mouse click, for example under termux-x11. The key down event and notification about modifiers changing are sent down to KeyEventHandler. A mutable state remember for which modifier down events have been sent. When pressing down a modifier with one finger and typing with the other, it might appear that the modifier is released after the first time an other key is pressed and then pressed and released for the following keys. This prevents unintentionally type two modified keys instead of one when the second key is pressed while the other is not yet released.
2024-01-15Always show the keyboard switching keyJules Aguillon1-4/+0
Android's shouldOfferSwitchingToNextInputMethod() method might return false when an other IME is installed, perhaps when the other IME doesn't specify android:supportsSwitchingToNextInputMethod="true".
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/+4
2024-01-10prefs: Show custom layout names if providedJules Aguillon1-1/+1
Show the name of custom layouts in the list if it's provided using the `name` attribute. This should make managing several custom layouts easier.
2024-01-09Revert "Remove the vibration settings"Jules Aguillon1-3/+6
This reverts commits ef03dfed5c802a855c4655204eee39a8769cfed7 and ff01678ba688778d67f824a0be56634974c1b0e8. The "vibration duration" slider is bought back. The "vibration enabled" option is replaced by "custom vibration", which switch between the system haptic feedback or the custom vibration. The slider is greyed when "custom vibration" is unchecked and is allowed to have a value of 0 to disable vibrations within the app. The intermediate values "light", "medium" and "strong" are removed and no migration of the setting is made.
2023-12-30Bring the voice IME chooser with a long pressJules Aguillon1-0/+1
2023-12-30Voice IME chooser popupJules Aguillon1-0/+5
Bring a popup for choosing the voice IME when the voice key is pressed for the first time or the list of voice IMEs installed on the device change. A preference stores the last selected IME and the last seen list of IMEs.
2023-12-26Add layout attribute 'numpad_script'Jules Aguillon1-6/+5
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-11-19Separately persisted current layout in landscape modeJules Aguillon1-4/+18
Remember the selected layout in portrait and landscape mode independently. This allows to define a layout specific to landscape without having to switch manually.
2023-11-19Persist current selected layoutJules Aguillon1-0/+10
2023-11-19Add Desert and Jungle themesRetrogisusDEV1-0/+2
2023-09-15Refactor: Preferred positions for extra keysJules Aguillon1-9/+11
The new PreferredPos class represents where an extra key should be placed Currently used to place keys at the same positions they were placed before.
2023-09-10Refactor: Compute key positions in layoutsJules Aguillon1-2/+2
`KeyboardData.getKeys()` now returns a map of the keys present on the layout to their position. Positions are the row, column and swipe direction. The computed map is cached in the KeyboardData object as it might be accessed later by `findKeyWithValue`, which now do less work.
2023-09-03Per-script numpadJules Aguillon1-6/+11
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-09-03Consistent layout for optional numpadJules Aguillon1-1/+1
Modify the optional right hand numpad the same way as the numeric layout.
2023-08-26Disable automatically Shift when pressing CtrlJules Aguillon1-0/+1
Automatic capitalisation might interferes with keyboard shortcuts.
2023-08-16Fix inconsistent initial spacing between keysJules Aguillon1-1/+1
Settings defined with `get_dip_pref` had a wrong default value on first launch. The "right" default value was used after the shared preferences are populated.
2023-08-16Migrate layouts preferencesJules Aguillon1-0/+42
The new `layouts` preference replaces three previous preferences: layout second_layout custom_layout Add a preference migration function, which first migration is to migrate layouts into the new preference. The migration must also be called from the SettingsActivity as it might use a different preference store due to the boot-aware preference copy.