abouttreesummaryrefslogcommitdiff
path: root/srcs
AgeCommit message (Collapse)AuthorFilesLines
2024-05-29Add compose sequences for Greek, Cyrillic, Hebrew and moreJules Aguillon3-166/+2255
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-29Allow compose sequence ending with more symbolsJules Aguillon3-162/+191
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-29Fix overflow due to navigation on the right and cutouts (#641)Jules Aguillon1-0/+15
Take display cutouts and navigation bars when computing the keyboard width on SDK >= 30.
2024-05-29Configure anticircle gesture per-key (#644)Jules Aguillon4-20/+50
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-29Fix uninitialized bottom_row when editing custom layoutJules Aguillon3-33/+49
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-27Fix off-by-one error in 1-row layoutsJules Aguillon1-1/+1
2024-05-26Support the nnbsp characterJules Aguillon1-0/+1
2024-05-25Add missing characters to hang_dubeolsik_krJules Aguillon1-35/+24
2024-05-25Circle and round trip gestures (#640)Jules Aguillon4-41/+273
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-08Pull the emoji list from unicode.org (#612)Quinn Cypher3-68/+800
- 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-08Compass-point synonyms for edge keys in layouts (#628)Spike1-19/+34
2024-05-05Add settings button to launcher app (#629)alotbsol5551-0/+16
2024-05-02Hangul support (#595)Jules Aguillon3-2/+170
* 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-02Allow the newline character '\n' in layoutsJules Aguillon1-0/+1
2024-05-02More precise and faster spacebar slider (#593)Jules Aguillon4-44/+119
* Make slider speed independent from swipe distance Swipe distances other than the default resulted in a slider that were not easy to control. * refactor: Add class Pointers.Sliding It holds the states and the code needed to make the slider work. 'Pointer.sliding' is set to [null] when sliding is not in progress. The implementation is changed not to depend on [downX] and [dx] but instead use the pointer's [x] coordinate directly. * Move the cursor further for faster slides In sliding mode, compute the speed of the pointer and use it to increase at which the cursor moves. * refactor: Separate kind for cursor movement keys This allows to define a key that moves the cursor more than one position at a time. This will be used to avoid lag during fast slider movements. * Reduce lag when sliding quickly on the spacebar Avoid sending key events in a loop while sliding quickly in a cursor movement key. Key of kind Cursor_move are "multiplied", meaning a single key event represents a movement of more than one position, reducing the number of key events sent. This is only for cursor move keys.
2024-05-02allow for <fn ...> in <modmap> (#626)alotbsol5552-4/+27
2024-05-02Clear cache when changing layoutJules Aguillon1-1/+8
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-04-25Add more accented characters to KeyModifier.java (#622)JapanYoshi1-3/+67
2024-04-19Turkish: Correct shift behavior for ı and i (#615)JapanYoshi1-0/+4
2024-04-03Fix space key without a symbolJules Aguillon1-1/+6
The symbol on the space key was accidentally lost in be97364 when the string "\r" (Java's only way to write "\x0D") was not replaced by "\xE00D".
2024-04-03Add Danish layout (#606)Tomasz Cielecki1-0/+41
2024-04-01refactor: Apply the modmap in KeyModifierJules Aguillon2-9/+12
This makes possible to apply other modifiers to mapped keys and ensures that the modmap really override the shift key behavior.
2024-03-23Add Shaw Imperial layout (#592)Lev Brekalov1-0/+52
2024-03-18refactor: Implement Compose without global stateJules Aguillon5-32/+32
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-18refactor: Allow modifier of other key kindsJules Aguillon4-32/+69
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-18refactor: Use Pointers.Modifiers.has lessJules Aguillon1-6/+5
The performance characteristics of this function will change in future plans.
2024-03-16Fix potential out of bounds accessJules Aguillon1-1/+1
The preferred pos mechanism could cause an out of bounds access on 1 row layouts.
2024-03-11Improve the QWERTY (Slovak) layoutJules Aguillon1-5/+4
The grid layout was not likeable.
2024-03-11refactor: Pointers: Flag for sliding stateJules Aguillon1-7/+5
2024-03-11refactor: Add latched flag to PointersJules Aguillon1-8/+14
2024-03-11refactor: Use internal flags in PointersJules Aguillon3-40/+44
'FLAG_LOCKED' and 'FLAG_FAKE_PTR' are only used within Pointers. Define new flags in Pointers and remove these from KeyValue. Also allows to define new flags.
2024-03-03Gujarati phonetic layout (#562)Yogesh-B2-0/+84
added shift modifier characters Add support for gujarati numerals Co-authored-by: yogesh-b <yogesh@improwised.com>
2024-03-03Fix auto-capitalisation disabling locked shiftJules Aguillon2-22/+34
Shift locked via the "caps lock" key use the "fake pointer" mechanism that is also used by auto-capitalisation. Make sure that unlatching a fake pointer do not disabled a locked modifier. The implementation is moved into the Pointers class for a safer API and easier implementation.
2024-03-02Add QWERTY (Slovak) layoutJules Aguillon1-0/+38
The original author is @sejkm in https://github.com/Julow/Unexpected-Keyboard/issues/573
2024-03-02compose: Parse json files and fix edge casesJules Aguillon1-2/+21
There's no json file yet, this was part of an experiment. Add a missing escape rule and detect colliding sequences.
2024-03-02compose: Add a README.mdJules Aguillon1-0/+8
Mention the source of the sequences files.
2024-03-02Improve the AZERTY layoutJules Aguillon1-5/+5
Add éèàç directly to the layout, which removes the corresponding dead keys. Remove the requirement for ù and ÿ from method.xml, which are extremely rare and can be typed via the compose key.
2024-02-28Modify the number row according to the numpad scriptJules Aguillon2-13/+27
The same way as the numpad is modified.
2024-02-28Fix localized numpad outputing wester arabic numbersJules Aguillon1-2/+2
The number keys were constructed in the wrong way: the rendered symbol was correct but not the underlying character that is typed.
2024-02-22Ensure the layout contain the config keyJules Aguillon1-0/+3
Without the config key, the user risk being locked in a custom layout that lacks an escape key like 'switch_numpad', 'change_method', etc..
2024-02-18Relicense layout definitions under CC0 (#528)Jules Aguillon3-0/+136
* Relicense layouts under CC0 Layout definitions are licensed differently from the rest of the application source code to allow use in other projects related or unrelated to Unexpected Keyboard. Some layouts are not re-licensed and their original copyright continues to apply. The copyright notice is added at the top of the files. * Contributing: Mention layout licensing
2024-02-18neo2: Update bottom row (#560)matthiakl1-7/+7
2024-02-17Allow to remove the compose key in the settingsJules Aguillon1-11/+14
2024-02-17compose: Grey out keys that are not in sequenceJules Aguillon6-13/+22
Keys that are not in the pending compose sequence are greyed out with the new 'FLAG_GREYED' flag.
2024-02-17Dim secondary keys in every themesJules Aguillon1-4/+6
Themes do not dim secondary keys the same way due to the "offset" mechanism. Instead, use a ratio that is the same for every themes. It's still possible to override this ratio per theme.
2024-02-17Fix KeyValue flags layoutJules Aguillon1-17/+22
The kind field wasn't large enough to hold the new Compose_pending kind. The flags field is reduced in size by removing a free spot. The FLAGS_BITS mask is defined in a safer way.
2024-02-17compose: Add glyphJules Aguillon2-1/+9
2024-02-17compose: Don't remove keys not in sequenceJules Aguillon1-7/+14
Keys that are not part of any possible sequences are now dimmed and still usable instead of being removed, which felt weird.
2024-02-17compose: Add X11 compose sequencesJules Aguillon5-29/+5528
compile.py implements a parser for X11's Compose.pre files. A lot of code is necessary to interpret character names but thanksfully, the name of most characters is contained in the file. The state machine is compiled into two char arrays which unfortunately requires an expensive initialisation and allocation.
2024-02-17Compose keyJules Aguillon9-9/+229
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.