Commit Graph

472 Commits

Author SHA1 Message Date
Jules Aguillon
be053b082c Add more Russian vowels combined with acute accent 2024-02-06 23:32:58 +01:00
vedamanavi
d1aa59768d
Create layout arabic-hamvaj-tly (#542) 2024-02-04 23:18:33 +01:00
Jules Aguillon
2c52e94e0b Workaround cursor slider bug in Acode
Moving the cursor with setSelection has no effect on Acode, for which
the fallback must be used.
2024-02-04 00:29:07 +01:00
vedamanavi
44f39059e4
Add layout QWERTY (Talysh New Latin) (#529) 2024-01-28 23:49:27 +01:00
Jules Aguillon
bbc6226839 Redefined the key margin options in percent
Define the key margin options relative to the baseline dimensions of
keys. This removes the doubling of the horizontal margin in landscape
mode.
2024-01-28 19:38:29 +01:00
Jules Aguillon
c5f2c0b727 Send down event for modifiers on time
This allows to use modifiers in combination with other inputs like a
mouse click, for example under termux-x11.

The key down event and notification about modifiers changing are sent
down to KeyEventHandler. A mutable state remember for which modifier
down events have been sent.

When pressing down a modifier with one finger and typing with the
other, it might appear that the modifier is released after the first
time an other key is pressed and then pressed and released for the
following keys.
This prevents unintentionally type two modified keys instead of one
when the second key is pressed while the other is not yet released.
2024-01-26 00:17:51 +01:00
Jules Aguillon
5beacf32b7 Add Russian vowels combined with the acute accent 2024-01-21 19:47:03 +01:00
Jules Aguillon
ad7314a016 Move layout definitions into srcs/layouts
This separates the layout definitions from the special layouts
(bottom_row, greekmath) and other unrelated files (method, settings).

This is also a more intuitive location for layouts and make the resource
directory easier to navigate.

Under the hood, layouts are copied back into
build/generated-resources/xml.
2024-01-21 16:34:49 +01:00
RetrogisusDEV
a55506e607 Light and dark themes for the launcher and settings 2024-01-20 22:37:51 +01:00
Jules Aguillon
95bd9312a7 Allow hidding the keyboard switching key
The keyboard switching key is now selected by default in the Extra Keys
option and can be deselected.
2024-01-15 23:26:40 +01:00
Jules Aguillon
0a86f9ab01 Always show the keyboard switching key
Android's shouldOfferSwitchingToNextInputMethod() method might return
false when an other IME is installed, perhaps when the other IME doesn't
specify android:supportsSwitchingToNextInputMethod="true".
2024-01-15 23:15:16 +01:00
Jules Aguillon
70d777253c Use switchToNextInputMethod instead of switchToPreviousInputMethod
This is warranted by the API.
2024-01-15 22:10:11 +01:00
Jules Aguillon
d7fa5ffa9a Refactor: Clearer names for CHANGE_METHOD* events
The keys are not renamed to retain compatibility.
2024-01-15 22:09:15 +01:00
Jules Aguillon
b114c78bf1 Refactor: Keyboard2View: Take layout id attr
Removes EmojiBottomRow.
2024-01-13 23:22:26 +01:00
Jules Aguillon
eddf9c6c11 Refactor: New namespace for preference classes 2024-01-13 20:59:05 +01:00
Jules Aguillon
148f3dfc05 prefs: Show custom layout names if provided
Show the name of custom layouts in the list if it's provided using the
`name` attribute.
This should make managing several custom layouts easier.
2024-01-10 23:39:19 +01:00
Jules Aguillon
b319356a08 Fix crash on shift with empty keys
Tapping shift might call `Utils.capitalize_string` on some symbols
(notably custom keys), which crashes on empty string.

This also happens on builtin layouts with `key1="\"`.
2024-01-10 00:17:09 +01:00
Jules Aguillon
73267d68fb Revert "Remove the vibration settings"
This reverts commits ef03dfed5c and
ff01678ba6.

The "vibration duration" slider is bought back.
The "vibration enabled" option is replaced by "custom vibration", which switch between the system haptic feedback or the custom vibration.

The slider is greyed when "custom vibration" is unchecked and is
allowed to have a value of 0 to disable vibrations within the app.

The intermediate values "light", "medium" and "strong" are removed and
no migration of the setting is made.
2024-01-09 00:43:28 +01:00
Jules Aguillon
409362ddb4 launcher: Remove intro video when not supported
Previously, this would trigger an error popup and make the activity
unresponsive.
2024-01-03 00:48:26 +01:00
Jules Aguillon
c524caa6f1 Remove unsupported API readAllBytes 2024-01-01 21:04:54 +01:00
Jules Aguillon
49a6a30773 Add an introduction video in the launcher activity
A video is more intuitive than a written description and doesn't need
translations.
2023-12-31 13:18:15 +01:00
Jules Aguillon
4a5a125aea Bring the voice IME chooser with a long press 2023-12-30 01:24:21 +01:00
Jules Aguillon
51a41ec90a Voice IME chooser popup
Bring a popup for choosing the voice IME when the voice key is pressed
for the first time or the list of voice IMEs installed on the device
change.

A preference stores the last selected IME and the last seen list of
IMEs.
2023-12-30 00:56:55 +01:00
Jules Aguillon
7e7a5e4425 Separate arabic layouts with hindu or arabic numerals
This reverts the Tusinian layout (1af4e45) and instead introduce a new
arabic PC layout with arabic numbers.

Layouts are renamed:
- arab_pc => arab_pc_hindu
- arab_pc_tn => arab_pc
2023-12-26 17:16:29 +01:00
Jules Aguillon
9ff8179d49 Add layout attribute 'numpad_script'
This new attribute is now used instead of 'script' for modifying the
numpad according to the selected layout's script.
If not provided, it defaults to the value of 'script'.
2023-12-26 17:05:51 +01:00
Jules Aguillon
2db4ae3730 Fix the number row showing up on top of pinentry
This wasn't intended and was caused by the "current_layout_unmodified"
optimisation.
2023-12-21 20:59:30 +01:00
RetrogisusDEV
df04eae85f Launcher activity: Add "Select keyboard" button 2023-12-17 20:10:39 +01:00
Jules Aguillon
d7c230e173 prefs: Use QWERTY (US) as the default custom layout
This layout definition contains some documentation and is a better
default than no text.
2023-12-17 12:41:19 +01:00
Jules Aguillon
478d8082f4 Improve layout parsing errors
Add location information to all error and improve "expected tag" errors.
2023-12-17 12:12:23 +01:00
Jules Aguillon
7af6adcf11 prefs: Report errors while editing custom layouts
Errors are obtained by running the parser, validation is throttle to
when the user stops editing for a second.
2023-12-17 11:58:41 +01:00
Jules Aguillon
dd327cc812 prefs: Render line numbers in custom layout input box
Line numbers will help reporting errors. Also, disable line breaking to
improve readability.
2023-12-10 19:44:50 +01:00
deftkHD
684d5c7b70
Use Gradle (#452) 2023-11-25 20:11:12 +01:00
Jules Aguillon
44adb55544 Separately persisted current layout in landscape mode
Remember the selected layout in portrait and landscape mode
independently.
This allows to define a layout specific to landscape without having to
switch manually.
2023-11-19 20:10:45 +01:00
Jules Aguillon
15de829138 Persist current selected layout 2023-11-19 19:07:54 +01:00
RetrogisusDEV
80c6f97767 Add Desert and Jungle themes 2023-11-19 11:33:39 +01:00
Jules Aguillon
148bed769a Add left/right slider to the emoji pane
This entirely changes the implementation of the bottom row in the emoji
pane.
2023-10-28 20:14:32 +02:00
deftk
3d36ecb34d Make special font glyphs pass linting 2023-10-28 18:48:25 +02:00
Jules Aguillon
2d164ca64f Add '₽' to Russian layout and to the Fn layer
Other currencies are moved on the Fn layer for consistency with the
compose key.
2023-10-21 11:56:56 +02:00
Jules Aguillon
33653a94cb Add page_up, page_down, home, end to extra keys
The new keys are placed on the corner of the arrow keys. Key
descriptions are added.

They are removed from the Fn layer to avoid showing up twice.
2023-10-20 12:20:25 +02:00
Jules Aguillon
d5cbcb37e3 Preferred position for locale extra_keys
`method.xml` is now able to specify a preferred position for each extra
keys in term of an other key to which it should be placed nearby.

It's implemented for French as an example.
2023-09-24 16:35:24 +02:00
Jules Aguillon
66b1bdc9c9 Refactor: Preferred positions for extra keys
The new PreferredPos class represents where an extra key should be
placed
Currently used to place keys at the same positions they were placed
before.
2023-09-15 18:00:27 +02:00
Jules Aguillon
d771e9d2c7 Refactor: Compute key positions in layouts
`KeyboardData.getKeys()` now returns a map of the keys present on the
layout to their position. Positions are the row, column and swipe
direction.

The computed map is cached in the KeyboardData object as it might be
accessed later by `findKeyWithValue`, which now do less work.
2023-09-10 11:43:56 +02:00
Jules Aguillon
44e2e86f19 Capitalize the first letter of custom keys
This is more useful than turning the entire string full caps.
2023-09-09 14:32:03 +02:00
Jules Aguillon
92a8db5e93 Update auto-capitalisation state when input starts
The initial capitalisation state given by the editor
(`info.initialCapsMode`) is always 0 in many editors.

For some text input types, update the state when typing starts,
disregarding the value given by `info.initialCapsMode`.
2023-09-09 14:15:44 +02:00
Jules Aguillon
687d88f4f7 Per-script numpad
The numeric layout and the optional right hand side numpad are modified
to show the digits belonging to the script used in the current layout.

The numpads are still defined as it was before. The digits are changed
in `modify_numpad` if needed.
2023-09-03 23:38:55 +02:00
Jules Aguillon
b079e5cf43 Consistent layout for optional numpad
Modify the optional right hand numpad the same way as the numeric
layout.
2023-09-03 23:36:49 +02:00
Jules Aguillon
816269aed0 Remove unused editing keys from the settings
These keys don't seem to have a purpose, which is confusing.
2023-09-03 15:05:23 +02:00
Jules Aguillon
9b917e79b1 Fix regression on Ctrl on space bar slider
This makes Ctrl+move_cursor the same as before 5123ce5.
2023-08-26 23:44:41 +02:00
Jules Aguillon
f4c11d99ed Disable automatically Shift when pressing Ctrl
Automatic capitalisation might interferes with keyboard shortcuts.
2023-08-26 23:37:22 +02:00
Jules Aguillon
cf76118548 Add missing combining accents
Implement the combinations that were previously not possible and were
commented out.

Also remove `apply_dead_char` and `apply_combining` and make all
dead-keys definitions uniform.
2023-08-20 01:03:14 +02:00