When the layout is split, insert a middle column showing the
complete_first, complete_second, etc.. keys.
These keys are rendered without borders and background with a new role.
The suggestion bar is hidden for split layouts. The intention is to gain
much needed vertical space.
* Automatically split layouts in landscape
This inserts empty space in the center of layouts when in landscape
orientation. The keys are smaller and pushed to the edges of the screen.
This way, the fingers don't have to reach the center of the screen,
which is inconvenient in landscape orientation.
* Duplicate keys that are on the middle
Keys that are almost aligned on the middle of the screen are duplicated
on both sides. These keys are most probably hit with both thumbs.
This is especially useful for large keys like the space bar on the
bottom row.
* Split the bottom row
* Add an option to control layout splitting
* Refactor: KeyValue constants
Add constants for keys that are accessed from the app's code. This
simplifies the fake pointer handling in Keyboard2View.
* Refactor: Pre-compute action key replacement
The action key and the enter swap are pre-computed in EditorConfig. This
simplifies the code.
The "Switch to the last used keyboard" is renamed to "Switching between
input methods" and allows to select "Switch to last used", which was the
default in older releases.
* Disable selection mode in text editors
Selection mode removes the space bar key (which is replaced by the Esc
key) and can be annoying in Emacs for example.
Text editor users probably have the `esc` key available.
* Refactor: Move EditorInfo related code to EditorConfig
Add the new EditorConfig class that handles configuration extracted from
the EditorInfo. It is accessible from the Config class for convenience.
This aims at reducing the length of already large classes and group the
code that was spread over several classes.
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>
This doesn't fix a bug but remove some tricky code. The shift key is no
longer different when the "double tap for capslock" option is on.
The handling of the option is moved to Pointer instead and becomes
simpler.
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.