Scale the width of the keys in the row to match a value. Useful to
remove space on the right of the row without adding a 'width' attribute
to each key.
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.
The label size is computed relatively to the width of the keyboard when
the height is larger than 3/2 of the width. This ensures that the labels
have a reasonable size when the keyboard height increases.
* 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
The distance at which a swipe was considered successful was reduced in
188c682 to allow making circle gestures on a key that also had a slider.
It was also useful in reducing accidental sliding.
This is impractical for normal typing so it is reverted. The reduced
range continues to be used for sliders.
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>
* Selection mode: Space to cancel the selection
This adds the "selection mode", which is activated when text is selected
in the text box. The selection mode is exited when the selection is
cleared.
While the selection mode is activated, the Space and Esc keys are
modified into the "selection cancel" key, which remove the selection
without changing the text.
The space bar is otherwise easy to type by accident during a selection
and causes the selected text to be deleted.
* Selection mode: Move each ends of selection separately with slider
When the selection mode is activated, the space bar sliders change how
they affect the selection:
- The left side of the slider moves the left position of the selection.
To shrink the selection from the left side, the slider must be
activated by sliding to the left, extending the selection
temporarilly, then by sliding to the right.
- The right side of the slider affects the right position if the
selection.
* Construct a single handler
* Add a delay after a Keyevent key in a macro
Add a delay before sending the next key to avoid race conditions causing
keys to be handled in the wrong order. Notably, KeyEvent keys handling
is scheduled differently than the other edit functions.
These keys are the equivalent of ctrl+backspace and ctrl+delete,
respectively.
They can be reached with Gesture+backspace and Gesture+delete
respectively.
Many kind of KeyValues don't need to be wrapped into a Macro to show a
specific symbol. This is especially useful as Macro keys are not
affected by modifiers.
The parser is changed to have a fast-path when a key value is not a
macro.
Add "macro" keys that behave as if a sequence of keys is typed.
Macro can be added to custom layouts or through the "Add keys to the
keyboard option". The syntax is:
symbol:key1,key2,..
The symbol cannot contain a : character. 'key1', 'key2', etc.. are:
- 'String with \' escaping'
The key will generate the specified string.
- keyevent:123
The key will send a keyevent.
- The name of any special key
* layouts/latn_bone.xml: use new syntax and add most missing keys
new syntax: n/s/e/w/ne/nw/se/sw instead of key{1..8}
Some keys were missing keys according to the tests, this adds them in a
similar way to latn_neo2.
Only `switch_forward` didn't fit (because of the 0
at the bottom of the spacebar).
* layouts/latn_bone.xml: even better bone
- use number row to unclutter rest of keyboard
- use modmap for special shift functions of bone layout
- add missing loc characters
- use standard bottom bar
- add diacritics from the 3 dead key keys on bone
- 2 small keys left and right of the number row (don't fit all 6
diacritics, so they leak onto the number keys)
- row 1 is full too, so the dead keys from the left of that row leak
onto the keys there as well
open questions:
- should bone rely on the math layer or use modmap?
- possibility to combine diacritics?
This moves some computations that used to be done during onDraw into the
new Theme.Computed class. This also removes Paint objects from the Theme
class, making it data-only.
This is a requirement for making some keys render differently.