Commit Graph

504 Commits

Author SHA1 Message Date
Jules Aguillon
122a9c23d0 Make fake pointers not lockable
Especially annoying now that modifiers are not locked by a double tap.
2022-11-26 17:22:31 +01:00
Jules Aguillon
6fb15b3f16 Stop using deprecated 'shouldOfferSwitchingToNextInputMethod'
This function has been introduced in API 19 and deprecated in API 28.
There was no version check for API 19 but instead of adding these,
simply remove the feature for API under 28.
2022-11-26 15:46:45 +01:00
Jules Aguillon
f7e16c0345 Fix missing version check
setSystemGestureExclusionRects is API 29. Broken since d644d2b, which
almost got into the release!
2022-11-13 20:59:40 +01:00
Jules Aguillon
64c7c8ce20 Draw borders and update themes
Themes can define the color of each borders independently. Every borders
must have the same width for now. It's possible to set a different width
when the key is activated, thought this is only used to remove borders.

The 4 themes are updated to take advantage of borders.
2022-11-13 20:53:06 +01:00
Jules Aguillon
c1751578ef Highlight activated keys label
Rendering change only.
2022-11-13 18:03:01 +01:00
Jules Aguillon
2aa98de7aa Add editing keys: copy, paste, cut, select all 2022-11-13 16:45:57 +01:00
Jules Aguillon
078dbcd5ff Refactor: Move editing code from to KeyEventHandler
Remove the code dealing with InputMethodConnection from 'Keyboard2' and
move it into 'KeyEventHandler', where more editing actions can now be
implemented.

Autocapitalisation is also moved, the IReceiver interface is simplified.
2022-11-13 16:28:39 +01:00
Jules Aguillon
22a7df6632 Refactor: Use enum values in KeyValue.Kind
instead of maintaining a separate set of constants and a conversion
function.
2022-11-13 15:19:50 +01:00
Jules Aguillon
e213834f67 Don't depend on dpi values in swipe distance
The dpi values "xdpi" and "ydpi" can have wildly different values on
different devices.

The new computation defines a baseline and only take into account the
dpi values as a ratio.

On a 480dpi screen (in both directions), this decrease the value by
about 18%. This new distance felt better during testing.
2022-11-13 14:43:53 +01:00
Jules Aguillon
b102ad9078 Fix localized keys appearing on secondary layout 2022-11-13 00:39:31 +01:00
Jules Aguillon
51b330c616 Allow switching quickly between two layouts
A new option allow to choose a secondary layout, the switching key is
placed on the top edge of the space bar.

The "Programming layout" option was basically doing that but it was
possible to choose from a few layouts only. It is improved and renamed.

The 'LayoutListPreference' allows setting the string for the first entry
but otherwise share the rest of the array.

Add nice icons from materialdesignicons.
2022-11-13 00:24:23 +01:00
Jules Aguillon
815e30a505 Add option for brightness of labels
The brightness value is used as the alpha value when drawing the labels.
2022-11-11 19:47:37 +01:00
Jules Aguillon
4d99bd4f4b Dim secondary keys
Reduce the constrast of "secondary" labels. Modifiers (except
diacritics), event and keyevent keys are considered secondary.
2022-11-11 19:18:22 +01:00
Jules Aguillon
d644d2bf0e Disable the back-gesture on the keyboard area
as well as other system gestures that would interfere with the
keyboard's own swipe gesture.
2022-11-11 16:14:44 +01:00
Jules Aguillon
ef34303c7e Avoid crashing in direct-boot mode
The settings activity can't open in direct-boot mode. The emoji pane
opens without the "last used" data.
2022-11-11 15:39:28 +01:00
Jules Aguillon
f1ce6abe5a Direct-boot aware preferences
Store preferences in device protected storage, which is available before
the device is unlocked.
The keyboard was crashing when trying to access the encrypted
preferences.

The emoji pane uses a separate preferences file, the old data is lost.

The SettingsActivity can't easily use the new preferences storage.
Instead, it continues to use the "default" preferences store, which is
copied back to the protected storage when needed.
2022-11-11 14:27:02 +01:00
Jules Aguillon
30198acddd Enable pin layout for decimal and signed inputs
Decimal and signed inputs are more common than expected. Adding a few
keys is enough to support these.
2022-11-06 19:54:55 +01:00
Jules Aguillon
96db0397f0 Fix adding two pointers for the same key 2022-11-06 19:49:30 +01:00
Jules Aguillon
d2128e777e Remove option "Lockable modifiers" 2022-11-06 19:34:57 +01:00
Jules Aguillon
6a7fbf5e50 Add combinations to 'accent_slash' and show in settings
The 'accent_slash' was missing in the extra keys setting.

Allow to type more latin letters "with oblique stroke" or "with stroke"
that visually have an oblique bar, that were not added to 'accent_bar'.
2022-11-05 19:33:46 +01:00
Jules Aguillon
1e067c9863 Add the bar diacritic dead key
Allows to type many of the "with stroke" or "with bar" latin letters.
2022-11-05 19:26:49 +01:00
Jules Aguillon
ebe66eb740 Apply Fn first
It's otherwise impossible to type Ctrl+F keys.
2022-11-05 10:29:36 +01:00
Jules Aguillon
d2328d4b9a Automatic day night theme in settings activity
There seems to be no "DayNight" theme compatible with older version of
android outside of the androidx library.

Using 'Theme.DeviceDefault' which is a dark theme, even if it doesn't
sounds like. Detect if a light theme should be used at activity
creation.
2022-11-05 10:13:35 +01:00
Jules Aguillon
7edfd81db1 Use '₹' instead of '₨' in Hindi
₨ is Shift+₹.
2022-11-01 21:44:49 +01:00
Jules Aguillon
4f3fcfe64b Add the 'qwertz_de' layout
Similar to 'qwertz' but is wider to show äöü on dedicated keys. Some
punctuations are rebalanced to use the space better.
The default layout for de_DE is changed.
2022-11-01 21:29:18 +01:00
Jules Aguillon
2e598a4d47 Draw letter indication on the pin layout
There is no way to type letters on the pin layout, the indication are
decoration only.
Use the E.161 standard.
2022-10-24 00:27:49 +02:00
Jules Aguillon
e01a2733b1 Add the pin entry layout
The layout is used for phone number and datetime input boxes as well as
some numbers.
It is easier to use when the full numeric layout is not needed.
2022-10-24 00:17:55 +02:00
Jules Aguillon
e1145d3851 Disable Alt and Meta by default
The Meta key is not useful.
The Alt key can be used in a terminal but is not useful to a part of
terminal users.
2022-10-23 23:09:58 +02:00
Gero Streng
baec5a76ee Add optional NumPad
Shows a NumPad depending on preference:
   Never/Landscape/Always
2022-10-23 22:51:36 +02:00
Jules Aguillon
ea0b873dd8 Make the shift symbol bigger 2022-10-23 22:02:41 +02:00
Jules Aguillon
ff0c0354d6 Show keys description in settings
The symbols alone might be hard to understand when scrolling through the
"extra keys" option.
2022-10-23 21:51:43 +02:00
Jules Aguillon
344df4c5c1 Refactor: Remove boilerplate for symbol keys 2022-10-23 21:42:03 +02:00
Jules Aguillon
36e10a792f Add the capslock key
The key enable caps lock immediately. It does nothing if caps lock is
already enabled.

It is not present on the keyboard by default but a place is defined on
every layout, top-right of the shift key. It can be enabled in the
settings.

The icon is from materialdesignicons.com.
2022-10-23 21:37:04 +02:00
Jules Aguillon
f56b926857 Autocapitalisation: Avoid trigerring when Ctrl+Del
Autocapitalisation could trigger while repeatedly typing Ctrl+Del to
remove several words.
2022-10-16 22:34:21 +02:00
Jules Aguillon
75df3afda6 Allow to disable Alt and Meta keys
The keys are marked "loc" in the layouts and are handled like the other
extra keys.
The only difference is that they are enabled by default (for now).
2022-10-16 01:07:24 +02:00
Jules Aguillon
158a3577be Disable fullscreen mode
This mode is annoying to some users and is disabled in most text views.

The keyboard has a fixed sized relative to the height of the screen in
landscape mode. The keyboard can't take more space than expected,
currently.

This might cause problems in the future and might be hidden behind an
option if one is found. Every text views so far seemed to behave fine.
2022-10-16 00:42:28 +02:00
Jules Aguillon
138e59f13a Fix literal tab key
Broken since 31d6a70d.
2022-10-16 00:04:06 +02:00
Jules Aguillon
db347c665c Add the breve diacritic 2022-10-15 23:28:36 +02:00
lpv
8be80eecd4
Basic greek layout. (#207)
* Basic greek layout.
2022-10-15 23:22:19 +02:00
Jules Aguillon
d9a8688237 Fix crash due to auto capitalisation
It is unclear how _autocap.started is not called first but nothing is
preventing to initialize things earlier.
2022-10-15 16:19:27 +02:00
Raj9039852537
1909f2fcb4
Added Hindi language layout (#211)
* Hindi Keyboard Layout

Hindi keyboard layout added
Basic symbols like brackets, colons etc are useful. This includes ( ) { } [ ] \ / ÷ - + = ! % : ; . , ?
2022-10-11 22:13:40 +02:00
Jules Aguillon
fc8bb3a539 Allow to type İ on the Turkish layout
In Turkish, upper case of 'iı' is 'İI' but Java's toUpperCase will
return 'II'.
To make 'İ' accessible, make it the shift of 'ı'. This has the
inconvenient of swapping i and ı on the keyboard.
2022-10-04 10:12:22 +02:00
Jules Aguillon
64e263a1af Fix an unexplained crash encountered in the wild
For some reason, 'subtype' can be null. Perhaps because the keyboard is
started before the IMM is ready.
2022-09-24 23:34:50 +02:00
Validbit
5169472dfc
Added Czech translation and layout (#198)
* Added Czech translation and layout

Translated keyboard and created Czech multilingual "practical" layout for faster typing and typing in commonly used languages (German, Slovak + French w/accents)

* Update (Rephrase) full_description.txt

... to better suit the language and naturally promote keyboard's features and possibilities to a wider audience.
2022-09-24 22:44:10 +02:00
Jules Aguillon
3081af5190 Improve the auto capitalisation
- Detect when the input box is cleared
- Avoid looking up keys on the keyboard every time the shift state needs
  to change.
2022-09-24 22:36:06 +02:00
Jules Aguillon
c778b4e8a2 Fix autocapitalisation randomly not triggered
The autocapitalisation is asking the editor about whether to enable
shift and must make sure to ask after the editor is done processing the
events.
2022-09-24 18:53:37 +02:00
Quantenzitrone
65210fb14f
Bone keyboard layout (#155) 2022-09-24 16:17:10 +02:00
Jules Aguillon
2fc40512c6 Add switch_greekmath to the extra keys
The Fn+switch_numeric shortcut might be hard to discover or too slow for
heavy users.

A location is allocated for the key so it has a consistent placement.
2022-09-24 16:02:54 +02:00
Jules Aguillon
5811643562 Add more possible locations for extra keys
Avoid dropping some keys on crowded layouts.
2022-09-24 16:02:54 +02:00
Piotrek Marciniak
a365fdc6a3
Add white e-ink oriented theme (#193)
* Add white e-ing oriented theme

Co-authored-by: Jules Aguillon <jules@j3s.fr>
2022-09-24 13:13:51 +02:00
ChristianGynnild
b0a2298899
Added Norwegian keyboard layout (#202) 2022-09-24 11:44:01 +02:00
Md Rasel Hossain
81f07b427f
Bengali Keyboard Layout (#201)
* Bangla Layout
2022-09-24 11:40:10 +02:00
Jules Aguillon
25a6e71ee8 Add the Extra Keys option
Allows to add more keys to the keyboard from a predefined list.
The implementation doesn't use MultiSelectListPreference because it
doesn't seem possible to change the item layout to properly show the
rendered symbols.
2022-09-19 11:41:18 +02:00
Jules Aguillon
bc8bcce82a Fix crash when auto-capitalisation runs too soon
This is unexpected but happens once.
2022-07-30 18:19:28 +02:00
Jules Aguillon
4f5ce66347 Fix auto-capitalisation interfering with caps lock
Add a flag to recognize fake pointers and avoid clearing the
intentionally locked shift key.
2022-07-30 18:14:05 +02:00
Jules Aguillon
85d798299e Standard auto-capitalisation only after space
Change the capitalisation algorithm to use Android's
'getCursorCapsMode'. This requires a bit of cursor calculations but
should feel more standard.

The auto completion only triggers after a space is typed or backspace is
pressed.
2022-07-30 17:56:31 +02:00
Jules Aguillon
53b9afa973 Hold any modifier to lock
Modifiers can be locked with a long press. The key repeat mechanism is re-used
and the press timeout is the same.
Every modifiers can be locked that way, not only the "lockable" ones.

The previous behavior can be enabled in the settings (for shift only)
but the default is changed.
2022-07-24 23:55:00 +02:00
Jules Aguillon
081e9a6e53 Add an option to control auto capitalisation 2022-07-24 23:44:37 +02:00
Jules Aguillon
bfde31da6e Avoid automatic capitalisation when using arrows
Disable capitalisation just after an arrow kind is pressed to avoid
interrupting navigation.
2022-07-24 23:32:14 +02:00
Jules Aguillon
324756535e Automatic capitalisation at beginning of sentences
Keep track of end-of-sentence characters while typing and automatically
enable shift when appropriate.

The last few characters just before the cursor need to be queried in
some cases: Begin of input, cursor has moved or text is deleted.
This might have a performance cost.

This normally only enable shift but it also needs to disable shift when
the cursor moves.
2022-07-24 20:02:48 +02:00
quantenzitrone
3033091f9d Add alternative greek and math symbols 2022-07-09 17:40:20 +02:00
Quantenzitrone
fdd640ef09 added uppercase ẞ of ß 2022-07-09 17:35:17 +02:00
Jules Aguillon
13a13ecbb6 Switch to greekmath with Fn+switch_numeric
Add a shortcut to switch to the greekmath pane directly from the main
layout.
2022-07-09 17:31:44 +02:00
Jules Aguillon
d5836ebb97 Add key for switching to the greekmath pane
The key is placed on the 3rd row of the numeric pane, by taking some
space from the shift key.
2022-07-09 17:30:26 +02:00
Andrew Cat
1d406e948f
Add ukrainian layout (#172) 2022-07-03 23:07:06 +02:00
Jules Aguillon
1ddd089166 Compatibility with API level < 24
The Math.floorMod method was added on API level 24.
2022-07-03 22:59:05 +02:00
Jules Aguillon
ff01678ba6 Revert "Remove the vibration settings"
Bring back the "Vibration" option.

The duration option isn't added back because the vibration settings are
still handled by Android. In fact, the option has no effect if the
vibration are disabled in the system settings.

This partially reverts commit ef03dfed5c.
2022-06-24 22:00:23 +02:00
Jules Aguillon
d74e8f3b08 Fix F12 being turned into F11
The "f11_placeholder" and "f12_placeholder" keys were equals since
31d6a70.

Add an incrementing id into the unused key value to differentiate
placeholder values.
2022-06-24 20:56:04 +02:00
Jules Aguillon
ab987c776c Fix localized key not in predefined position
The "loc " prefix for predefining a place for an "extra key" was broken
since 31d6a70.

The FLAG_LOCALIZED flag cannot be used anymore, as adding it to any key
would turn it into a different key that wouldn't be recognized by parts
of the code comparing the keys (placing the extra keys).

Add an other layer in KeyboardData to store such informations.
2022-06-24 20:26:27 +02:00
Jules Aguillon
402bf4990e Remove the interval between vibrations
This is no longer necessary since repeating key no longer cause a
vibration.
2022-06-06 20:40:53 +02:00
Jules Aguillon
ef03dfed5c Remove the vibration settings
Instead of using the vibrator directly, use performHapticFeedback, which
will integrate better with the system settings.
2022-06-06 17:04:50 +02:00
Jules Aguillon
e0131fa6b0 Fix inconsistent text size in landscape mode
Dimens weren't refreshed when the orientation changed. Dimens are not
the right solution anyway, use scaling factors instead.
2022-06-06 16:17:43 +02:00
Jules Aguillon
b236a74b64 Increase horizontal spacing in landscape mode
Space between the keys and margin on the left and right edges of the
screen.
2022-06-06 16:15:35 +02:00
Jules Aguillon
f6338a652b New setting: Keyboard height in landscape mode
The previous fixed value of 55% was too high. The new default value is
50% and it is customizable.
2022-06-06 15:33:39 +02:00
Jules Aguillon
9a42fa4dca Don't add extra keys to the numeric pane 2022-06-06 01:02:30 +02:00
Jules Aguillon
4d104eacf3 Remove the option "Show every accents"
This option cannot be implemented easily now that the set of "accents"
(localized keys) isn't defined.
2022-06-06 00:55:16 +02:00
Jules Aguillon
31d6a70dfb Refactor: Remove KeyValue.name
This makes KeyValue objects smaller. 'equals' and 'hashCode' are now
implemented too. Key names are still used to recognise keys with special
meaning, but not for comparing keys anymore.
2022-06-06 00:23:45 +02:00
Jules Aguillon
7462955507 Fix "REMOVED" key appearing when typing Fn and Shift
Since cc571ea
2022-06-05 20:15:11 +02:00
Jules Aguillon
9aac7900c0 Refactor: Make KeyValue final
The class has a complicated internal logic, it is no longer reasonable
to extend it.
2022-06-05 20:14:16 +02:00
Jules Aguillon
088d46d6e6 Refactor: Merge KeyValue._code and _flags fields
With a small number of flags now, it's possible to remove one more
field.
2022-06-05 19:55:55 +02:00
Jules Aguillon
5cc7fdf6d7 Refactor: Separate Events and Keyevents and use enums
Negative values for internal events are preventing further refactoring.

Add a new kind of key and split internal events (now Event) and
Android's key events (now Keyevent).

Use enums events and modifiers outside of the KeyValue class.
Internally, they are converted to and from integer.
2022-06-05 19:30:53 +02:00
Jules Aguillon
cc571ea1ca Refactor: Merge KeyValue.char and code fields
These two fields couldn't have an interesting value at the same time.

As we can no longer rely on a special value to distinguish between
what's the kind, the kind of the key is explicitly encoded in the two
most significative bits of the _flags field.

Extra nice thing: This removes the special values 'EVENT_NONE' and 'CHAR_NONE'.
2022-06-05 18:14:50 +02:00
Jules Aguillon
c1a816d3d4 Refactor: Associate key events in KeyModifier
Two advantages:
- No need to distinguish modifiers in KeyEventHandler. The KeyValue is
  enough to decide what action to do.
- Keys are never a Char and Event at the same time, fields can be
  merged.
2022-06-05 17:46:28 +02:00
Jules Aguillon
e10c587dc5 Refactor: Abstract KeyValue fields
The meaning of the public fields of KeyValue was quite complicated and
not handled consistently accross the app.

Make these fields private and add a more abstract API on top.

The meaning of these fields changed recently and it wasn't an easy
change. I plan on making more changes in the future.
2022-06-05 17:46:22 +02:00
erqan
d03e96da3e
Turkish layout & translation (#151)
* Turkish layout & translation
2022-06-05 15:04:54 +02:00
Jules Aguillon
02124dd71f Add combining 'accent_arrow_right'
It's the first modifier that uses combining diacritics. Whether it
should be represented as a modifier or a new kind of key can be
reconsidered later.
2022-06-05 13:51:09 +02:00
Jules Aguillon
e4e54628b7 Add the 'accent_slash' modifier
Might be useful for some math characters.
2022-06-05 12:02:35 +02:00
Jules Aguillon
4127aa6f03 Stop using flags for modifiers
There was no free bits left to add new modifiers. Instead of increasing
the width of the 'flags' field, refactor the way modifiers are
represented and used.

Modifers are now represented as independent values and stored in the
'code' field. A flag is added to distinguish between modifiers and keys
with a key event.

The most notable change is that modifiers can no longer be or-ed into a
single value but have to be represented as an array.
2022-06-05 01:43:58 +02:00
Djuric
9b154a2495
Add colemak layout (#135) 2022-06-04 15:23:52 +02:00
Jules Aguillon
815025aaa9 Add layout: QWERTY (Hungarian) 2022-05-29 17:31:12 +02:00
Jules Aguillon
2e81cb5cf7 Automatically place localized keys on the layouts
Layouts no longer need to mention every localized keys and dead keys.
They are now placed automatically starting from the second row on the
bottom-right corner.

The "loc " prefix is not removed to still be able to define a more
optimal and consistent placement for some extra keys (eg. 'ß' near 's').

Programming layouts no longer need to place every dead keys.
2022-05-29 12:27:46 +02:00
Jules Aguillon
eb42943327 Specify localized keys in each layouts
Each layouts can chose which key are localized instead of specifying it
globally for each key.

Important keys are no longer removed from layouts if the 'extra_keys'
mechanism is not working properly. This can happen if language tags
specified in method.xml don't match the user's language.

Removed some currency symbols from some layouts. They are all in the Fn
layer.
2022-05-08 17:35:24 +02:00
Jules Aguillon
121a2ba76f Find closest key further
The previous limit was checking d-1 and d+1, the new limit also tries
d-2 and d+2.
2022-05-08 16:56:34 +02:00
Jules Aguillon
82d3290c6a Fix vibration when pointer move slightly
Fix the bug introduced in the parent commit.
2022-05-08 16:55:03 +02:00
Jules Aguillon
b15ca662c2 Better handling of removed keys and swipe geture
The "closest key" logic must be careful not to reveal keys removed by a
modifier.

Must check [_handler.onPointerSwipe] for every candidate values.
[selected_value] is changed back to [selected_direction].

This adds a new bug: When the direction change, the selected value might
not change but a vibration will be triggered anyway.
2022-05-08 16:55:03 +02:00
Jules Aguillon
9a48acfe3e Improve nearest key computation
getAtDirection was too hard to maintain and might contain bugs.
Change slightly the meaning of directions and implement a the nearest
key calculation as a loop.
2022-05-08 16:55:03 +02:00
Rodrigo Batista de Moraes
bce0a98f62 only vibrate when the swipe key changes 2022-05-08 16:55:03 +02:00
Rodrigo Batista de Moraes
a27c64479f use the closest swipe key on swipe
fix a direction
2022-05-08 16:55:03 +02:00
Jules Aguillon
7da7a5082d Set the color of the navigation bar
Since SDK 21, applications can set the background color of the
navigation bar. This is normally simply an item in a theme but it is
more complicated for keyboards.
2022-05-07 23:51:00 +02:00
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
Jules Aguillon
87144fd3a8 Reduce the text size for some keys
The symbols are now smaller for Shift, Space, Backspace, Delete and
some keys on the bottom row.

The previous rule was to make the text smaller for symbols made of
several characters.
This is changed to a flag approach.
2022-02-27 15:23:36 +01:00
Jules Aguillon
1451857c92 Compute text size depending on actual row height
Use the height of the row currently being rendered instead of the base
row size.
Concretely, the bottom row is slightly smaller and will get slightly
smaller text.

Also:
- Rewrite the label rendering code
- Render labels at the middle of the key (was slightly off)
2022-02-27 02:26:45 +01:00
Jules Aguillon
23685ddb3c Compute text size relative to key height
Instead of a fixed size that don't work at all for bigger screens.

Other tweaks:
- Use the value-land dimens to vary 'extra_horizontal_margin'
- Move label size to Config, because it can change at runtime (rotation)
- Slightly decrease the size of "long" symbols
2022-02-27 01:50:24 +01:00
Raphael
067ab90847 Update symbols from unicode to font-Icon 2022-02-26 20:49:09 +01:00
Jules Aguillon
7aa280b888 Tweak repeat timing for modulated keys
Make modulated keys repeat twice as slow by default and start repeating
twice as early.
2022-02-22 19:46:41 +01:00
Jules Aguillon
14dabb6f51 Send key events for the modifiers
Before sending a key event while modifiers are active, send events for
the modifier keys.

Some applications don't look at the "metaState" flags but instead keep
track of the up and down events for the modifiers.

For example, the basic text views that are in every applications
correctly handle the "metaState" flags except for one binding:
Selecting text with the arrows while pressing shift.
2022-02-22 19:32:16 +01:00
Jules Aguillon
583aa55259 Update the spanish locale
To use the new layout.
2022-02-22 19:08:44 +01:00
Jules Aguillon
c85e9a91d1 Improve modulated key repeat
Change the formula: don't use an external constant, add a state.
It's now the ratio between where the finger is at the first repeat and
where it is now.

Keep the repeat going when swiping into an other key. Currently only for
arrows: It's now possible to go from an arrow to an other without
waiting again for the key repeat timeout.

The backspace and delete keys don't work well with this.
2022-02-21 00:24:57 +01:00
Jules Aguillon
51ff795be4 Move pointer handling code to its own class
Separate the concerns and have a clearer interface between the two parts
of the code.
2022-02-20 13:09:39 +01:00
Jules Aguillon
632a9ac590 Localize € and £
Show these characters only for users that have the corresponding locale
installed (a supported eu language for €, en-GB for £).
Add these characters to most layouts.
2022-02-19 21:48:48 +01:00
Jules Aguillon
04c84a8f66 Add Ord+* = ° 2022-02-19 21:01:52 +01:00
Raphael
d2570bc2ea add-ordinal-numbers-symbol-system 2022-02-19 20:59:49 +01:00
Jules Aguillon
c05fdea765 Define the height of the keyboard relative to the screen size
Depending on the pixel density isn't ideal for a keyboard, which would
render differently depending on the "scaling" accessibility option.

Landscape mode needs a special values. At the same time, increase the
horizontal margin when landscape.
2022-02-13 15:58:30 +01:00
Vladimir Chernov
4e98ab7515
Add Russian layout (#66)
* Add Russian layout

Co-authored-by: Jules Aguillon <jules@j3s.fr>
2022-02-13 13:56:46 +01:00
Jules Aguillon
fda6895dc8 Use the improved font for shift, globe, enter and space
These glyph were available in the custom font but not used yet.
2022-02-13 13:46:37 +01:00
Jules Aguillon
94fed03a67 Scale the bottom row depending on the host layout
1ff8526 added a bug for layouts that weren't 10 units wide.
2022-02-13 13:20:22 +01:00
Jules Aguillon
1ff8526d24 Define the bottom row separately
Avoid divergences when the bottom row is modified.
2022-02-07 00:55:32 +01:00
AlexandraAlter
a76541458d
Dvorak layout (#16) 2022-02-07 00:06:49 +01:00
Max Schillinger
d014a7dd8c Replace unusual return symbol 2022-02-06 23:58:17 +01:00
Max Schillinger
93edc4ac42 Allow egde keys instead of corner keys (swipe vertically/horizontally)
Add a new boolean parameter "edgekeys" for defining keys that have the
additional (swipe) keys on the edges (top, right, left, bottom) instead
of at the corners (top left, top right, bottom left, bottom right).
2022-02-06 23:49:43 +01:00
Jules Aguillon
95c8acc31e Add the Meta key
Currently using the diamond symbol like the history meta key: https://en.wikipedia.org/wiki/Meta_key
However, this key is actually interpreted as the Super/Windows key but
Android calls it "meta" internally.
2022-02-06 23:01:35 +01:00
Jules Aguillon
2d2f0dd51d Add options for the spacing between the keys
Two options: vertical and horizontal.
2022-01-30 23:55:15 +01:00
Jules Aguillon
8631dfb723 Select theme depending on system settings
Automatically choose between the Dark and Light themes.
2022-01-30 23:29:50 +01:00
Jules Aguillon
2f47d2400b Improve Action key detection
There were two problems:
- The Action key was swapped when it shouldn't be. The flag
  'IME_FLAG_NO_ENTER_ACTION' wasn't interpreted correctly for inputs
  that specified both an action and this flag.
- The value 'IME_ACTION_UNSPECIFIED' should remove the Action key.
2022-01-30 12:17:31 +01:00
Jules Aguillon
7af579a1bc Fn+Tab to send the tab character 2022-01-29 20:03:17 +01:00
Jules Aguillon
4333575bb9 Add support for the Bulgarian language and layout
Thanks Zdravko Iskrenov for the contribution.
2022-01-29 19:27:33 +01:00
Jules Aguillon
e0217c650d Fix modifier not working on non-ASCII
Characters defined in layouts that aren't defined in KeyValue weren't
recognized as character keys. Not working with modifiers.
2022-01-29 18:56:10 +01:00
Edgars
88e21758bc Add Latvian specific QWERTY layout
A customised Latvian specific QWERTY layout (QWERTY (Latvian)) was added
to access all Latvian diacritic characters with a swipe.

Additionally caron, cedille and macron accents were enabled for this
layout.
2022-01-29 17:56:25 +01:00
Jules Aguillon
e031de6b57 Globe key: Open keyboard switching dialog
instead of immediately switching to the next input method.
2022-01-23 19:40:45 +01:00
Jules Aguillon
cb95e99f50 Make action key labels translatable 2022-01-23 19:20:02 +01:00
Edgars
3ab2228065 Use symbols for configuration and emoji keys
`srcs/juloo.keyboard2/KeyValue.java` was updated to replace `Conf` with
`⛭` (`\u2699`) and `:)` with `☻` (`\u263B`).
2022-01-22 21:13:46 +01:00
Edgars
0bf7ff5f34 Add keys for Latvian
New accents - caron and macron - were defined and QWERTY layout was
updated to add accents for Latvian specific characters.
2022-01-20 22:01:34 +01:00
Jules Aguillon
100e0b270d Fix crash when switching app 2022-01-20 21:22:09 +01:00
Moini
133b6ec2c1
German keyboard added (#20)
* Add German metadata translation

* Add German keyboard

Co-authored-by: Jules Aguillon <jules@j3s.fr>
2022-01-15 20:56:08 +01:00
Jules Aguillon
833dfa31bb Fix miscalculation of the space between the keys
'keyVerticalInterval' was mistakenly used to compute the height of the
keyboard and the vertical position of keys.
While the code handling pointers did not use this value, the hit box of
the bottom row was shifted by several pixels.

Make sure 'keyVerticalInterval' is only used for rendering and not for
placing the keys.
2022-01-15 20:24:27 +01:00
Jules Aguillon
dfec26a93b Swap the Enter and Action keys when needed
When IME_FLAG_NO_ENTER_ACTION is set.
2022-01-10 00:27:22 +01:00
Jules Aguillon
53113cadd9 Add the Action key
It is placed on the top-right of the enter key on every layouts.
It sends a special event (performEditorAction) instead of writing a
newline.

The "actionId" is passed through the EditorInfo object in an obfuscated
way so it's not clear whether it's using the right one.
2022-01-09 20:26:06 +01:00
Jules Aguillon
93e84ba7e9 Add the German language
Add the 'ß' character on the bottom-left corner of the 's' key, which is
hidden for other languages.

Co-authored-by: Moini <moini@noreply.invalid>
2022-01-09 12:49:28 +01:00
Jules Aguillon
23e59c6b09 Allow to hide more keys than just accents
Add the "FLAGS_LANGS" set of flags, which will be used to hide
individual keys that are not accents.
2022-01-09 12:47:47 +01:00
Jules Aguillon
2764e96eb1 Change the key combination for °
To Fn+*

Was previously accent^+*, which was not available for most languages.
2022-01-01 19:00:27 +01:00
Jules Aguillon
9c82c9cfdc Improve the "precision" option
Now named "swiping distance". Changed to a dropdown.
2021-12-30 22:22:25 +01:00
Jules Aguillon
8bef0728ae Turn the "precision" option to dp instead of px 2021-12-30 21:59:48 +01:00
Jules Aguillon
f69a0605a8 Add the Black theme
Friendly to Amoled screens.
The background of keys is the same as the background of the whole
keyboard: pure black.
Colors are also slightly stronger.
2021-12-30 00:53:48 +01:00
Jules Aguillon
29367f127d Move the border radius from Config to Theme
Also, draw activated keys with a round border too.
2021-12-30 00:52:50 +01:00
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
Jules Aguillon
f8bce500ff Hide the input switching key if it's not needed
Android has a new way of switching between input methods and this key
need to be hidden in most cases.
2021-04-18 00:55:31 +02:00
Jules Aguillon
1421bccc7b Remove fixed keyboard width
Remove the constant of keys per rows. Add the 'shift' attribute to
declare eventual alignment/blanks in layouts.
2021-04-17 23:56:51 +02:00
Jules Aguillon
ca07bff133 Use subtypes to choose layout
This removes the "layout" setting. Every layouts that the user could use
will appear in the global settings.
2021-04-15 23:56:34 +02:00
Jules Aguillon
c22ca7302c Stateless KeyboardData class
It was a pain to use. It was also a pain to write this though.
2021-04-15 23:23:31 +02:00
Jules Aguillon
eac74d3f22 Add an option to toggle accent keys
These keys are not useful at all in English. A new option allows to hide
them, [false] by default.
2021-04-13 02:00:08 +02:00
Jules Aguillon
0b1befcc88 Fix layout pref under debug builds
Remove the use of [getIdentifier] because it requires the current
package name to be passed, which can't be found reliably since the
change in build system.
2021-04-13 01:58:25 +02:00
Jules Aguillon
a165a0ab2e Update the list of emojis
Take the list from https://unicode.org/Public/emoji/13.1/emoji-test.txt
Also change the list of groups, from the same source.
2021-01-17 00:20:09 +01:00