Commit Graph

96 Commits

Author SHA1 Message Date
ca25cc55f6 Apply compose sequences to String keys
Some checks failed
Make Apk CI / Build-Apk (push) Has been cancelled
Check translations / check-translations (push) Has been cancelled
Check layouts / check_layout.output (push) Has been cancelled
Check layouts / Generated files (push) Has been cancelled
This is mostly useful for characters that do not fit on a single 16-bit
char.
Shift sequences for 𝕨𝕩𝕗𝕘𝕤 are added for illustration.
2025-02-23 18:00:44 +01:00
87667a2438 Remove binding fn+shift = capslock
This made is hard to type fn+shift.
gesture+shift still locks shift.
2025-02-08 22:16:37 +01:00
a3023a7f18 Lock shift with a gesture
Some checks failed
Make Apk CI / Build-Apk (push) Has been cancelled
Check translations / check-translations (push) Has been cancelled
Check layouts / check_layout.output (push) Has been cancelled
Check layouts / Generated files (push) Has been cancelled
The circle gesture locks shift. It is also the case for the round-trip
gesture if shift is in a corner.
2025-01-03 16:08:13 +01:00
f64a0be6fa Fn: redo and pasteAsPlainText as undo and paste
Allows typing redo and pasteAsPlainText easily with Fn or the round-trip
gesture without adding them to the keyboard.
2024-12-31 12:17:22 +01:00
ae50ff2a5c Added tamil layout (#833)
Some checks are pending
Check layouts / Generated files (push) Waiting to run
Check layouts / check_layout.output (push) Waiting to run
Check translations / check-translations (push) Waiting to run
Make Apk CI / Build-Apk (push) Waiting to run
Signed-off-by: Jagadeeshan S <jagadeeshan.s@addverb.com>
2024-12-19 01:05:36 +01:00
e4a49d5256 Move numpad script maps to the compose system
Some checks failed
Check layouts / Generated files (push) Has been cancelled
Check layouts / check_layout.output (push) Has been cancelled
Check translations / check-translations (push) Has been cancelled
Make Apk CI / Build-Apk (push) Has been cancelled
This removes the Map_char interface, which required a lot of boilerplate
to use.
2024-12-11 11:24:50 +01:00
baa16d742b Add support for Kannada
Some checks are pending
Check layouts / check_layout.output (push) Waiting to run
Check layouts / Generated files (push) Waiting to run
Check translations / check-translations (push) Waiting to run
Make Apk CI / Build-Apk (push) Waiting to run
Add language support for Kannada, including a layout and numerals.
2024-12-07 22:29:15 +01:00
4eb1f8bd9e Add double grave accent (#779) 2024-12-07 13:16:43 +01:00
0d51f7ea1e Don't apply Fn to space bar left and right
"home" and "end" on the spacebar slider are not useful.
2024-11-16 11:46:43 +01:00
a8e331c322 Define the Shift modifier using the compose mechanism 2024-09-10 22:50:39 +02:00
b600332595 Define the Fn modifier using the compose mechanism
This removes 100Kb from the app.
2024-09-10 22:43:40 +02:00
72d88a5298 Map Fn+Cursor_move to home/end (#728)
Fn modifier switches cursor_left to home key, cursor_right to end key
2024-07-28 21:29:50 +02:00
29b4b665dc Allow Ctrl modmaps in layouts
The 'ctrl' modmap is different from the other modmaps as it also applies
the built-in Ctrl modifier to the resulting character, even if it was
first modified by the custom modmap.

For example, this will map Ctrl+в to Ctrl+V (not to v):

    <ctrl a="в" b="v"/>

This is intended to add keyboard shortcuts in non-latin layouts.

A caveat is that the latin character appears on the keyboard while Ctrl
is activated.
2024-07-25 23:40:58 +02:00
8d793da6b6 Refactor: Remove the KeyModifier cache 2024-06-09 12:49:23 +02:00
91ace060bc Move diacritics mapping to the compose state machine
This replaces the switch cases in KeyModifier.java with JSON files, one
for each diacritic.

The number of states increases from 6727 to 7377. The apk size slightly
decreases (around 3kb).
2024-06-09 11:53:17 +02:00
4906f8105f Circle and round trip gestures (#640)
This implements clockwise/anticlockwise circle and round trip gestures
inspired by Messagease.

The circle gestures start after a small threshold to avoid making the
regular swipe too hard to aim.

The gestures do:

- circle: The center symbol with Shift applied, with a fallback on Fn
- round trip: Same as the circle gesture but applied to a side symbol
- anticlockwise circle: Nothing currently. It is intended to be made
  configurable per-layout in the future.

The new Gesture class keeps track of what the pointer is doing while it moves
on a key. It replaces the 'selected_direction' integer.
2024-05-25 21:19:44 +02:00
69ab869079 Hangul support (#595)
* Hangul support

This works with two new kinds of keys (Hangul_initial and Hangul_medial)
that carry a precomposed hangul syllable and act as modifiers.

The hangul syllables are composed algorithmically.

* Add shift layer to Dubeolsik layout
2024-05-02 20:52:18 +02:00
82e0840568 allow for <fn ...> in <modmap> (#626) 2024-05-02 12:09:39 +02:00
c7ed2bcae9 Clear cache when changing layout
Due to the modmap, the cache must be cleared when switching layout to or
from a layout that contain a modmap.

This is broken since 3f6b6fd23, which moves the modmap handling into
KeyModifier.
2024-05-02 12:06:15 +02:00
5386541db3 Add more accented characters to KeyModifier.java (#622) 2024-04-25 13:24:52 +02:00
3f6b6fd232 refactor: Apply the modmap in KeyModifier
This makes possible to apply other modifiers to mapped keys and ensures
that the modmap really override the shift key behavior.
2024-04-01 23:01:21 +02:00
e604f6fd57 refactor: Implement Compose without global state
Thanks to the previous commit, a modifier key can now be more complex
than just a KeyValue.Modifier. This allows a more elegant implementation
of the compose key, that could be taken as a base for other features
(eg. unicode hex entry, hangul)

The COMPOSE_PENDING modifier is removed as keys of kind Compose_pending
can act as a modifier. This has the advantage of highlighting the key
that was last pressed in the sequence.

Rules are added to Pointers: Non-special but latchable keys must clear
latches and cannot be locked with a long press. These rules were not
needed before but were intended.
2024-03-18 01:00:22 +01:00
dc3a303af1 refactor: Allow modifier of other key kinds
Allow keys of a kind other than Modifier to be a modifier.

This requires writing a compareTo function for KeyValue. Fields are
compared in this order: Kind, value, flags, symbol.
2024-03-18 00:40:15 +01:00
a1de69bcc4 Gujarati phonetic layout (#562)
added shift modifier characters
Add support for gujarati numerals

Co-authored-by: yogesh-b <yogesh@improwised.com>
2024-03-03 23:12:52 +01:00
8c29073260 Compose key
The COMPOSE_PENDING modifier indicate whether a compose sequence is in
progress. The new key of kind Compose_pending sets the current state of
the sequence.

The compose sequences are compiled into a state machine by a python
script into a compact encoding.

The state of the pending compose is determined by the index of a state.
2024-02-17 23:28:31 +01:00
be053b082c Add more Russian vowels combined with acute accent 2024-02-06 23:32:58 +01:00
5beacf32b7 Add Russian vowels combined with the acute accent 2024-01-21 19:47:03 +01:00
d7fa5ffa9a Refactor: Clearer names for CHANGE_METHOD* events
The keys are not renamed to retain compatibility.
2024-01-15 22:09:15 +01:00
eddf9c6c11 Refactor: New namespace for preference classes 2024-01-13 20:59:05 +01:00
4a5a125aea Bring the voice IME chooser with a long press 2023-12-30 01:24:21 +01:00
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
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
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
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
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
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
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
40498e7b4c Refactor: Allow combining diacritics modifiers
Change the API of `KeyModifier.Map_char` to allow returning a string
instead of a single 16 bits char.

This allows to return combining diacritics.

This also gets rid of `apply_map_or_dead_char`, maps can have their own
fallback.
2023-08-20 00:44:22 +02:00
6cb6f2541b Add Bitcoin symbol to Fn+b (#434) 2023-08-18 12:14:20 +02:00
29106bc69a Add Superscript and Subscript letters 2023-08-07 18:38:53 +02:00
dcbb4c484c Modify arabic and persian numbers info function keys
And add function keys placeholders in the layouts.
2023-08-05 19:40:13 +02:00
0a114bd2bc Add dagger, double dagger, section mark, and pilcrow as extra keys on QWERTY-like layouts (#410)
* Add section mark as an extra key in QWERTY-like layouts that don't have it already

* Add dagger (also double dagger) as an extra key in QWERTY-like layouts
2023-07-29 18:42:20 +02:00
a2957a43d6 Add symbol ₴ to Fn+h and to Ukrainian 2023-07-09 16:12:13 +02:00
ef4477d50c Updated/Added Czech translation + 2 common Fn keys (#387) 2023-07-02 16:12:19 +02:00
c0833de37c Add hardcoded charmaps for most accents
`KeyCharacterMap.getDeadChar` may not be aware of the same dead keys in
older version of Android.
Hardcoded charmaps are more predictable.
2023-06-25 20:00:29 +02:00
01bfe73fc7 Explicitly map dead key for ñ
`KeyCharacterMap.getDeadChar` seems to not give the expected result on
Android 4.0. This might affect many more dead key combinations that are
not fixed by this commit.
2023-06-04 23:07:35 +02:00
6aaa497393 New Hindi layout (#313)
* New Hindi layout
* Update default layout for Marathi, Nepali
* Consistent naming for Devanagari layouts
2023-03-11 16:43:17 +01:00
0f62b3044c Option to switch to the previous input method
A new option changes the "change_method" into the new
"change_method_prev". It switch to the previously used input method.

A long press on "change_method_prev" sends "change_method".

A new section is added in the settings and existing options are moved.
2023-02-12 23:20:11 +01:00
c46e3b6c61 Modify keys after a long press 2023-02-12 23:14:57 +01:00
5fac3459aa Added missing accent that can combine with horn_accent (#293) 2023-02-09 23:38:55 +01:00