abouttreesummaryrefslogcommitdiff
path: root/srcs
AgeCommit message (Collapse)AuthorFilesLines
2023-01-15Avoid switching back from secondary layout automaticallyJules Aguillon3-27/+64
Stay on the secondary layout after a config refresh or onStartInputView. The information is kept until the keyboard is restarted. Additionally, move tweaking the secondary layout to the Config class now that physical equality is not needed.
2023-01-15Separate option for bottom margin in landscape modeJules Aguillon2-4/+4
A large margin in portrait mode is desirable but generally not in landscape mode.
2023-01-15Separate option for horizontal margin in landscape modeJules Aguillon2-17/+25
A separate option is needed, the +25dp offset wasn't enough.
2023-01-14Add layout 'qwertz_sk'Jules Aguillon1-0/+1
Co-authored-by: Jozef Kundlak <ingjozefkundlak@gmail.com>
2022-12-31Fix dimensions going off after rotationJules Aguillon1-24/+13
Values like 'characterSize' and 'horizontalMargin' can't be fed back into the default value because they are not of the same unit. To avoid this happening again, change the way the default value is defined for every options. The 'key_height' dimension was no longer used.
2022-12-30Add keys for every context menu actionsJules Aguillon3-9/+44
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-12-29Fix inaccessible text layout from pinJules Aguillon2-4/+4
The "main" layout can now be pin layout. 'SWITCH_TEXT' and 'SWITCH_SECOND_BACK' don't mean to use that.
2022-12-14Fix pin entry layout not showing upJules Aguillon1-0/+2
The regular text layout was showing instead of the pin entry due to a misuse of the 'switch' syntax.
2022-12-14Fix a crash on API < 12Jules Aguillon1-1/+2
'extra_keys_subtype' can be none on API level < 12 when the "accents" option is tweaked.
2022-12-14Fix keyboard not showing up after rotationJules Aguillon1-4/+4
'setInputView()' must be called on every 'onStartInputView()', not just when the view is re-created. This is broken since bf31872.
2022-12-11Make the keyboard transparent (#252)Chasm Solacer2-4/+13
* Add option for keyboard opacity (transparency). Keyboard background, keys and pressed keys can be adjusted separately. * Make the borders transparent as well * Moved setAlphas outside drawKeyFrame to top of onDraw method
2022-12-11Handle configuration change quicklyJules Aguillon2-36/+37
setInputView() was not called when the view was re-created through refresh_config(). Also, the refresh_config() function was not able to properly set the current layout. Now keep the default layout (_localeTextLayout) and the current non-text layout (if any, _currentSpecialLayout) separately to be able to refresh them later. setInputView() is called everytime the view is created instead of by onStartInputView() specifically. The setting activity now save the preferences to the protected storage in onStop() instead of listening for onSharedPreferenceChanged.
2022-12-11Improve emoji pane layoutJules Aguillon3-63/+48
The measurement function was wrong in some situations. Set a width for columns and properly configure the GridView.
2022-12-11Fix keyboard not reacting to changed preferencesJules Aguillon1-1/+1
The callback might not be called if the "default" shared preferences is different from the shared preferences actually used. This is unexpected but seems to happen half of the time on Android 12. Since f1ce6ab, this callback is critical to update the keyboard. Restarting the application can no longer solve these issues.
2022-12-11Added qwerty_pl layout (#251)Chasm Solacer1-0/+1
* Updated pl translation * Added qwerty_pl.xml – QWERTY (Polski) layout
2022-12-10Add option 'numpad_layout'Jules Aguillon2-6/+47
Allow choosing whether to show the high or the low digits first. The numeric pane and the numpad are affected by the option.
2022-12-04Correctly handle pointer cancel eventsJules Aguillon2-7/+5
The cancel event ends the motion, it doesn't apply to a single pointer like it was previously expected.
2022-11-26Improve glyph of accent_barJules Aguillon2-9/+6
The small bar on the middle of the dotted circle looked like a small arrow. Make the bar span the whole circle, not on the middle.
2022-11-26Allow using a custom layoutJules Aguillon2-1/+26
Add an option for specifying an XML layout description as a string. The option is a bit rough at the moment: - No documentation, users have to be aware of the keyboard's code to use this option. - No error are shown, the layout will fallback to qwerty on error.
2022-11-26Refactor: Use XmlPullParser directlyJules Aguillon1-20/+36
XmlResourceParser is convenient but cannot be easily instantiated.
2022-11-26Refactor: Pass layout as a KeyboardData instead of IDJules Aguillon3-67/+80
Parse layouts sooner.
2022-11-26Make fake pointers not lockableJules Aguillon1-3/+3
Especially annoying now that modifiers are not locked by a double tap.
2022-11-26Stop using deprecated 'shouldOfferSwitchingToNextInputMethod'Jules Aguillon1-1/+4
This function has been introduced in API 19 and deprecated in API 28. There was no version check for API 19 but instead of adding these, simply remove the feature for API under 28.
2022-11-13Fix missing version checkJules Aguillon1-7/+10
setSystemGestureExclusionRects is API 29. Broken since d644d2b, which almost got into the release!
2022-11-13Draw borders and update themesJules Aguillon2-4/+53
Themes can define the color of each borders independently. Every borders must have the same width for now. It's possible to set a different width when the key is activated, thought this is only used to remove borders. The 4 themes are updated to take advantage of borders.
2022-11-13Highlight activated keys labelJules Aguillon1-3/+2
Rendering change only.
2022-11-13Add editing keys: copy, paste, cut, select allJules Aguillon3-1/+48
2022-11-13Refactor: Move editing code from to KeyEventHandlerJules Aguillon7-101/+104
Remove the code dealing with InputMethodConnection from 'Keyboard2' and move it into 'KeyEventHandler', where more editing actions can now be implemented. Autocapitalisation is also moved, the IReceiver interface is simplified.
2022-11-13Refactor: Use enum values in KeyValue.KindJules Aguillon2-39/+25
instead of maintaining a separate set of constants and a conversion function.
2022-11-13Don't depend on dpi values in swipe distanceJules Aguillon1-5/+8
The dpi values "xdpi" and "ydpi" can have wildly different values on different devices. The new computation defines a baseline and only take into account the dpi values as a ratio. On a 480dpi screen (in both directions), this decrease the value by about 18%. This new distance felt better during testing.
2022-11-13Fix localized keys appearing on secondary layoutJules Aguillon1-3/+1
2022-11-13Allow switching quickly between two layoutsJules Aguillon9-29/+56
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-11Add option for brightness of labelsJules Aguillon2-0/+5
The brightness value is used as the alpha value when drawing the labels.
2022-11-11Dim secondary keysJules Aguillon3-15/+31
Reduce the constrast of "secondary" labels. Modifiers (except diacritics), event and keyevent keys are considered secondary.
2022-11-11Disable the back-gesture on the keyboard areaJules Aguillon1-0/+16
as well as other system gestures that would interfere with the keyboard's own swipe gesture.
2022-11-11Avoid crashing in direct-boot modeJules Aguillon2-6/+21
The settings activity can't open in direct-boot mode. The emoji pane opens without the "last used" data.
2022-11-11Direct-boot aware preferencesJules Aguillon5-47/+148
Store preferences in device protected storage, which is available before the device is unlocked. The keyboard was crashing when trying to access the encrypted preferences. The emoji pane uses a separate preferences file, the old data is lost. The SettingsActivity can't easily use the new preferences storage. Instead, it continues to use the "default" preferences store, which is copied back to the protected storage when needed.
2022-11-06Enable pin layout for decimal and signed inputsJules Aguillon1-2/+0
Decimal and signed inputs are more common than expected. Adding a few keys is enough to support these.
2022-11-06Fix adding two pointers for the same keyJules Aguillon1-1/+2
2022-11-06Remove option "Lockable modifiers"Jules Aguillon1-13/+8
2022-11-05Add combinations to 'accent_slash' and show in settingsJules Aguillon2-1/+6
The 'accent_slash' was missing in the extra keys setting. Allow to type more latin letters "with oblique stroke" or "with stroke" that visually have an oblique bar, that were not added to 'accent_bar'.
2022-11-05Add the bar diacritic dead keyJules Aguillon5-0/+44
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-11-05Automatic day night theme in settings activityJules Aguillon1-0/+15
There seems to be no "DayNight" theme compatible with older version of android outside of the androidx library. Using 'Theme.DeviceDefault' which is a dark theme, even if it doesn't sounds like. Detect if a light theme should be used at activity creation.
2022-11-01Use '₹' instead of '₨' in HindiJules Aguillon1-0/+1
₨ is Shift+₹.
2022-11-01Add the 'qwertz_de' layoutJules Aguillon1-8/+9
Similar to 'qwertz' but is wider to show äöü on dedicated keys. Some punctuations are rebalanced to use the space better. The default layout for de_DE is changed.
2022-10-24Draw letter indication on the pin layoutJules Aguillon3-7/+36
There is no way to type letters on the pin layout, the indication are decoration only. Use the E.161 standard.
2022-10-24Add the pin entry layoutJules Aguillon2-5/+19
The layout is used for phone number and datetime input boxes as well as some numbers. It is easier to use when the full numeric layout is not needed.
2022-10-23Disable Alt and Meta by defaultJules Aguillon1-3/+0
The Meta key is not useful. The Alt key can be used in a terminal but is not useful to a part of terminal users.
2022-10-23Add optional NumPadGero Streng3-7/+57
Shows a NumPad depending on preference: Never/Landscape/Always