Commit Graph

881 Commits

Author SHA1 Message Date
Jules Aguillon
8d29d80fce clipboard: Confirmation dialog before deletion
Prevent accidentally deleting a saved clipboard.
2024-06-29 22:53:08 +02:00
Jules Aguillon
700b7e9d19 clipboard: Pasting
The paste button send the content of the pinned clip to the editor the
same way as a string key.
2024-06-29 22:53:08 +02:00
Jules Aguillon
59d2d05c50 clipboard: Add icons for the buttons 2024-06-29 22:53:08 +02:00
Jules Aguillon
d5f36885c4 clipboard: Enable history collection with a checkbox
The feature is off by default for privacy reasons. The checkbox state is
persisted in the configuration.

The history is immediately cleared when it's disabled. The content of
the system clipboard is visible when the history is enabled.
2024-06-29 22:53:08 +02:00
Jules Aguillon
461f966e6e clipboard: Allow removing history entries 2024-06-29 22:53:08 +02:00
Jules Aguillon
3b2fad8996 clipboard: Vertical layout
Put the recently copied text at the top and the pinned text at the
bottom.
This should remain intuitive as the recent history should stay small.
2024-06-29 22:53:08 +02:00
Jules Aguillon
d657d51c2b clipboard: Forget recent copied text after 5 minutes
Slightly improves privacy. Entries older than that are not useful in the
intended use case.
2024-06-29 22:53:08 +02:00
Jules Aguillon
3d95af5806 clipboard: Pinning
Allow recent clips to be pinned. Pinned clips are put a different place
and are persistent.

The pane is split in two columns, the clipboard history and the pinned
clips.

Pinned clips are stored in a new preference file.

Improved pinning layout

clipboard: Remove history entry after pinning
2024-06-29 22:53:08 +02:00
Jules Aguillon
58cb6ca232 Clipboard history pane
Work in progress: It's not yet possible to paste from the pane.

The pane can be switched to and from and displays the strings recently
added to the clipboard.

ClipboardHistoryService listens for change to the system clipboard and
keep the history in memory.
This data is not persisted to the storage.

The maximum size limits the amount of user data stored in memory but
also gives a sense to the user that the history is not persisted and can
be forgotten as soon as the app stops.
2024-06-29 22:53:08 +02:00
Jules Aguillon
45fc18576e Validate more fields in custom layouts
This adds some errors:

- 'script' or 'numpad_script' is set an empty string.
- Multiple '<modmap>' elements.
- 'shift', 'width' and 'height' on every nodes that support them are
  clamped to a valid value.
2024-06-29 22:48:47 +02:00
Jules Aguillon
b432f1d773 Set preferred position for Norwegian extra keys
This should make the QWERTY (US) layout look the same to Norwegian users
as the current latn_qwerty_no layout, allowing it to be changed.
2024-06-24 00:14:26 +02:00
Jules Aguillon
66cf643574 Remove 'loc' keys from latn_qwerty_us
Use the "preferred position" feature to place the removed keys
approximately where they were.
2024-06-24 00:07:56 +02:00
Spike
ada3b5f3b7
doc: Where to put <modmap> (#666)
* Modmap: Where to put it; cancelling built-in mods (#665)

* Correct per Julow: not only Euro layouts

* Post-edit: Doesn't depend on "built-in" layout

* P-vs-L: Change "That is to say", sentence is not a restatement

* Discussion with Julow: Swipe graphic to HTML; at most one modmap

* Swipes: Center tables
2024-06-22 23:27:29 +02:00
Jules Aguillon
6405e5e8be Don't stop keyrepeat after a circle gesture
This was inconsistent with the anticircle and roundtrip gestures.
2024-06-22 23:10:43 +02:00
Sergiy Stupar
460f25317f
Update Ukrainian translation (#670) 2024-06-16 22:39:44 +02:00
alotbsol555
81d1a1a831
Update German translations (#667) 2024-06-16 22:39:26 +02:00
Jules Aguillon
c01b289eaf Don't change input view when configuration changes
This doesn't seem necessary and won't play well with eventual keys that
change the configuration.
2024-06-16 22:20:14 +02:00
Jules Aguillon
a7b79022e5 Launcher activity: Don't consume events in text field
Allow the keybindings to have an effect in the "Try here" text field.
2024-06-16 22:19:27 +02:00
Jules Aguillon
bad2e8c237 Refactor: Remove unecessary view in emoji pane 2024-06-16 22:19:20 +02:00
solokot
b7be19dc1f
Update Russian translation (#656) 2024-06-11 00:54:19 +02:00
Jules Aguillon
b5a96dc4dc Option to tweak or disable the circle gesture 2024-06-09 14:25:19 +02:00
Jules Aguillon
944ed32a37 Use preferred dir when placing a key next to an other 2024-06-09 14:03:02 +02:00
Jules Aguillon
773147ab9c Automatic placement of f11/f12 placeholders 2024-06-09 13:55:27 +02:00
Jules Aguillon
52805d9745 Allow to remove keys Tab and Esc 2024-06-09 13:18:25 +02:00
Jules Aguillon
8d793da6b6 Refactor: Remove the KeyModifier cache 2024-06-09 12:49:23 +02:00
Jules Aguillon
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
Jules Aguillon
ecac6a77f8 compose: Compile several starting states
Sequences from several files are no longer merged but compiled to
separate starting states.

The plan is to use that to represent the diacritics.
2024-06-09 11:52:17 +02:00
Jules Aguillon
a886f6eede compose: Fix misbehaving due to encoding errors
Encoding errors in the compose data compiler due to:
- 'UTF-16' adds a BOM, use 'UTF-16-LE' instead
- 'str.encode' returns a byte array, use 'array' to have a 16-bit char
  array.
2024-06-09 10:35:38 +02:00
Jules Aguillon
1197ce36b4 Update check_layout.output 2024-06-08 22:47:55 +02:00
Spike
8b99c04a21
Flesh out custom layout doc (#651) 2024-06-08 22:22:46 +02:00
Jules Aguillon
6ac973cfda Don't cap indication length
This was inadvertently changed when the anti-circle gesture was
introduced, which use the same rendering logic.
2024-06-06 00:30:22 +02:00
Jules Aguillon
c5e9e3ff5c latn_qwerty_pl: Consistent placement for ó
Co-authored-by: @ZX-Commodore-ST
2024-06-05 23:45:03 +02:00
Jules Aguillon
cf1aaa3bdf Add compose sequences for Greek, Cyrillic, Hebrew and more
Parse key names from keysymdef.h, which is distributed with Xorg. The
Greek, Cyrillic and Hebrew sequences referenced these keysyms.

This increases the number of sequences from 2043 to 2668.
2024-05-29 15:56:08 +02:00
Jules Aguillon
39b3f50aa3 Allow compose sequence ending with more symbols
Change the compose state machine definition to allow final states that
are wider than 16-bits.

This increases the number of sequences that can be used from
en_US_UTF_8_Compose.pre from 2013 to 2043 (of 3201).
2024-05-29 15:02:08 +02:00
Jules Aguillon
f7f1d85f80 Release 1.28.0 2024-05-29 14:08:27 +02:00
Jules Aguillon
5d2eb35574 Increase target SDK to 34 2024-05-29 14:04:14 +02:00
Jules Aguillon
93d58571cc
Fix overflow due to navigation on the right and cutouts (#641)
Take display cutouts and navigation bars when computing the keyboard
width on SDK >= 30.
2024-05-29 12:00:41 +02:00
Jules Aguillon
1a290f96f2
Configure anticircle gesture per-key (#644)
This adds the new 'anticircle' attribute to layouts '<key>' elements
that configure the key to send when doing a anti-clockwise circle
gesture on it.

Labels are drawn the same way as indication.

Updated docs.
2024-05-29 11:59:54 +02:00
Jules Aguillon
304375268d Fix uninitialized bottom_row when editing custom layout
This happen when opening the settings from the launcher activity without
ever opening the keyboard.

To remove this bug entirely, the KeyboardData.init method is removed,
the pieces needing initialization are now cached in Config.
2024-05-29 11:56:26 +02:00
Jules Aguillon
9d89297c15 Fix off-by-one error in 1-row layouts 2024-05-27 23:59:09 +02:00
Jules Aguillon
46f3b41393 Support the nnbsp character 2024-05-26 00:49:15 +02:00
Jules Aguillon
bea2e6cd1f Update check_layout.output
Was outdated since previous commit
2024-05-26 00:20:36 +02:00
Jules Aguillon
abf36e5d56 Add missing characters to hang_dubeolsik_kr 2024-05-25 23:56:35 +02:00
JapanYoshi
c9b6380ed0
Add custom layout documentation in doc/ (#643) 2024-05-25 22:22:42 +02:00
Jules Aguillon
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
NACAMURA Mitsuhiro
96fc4003f1
Update NixOS wiki link (#633) 2024-05-12 10:53:04 +02:00
Quinn Cypher
a91332a903
Pull the emoji list from unicode.org (#612)
- Removing unused information (names and descriptions) from the Emoji class
- Creating a Gradle task that generates a more efficient res/raw/emojis.txt file from the most recent Unicode standard
- Saving recently used emoji preferences as emoji values rather than names
- Migrating old user preferences to the new system
2024-05-08 13:02:19 +02:00
Spike
53e04d5784
Compass-point synonyms for edge keys in layouts (#628) 2024-05-08 12:51:11 +02:00
alotbsol555
c7d33356bc
Add settings button to launcher app (#629) 2024-05-05 11:22:34 +02:00
Jules Aguillon
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