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.
* Massage Intro
Start with definition, then use cases, then valid syntax.
Use "legend" rather than "symbol" for the visible legend on the keyboard
Rephrase to avoid "exhaustive". Other simplifications.
* Edit section "Modifiers"
Separate into two tables, each preceded by relevant introduction
* Shuffle sections
Retitle "Special keys"; as used in the Intro, this term refers to all the keywords in this file.
Put two contrasting sections together, add "In contrast," and reword.
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.
Change the format of check_layout.output to avoid adding any logs for
layouts that do not trigger any warning.
Fix the check_layout CI, which was broken since check_layout.py was
changed to take arguments.
Set the flag FLAG_SOFT_KEYBOARD when sending key events stops Discord
from sending message when typing Enter.
The other values are the same that are sent when using sendDownUpKeyEvents().
Implement up and down cursor movement slider. This is not added to any
layout yet due to the undesirable behavior when moving the focus out of
the text box being edited.
Setting 'slider="true"' on a key is no longer enough to make a slider,
the key must also be of kind 'Slider'.
Only the KeyValue that started sliding is now considered, they can be
generated with negative values. This allows keys that don't have the
complementary cursor movement key on the opposite direction.
This will help implement other kind of sliders as well as up/down
sliders.
and use 'toString()' instead of 'getSymbol()'.
This removes unecessary casts when computing symbols and comparing key
values. This will make adding other kind of keys easier.
Moving the cursor by 1 position is hard because the finger has to travel
far enough to activate the slider but then becomes very sensitive.
With this change, swiping on the space bar slider will immediately move
the cursor by 1 position but the slider will activate only if the finger
travel an other swiping distance.