Commit Graph

205 Commits

Author SHA1 Message Date
Tibor Billes
8cb1789eeb
Add support for Hungarian layout (#127) 2022-05-01 22:51:11 +02:00
Jules Aguillon
04a7ec4bb8 Fix latched pointers accumulating on the same key
It was possible to latch and lock the same modifier several time at the
same time independently. Remove that.
2022-05-01 00:11:52 +02:00
Jules Aguillon
8e0d38c257 Fix crash when IME not enabled
This is unexpected but happened to a user. Perhaps because the OS
returned bogus or fake results in imm.getEnabledInputMethodList ?
2022-05-01 00:00:15 +02:00
Jules Aguillon
b72635b887 Fix modifiers not cleared when presses overlap
When typing fast, a second key might be pressed before the first is
released.

Clearing modifiers earlier would prevent this but would break modifiers
placed in corners (especially the accent keys). Instead, don't take
latched modifiers into account when registering the second press.

A new flag is needed to not interfere with holding modifers, which is
merged with the norepeat flag.
2022-04-30 23:47:09 +02:00
Jules Aguillon
84af72c222 Record activated modifiers on key down
The View no longer keeps flags for something other than rendering.
2022-04-30 23:17:20 +02:00
Jules Aguillon
39952f8bdf Remove build dependency on Fontforge
The required version of fontforge (from 2020!) is not available in many
distros. This is an annoying for contributors and greatly complicated
the CI and F-Droid scripts.

The generated font file is now included in the sources. Fontforge is
still needed when adding new glyphs but this is not a common operation.
2022-04-24 20:52:36 +02:00
matthiakl
e52e537fd7
Added neo 2 layout (#125)
* Added neo 2 layout

* Move accents away from screen edge into second row
2022-04-24 19:58:33 +02:00
Jules Aguillon
2900e8d197 Add Double acute diacritic
Will be used by the Hungarian language.
2022-04-24 01:15:41 +02:00
Jules Aguillon
d8e475467a Fix cedilla glyph is inverted 2022-04-24 00:49:48 +02:00
Jules Aguillon
fec3f109c9 Add support for Lithuanian
Requires two new diacritics: ogonek and dot_above.

The new accents are also added to the Latvian layout as the two language
can be close but not to the other localized layouts. A new mechanism is
needed to reproducibly add extra keys to layouts without manual
placement.
2022-04-24 00:41:49 +02:00
Jules Aguillon
9a8c4f291d Fix compatibility with Android 6
Android 6 uses Java 1.7, the only incompatible feature in use was
lambdas.
2022-04-16 23:36:54 +02:00
Jules Aguillon
5562ee1391 Fix mismatch layout name
The Korean layout id was not consistent and this caused a crash.
2022-04-06 09:50:33 +02:00
Jules Aguillon
120c0a9d23 Fix compat with older version of Android
Resources.getFloat is new from API 29.
2022-04-06 09:50:33 +02:00
Jules Aguillon
aa78229b2a Add the Programming Layout option
Allow specifying a layout for programming and add a key for switching to
it easily.

The switching key is placed on the top edge of the space bar.

The option has no effect by default because the ergonomic isn't ideal,
it needs to be enabled explicitly.
Users of Latin-script languages certainly prefer to use one layout (for
programming or not). This feature might be removed in favor of a better
language-switching mechanisms in the future.
2022-04-03 17:15:12 +02:00
Jules Aguillon
9411f59ed5 Rename the Meta key
The symbol isn't clear enough.
2022-04-03 12:49:14 +02:00
Jules Aguillon
b85b67c2f0 Swap Ctrl and switch_numeric keys
The switch_numeric key is generally more important, especially in the
numeric pane.
2022-04-03 12:48:29 +02:00
Raphael
b995da9985 Update Space Glyph
Revert to previous version, the original google material icon,
which is not rounded, and it looks better with the rest of the keyboard,
also more correct to represent the open box unicode space char,
instead of a smile
2022-04-02 17:36:10 +02:00
Jules Aguillon
5f47beb5b0 Add currency symbols under the Fn key
Fn+e = €
Fn+l = £
Fn+r = ₹
Fn+y = ¥
Fn+c = ¢
Fn+p = ₱
2022-04-02 16:56:40 +02:00
Raphael
2dda39f453
Arrows and Box system (#114)
* Add `Arrows` and `Box` accent system
2022-04-02 16:42:40 +02:00
nickid
fbf8901bdb
Add Korean layout (#115)
* Add Korean layout
2022-04-02 16:33:32 +02:00
Jules Aguillon
2b6c2b98e0 Compute the swipe distance from the physical dpi
The previous computation was very different depending on the device's
screen and accessibility options.
Given that the keyboard is supposed to fill all the space in one
dimension, the dpi unit makes little sense.

The formula doesn't mean anything in particular, it takes into account
both dimensions (x and y) and should be close to the dpi in the
diagonals (which is the direction of swipe).

This changes the actual value, on a 1920x1080 480dpi screen, the value
is increased by 20%.
2022-04-02 16:16:24 +02:00
ArenaL5
281f779121 µ, æ and œ also generated by Fn 2022-03-31 19:05:40 +02:00
ArenaL5
6b3123090c Add arrows
Add simple arrows to the numeric keypad. Using the Fn key with these arrows will
output double arrows.
2022-03-31 19:05:40 +02:00
ArenaL5
363a65223c Add non-breaking space as Fn+Space 2022-03-31 19:05:40 +02:00
ArenaL5
4355225646 Add extra symbols to Fn
Also removed almost all combinations of diacritics and symbols to create extra
symbols.
2022-03-31 19:05:40 +02:00
Jules Aguillon
6db57500ee Add glyphs for Tab, Backspace and Delete
Tab is from IcoMoon. Backspace and Delete are from materialdesignicons.
2022-03-25 00:12:41 +01:00
Jules Aguillon
1b6deb7fed Improve glyphs for accents
The accents are taken from the Roboto Regular font (Apache 2.0), added
the dotted circle and exported with FontForge.

The argument to FontForge's Import function are changed, the fifth
argument controls the accuracy and needed to be lowered otherwise the
grave accent wouldn't be rendered at all.
2022-03-24 23:55:20 +01:00
Raphael
94751bae3e Update Home and End glyphs
Revert them to previous version, but now using SVG icons
instead of a ttf font file
2022-03-24 18:54:41 +01:00
ArenaL5
47f9043096 Correct displayed value when cancelling settings modification
When changing any numeric setting and cancelling this change, the change would not
be persisted, but the summary in the setting screen would show the last position
of the slider instead of the correct unchanged value.

This commit fixes this on the most simple way by resetting the slider position to
the persisted value.
2022-03-21 00:39:40 +01:00
Jules Aguillon
ba6d62dee2 Add F11 and F12
These keys are shown only when Fn is activated, "placeholder" keys are
placed in the layouts.
2022-03-19 16:27:57 +01:00
Jules Aguillon
e872c58788 Allow modifiers to hide keys
Modifiers can temporarily remove a key from the layout by returning
'null'.
Make sure pointer handling code handle these modified keys gracefully
and doesn't trigger a key event and a vibration for the removed key.
2022-03-19 15:39:20 +01:00
Jules Aguillon
57c6208b50 Add glyphs for accent keys
The "dotted circle" character combined with the accent was badly
rendered on many devices.
2022-03-18 17:31:23 +01:00
Jules Aguillon
d733f8c78c Build all special glyphs from SVG
Recover the provenance of each glyphs and remove the base_font.ttf file.
2022-03-18 12:55:08 +01:00
Jules Aguillon
e63ff8f837 Stateless build of the special font file
Keep the glyphs in SVG format and build the font using a FontForge
script.
A part of the previous font is kept because the sources is lost.

This adds a new dependency to the build system, fontforge.
2022-03-17 20:23:28 +01:00
Jules Aguillon
fe35d5fd5a Avoid ghost touches while holding modulated keys
On some devices, bogus touch events can be sent while holding a key.
With modulated keys, it can happens on top of other keys.
Ignore every new pointers when a modulated key is pressed.
2022-03-17 11:24:33 +01:00
Jules Aguillon
2eb615dbf6 Show the switching key if there's several languages
Ensure the switching key is shown when there's several subtypes enabled,
even if Android says not to show it.
2022-03-16 13:09:10 +01:00
igorSilCar
2dae2105b2
Brazilian portuguese layout (#91)
* Providing a comprehensible Brazilian Portuguese keyboard layout

removed cedille as it is already provided by an independent key;
changed layout to correspond to the locale
2022-03-15 21:05:16 +01:00
Jules Aguillon
d53ee811d9 Handle CANCEL touch events
Handling this event is part of the API but was never done. This caused
unstoppable key-repeat.

This event isn't common, the only way I found on Android 10 is to switch
to the emoji keyboard while holding a key. Some apps might cause this
event more often.
2022-03-15 20:44:02 +01:00
Jacob Strömgren
fadedfd58f Add Swedish layout 2022-03-15 18:42:29 +01:00
Jules Aguillon
f9cd4ca2d8 Log editor infos while debugging
Useful when debugging why the keyboard doesn't work as expected with a
specific app.
2022-03-15 18:42:29 +01:00
Jules Aguillon
f4978f5266 Fix crash since 2ea256e 2022-03-13 00:45:16 +01:00
Jules Aguillon
a0d90496c1 Improve symbols for Sup, Sub and Ord 2022-03-13 00:43:11 +01:00
Jules Aguillon
7aa241b10a Make superscript and subscript modifiers lockable 2022-03-13 00:40:39 +01:00
Jules Aguillon
a57bdf8cfb Avoid showing some symbols twice in Fn mode 2022-03-13 00:35:15 +01:00
Jules Aguillon
ee6e892ef4 Define localized keys as a set instead of flags
Using flags for removing keys like € and ß need too many flags and won't
scale to more localized keys.
2022-03-13 00:14:18 +01:00
Jules Aguillon
2ea256e769 Fix inconsistent highlighting of lockable keys
Pointers.getKeyFlags might receive a different KeyValue than what's
stored in the pointer due to caching. Compare names instead.
2022-03-12 21:38:47 +01:00
Jules Aguillon
534e4cb843 Make the font smaller for the action key 2022-03-06 19:36:09 +01:00
Jules Aguillon
e303008e66 Fix action key not updating when switching field
The keyboard was updated before the action key is.
2022-03-05 20:21:37 +01:00
Raphael
5404e7432d
Clicking twice on CTRL or ALT will lock them in 'ON' state (#72)
* Clicking twice on CTRL or ALT will lock them in 'ON' state

* Make Locking behaviour optional, configurable in preferences

* Nest the new settings into a different page

To avoid spamming the settings page and repetition in the summaries.
Cannot be a popup unfortunately because that would require API >= 11.

* Add Fn and Meta

Co-authored-by: Jules Aguillon <jules@j3s.fr>
2022-03-05 20:17:45 +01:00
Jules Aguillon
e92504ae92 Improve the code for dynamic updates of the layout 2022-03-05 19:22:01 +01:00