Jules Aguillon
093a00c572
Add themes
...
Add a "Theme" option to choose between a dark and light theme.
The light theme uses the colors of the dark theme with the luminance
inversed.
The reloading after a configuration change is changed slightly:
- Special handling is needed when the Theme is changed (recreate the views)
- The default implementation of 'onConfigurationChanged' is used
Which triggers more refresh (but don't recreate the views)
- 'onCreateInputView' is no longer needed
2021-12-30 00:26:05 +01:00
Jules Aguillon
40b1ec63a9
Use the themes abstraction
...
Themes replace 'colors.xml' and soon will replace 'dimens.xml'.
2021-12-28 19:12:50 +01:00
Jules Aguillon
93704cca0a
Reference the "special key font" in the Theme object
...
Remove the last cast of the context.
2021-12-28 17:53:58 +01:00
Jules Aguillon
15ce200ce3
Separate "handler" code
...
As with the previous commit, remove casts of the context.
The "handler" object is referenced in the "config" object for now.
2021-12-28 17:47:18 +01:00
Jules Aguillon
0190cfc29a
Turn Config into a singleton object
...
The goal is to remove a cast of the 'context' into 'Keyboard2'.
2021-12-28 16:47:19 +01:00
Jules Aguillon
dd24ad323b
Move Theme code to its own class
2021-12-26 23:55:18 +01:00
Jules Aguillon
86655d4959
Always send the keycode for the tab key
...
Don't write the tab character and always send the keycode, which is most
probably handled by applications.
2021-12-22 20:40:39 +01:00
Jules Aguillon
3e332dbf54
Use the right keycode for the home key
...
The previous keycode wasn't the classical "home" movement key but
Android's actual home key, which has no effect when generated from the
keyboard.
2021-12-22 20:19:59 +01:00
Jules Aguillon
d721cc86d1
Avoid crash when removing a layout
...
Might happen when downgrading the app.
2021-12-19 20:04:17 +01:00
Jules Aguillon
1cfecbdf48
Auto-format Java and XML files
...
Use xmllint.
Re-indent Java files using spaces.
2021-12-19 19:44:27 +01:00
Jules Aguillon
573c13fb82
Add Swedish
...
First add the 'ring' accent.
The swedish language uses the qwerty layout and three accents (aigu,
trema, ring)
2021-12-11 17:05:49 +01:00
Jules Aguillon
58e37b484c
Fix Android's builtin shortcut not working
...
The 'repeat' field of generated key events was incorrectly set to '1'.
2021-12-11 01:03:36 +01:00
Jules Aguillon
0727ea38e9
Fix swapped page_up/page_down
2021-12-05 20:55:52 +01:00
Jules Aguillon
5e5c7ef86a
Add the euro and pound symbols
...
Fn+$ and Fn+# respectively.
2021-12-05 20:16:01 +01:00
Jules Aguillon
d8d3cf85e5
Avoid using getWidth() from onMeasure()
2021-12-05 19:38:46 +01:00
Jules Aguillon
092b8e1c15
Fix recently introduced crash
2021-05-09 12:14:56 +02:00
Jules Aguillon
1a18ea56ca
Fix NullPointerException when ready options from subtypes
...
Seems like subtypes might not match what is declared. Must protect
against that.
2021-05-09 01:07:43 +02:00
Jules Aguillon
68945ff227
Restore support for Android < 12, set minimal version to 4
...
API level 12 is required for "subtype" code introduced in 1.7.
This adds a fallback for older version, "subtype" features are not
available but the keyboard is usable.
Changet he minimal version to 4 to be able to query the API level.
Using integer constant for versions because that's how it's presented in
the documentation. Build.VERSION_CODES is WTF.
2021-05-09 00:56:59 +02:00
Jules Aguillon
7a3312fd01
Add the accents preference
...
This replaces the "disable accent keys" checkbox.
The default should work for anyone: Accents will be hidden unless the
user has the french language installed.
The value "show every accents" is useful for versions of android that
don't have subtypes.
2021-05-09 00:09:10 +02:00
Jules Aguillon
ebfb8f3b39
Move the "Ins" key under Fn
2021-05-08 15:54:55 +02:00
Jules Aguillon
6a19c7a56d
Add french quotes, en- and em-dash
...
Add more keys under Fn. French quotes are S-<, S->, Fn-" and Fn-S-".
2021-05-08 15:51:47 +02:00
Jules Aguillon
41dfa844f1
Move inverted punctuation to the tilde modifier
2021-05-08 02:03:23 +02:00
Jules Aguillon
8fb89c5c71
Improve the numeric keyboard
2021-05-08 02:00:47 +02:00
Jules Aguillon
3fbc35135e
Add a dashed circle symbol on accents
...
To help recognize them.
2021-05-07 22:15:43 +02:00
Jules Aguillon
1e6e3ab22a
Fix layout not updating after rotation
...
Reset the layout on onStartInputView.
2021-05-07 22:10:26 +02:00
Jules Aguillon
abfa1cc8de
Add '¿' and '¡'
2021-05-01 23:57:40 +02:00
Jules Aguillon
5ad4450545
Better placement of accents on QWERTY
...
Also change internal names for accents.
2021-05-01 23:26:44 +02:00
Jules Aguillon
c6a54ed017
Fix rendering of the first label
...
Caused by a shared Paint not correctly resetted.
2021-05-01 23:26:34 +02:00
Jules Aguillon
f287ff2e09
Reset keyboard when finishing
...
This may cause key repeat continuing for a bit after the keyboard
closes.
2021-05-01 22:47:22 +02:00
Jules Aguillon
743b10165c
Highlight activated keys
2021-04-29 01:33:57 +02:00
Jules Aguillon
ec5cda0ce6
Slightly reduce the size of the bottom row
2021-04-29 01:11:18 +02:00
Jules Aguillon
ec1cd9473a
Improve the azerty layout
...
- More intuitive placement of (), [], {} and <>.
- Move accent keys into the top-left corner, on a key they may be used with.
- Some minor changes.
2021-04-29 01:06:51 +02:00
Jules Aguillon
3f0c18612f
Fix modifiers
...
Fixes:
- Toggling off a modifier was not possible in the corners (eg. accents).
- Modifiers on the same key can't be activated at the same time.
- Characters on the same key as a modifier weren't working properly.
2021-04-29 01:06:51 +02:00
Jules Aguillon
d00576ac2d
Add the "layout" option again
...
Some versions of android don't allow to configure several languages.
2021-04-29 01:06:51 +02:00
Jules Aguillon
c86a119448
Tweak dimensions
...
Increase a bit labels size and reduce empty space between keys.
2021-04-25 00:12:16 +02:00
Jules Aguillon
f7c062d0cb
Scale down larger symbols
2021-04-24 23:38:29 +02:00
Jules Aguillon
9bb2642e2c
Add the label size option
2021-04-24 23:22:25 +02:00
Jules Aguillon
2dbb3dc28f
Allow different sizes
...
Improve Paint code.
2021-04-24 23:18:16 +02:00
Jules Aguillon
5688e181fa
SlideBarPreference: Reduce the number of step
...
To have cleaner values.
2021-04-24 23:12:06 +02:00
Jules Aguillon
87b237494a
Add some missing keycodes
...
Allows to sent ctrl and alt combinations. Notably the ] character.
2021-04-21 23:25:14 +02:00
Jules Aguillon
66b7b532c9
Disable vibration when holding keys
2021-04-20 00:35:52 +02:00
Jules Aguillon
5dec9c1215
Add a setting for precise repeat
2021-04-20 00:34:21 +02:00
Jules Aguillon
83b3212d3d
Add precise repeat on some keys
...
Repeat speed increase as the pointer is away from the initial position.
On arrows, backspace and delete.
2021-04-20 00:10:45 +02:00
Jules Aguillon
d04e078816
Add more characters under accents
...
Notably subscript and superscript digits and some quote characters.
2021-04-19 23:10:00 +02:00
Jules Aguillon
2200e2f313
Move some keys under the Fn modifier and move it on the bottom row
2021-04-19 22:29:20 +02:00
Jules Aguillon
471375d50c
Add function keys
...
Add the Fn modifier that change the digits into F1 to F10.
2021-04-18 23:58:35 +02:00
Jules Aguillon
2f8eae628f
Fix crash when no current input binding
...
Broken recently. Restore previous code
2021-04-18 23:31:59 +02:00
Jules Aguillon
81803c406a
Separate handling of modifiers from KeyValue class
...
KeyValue defines an ADT and some of its values, it now contains public
final fields and no internal logic.
KeyModifier handles modifiers and accents and creates new instances of
KeyValue when needed.
This operation is now properly cached.
2021-04-18 23:28:49 +02:00
Jules Aguillon
67d3a99a92
Cleanup key definitions
...
Remove repeated code and remove side-effects from the constructor.
2021-04-18 21:58:13 +02:00
Jules Aguillon
5ed937a654
Render the emoji key as ":)"
...
In order to remove the colors in the rendering.
2021-04-18 00:56:20 +02:00