Added Arabic keyboard layout - #13
Open
k-alnuaimi wants to merge 1 commit into
Open
Conversation
Adds a standard Arabic layout alongside the English ones, plus the plumbing an RTL, caseless language needs: - Layout gains a layoutDirection, applied by Lp3Keyboard. The Arabic letter rows and backspace render right-to-left; digits, paired symbols and the utility row stay left-to-right. - Lp3BaseViewModel holds the shared viewmodel logic, with the number, symbol and emoji layers and long-press alternates as parameters. EnBaseViewModel keeps its signature and fills in the EnShared ones. - Rows 1 and 2 are the standard Arabic rows truncated to 10 keys, so those 20 keys keep their usual positions. The letters that fall off the ends join row 3, which has 8 keys since Arabic needs no shift. Hamza forms, ة and ى are on long-press. - Number layer keeps Western digits with Arabic punctuation (، ؛ ؟). - back_lp3 and return_lp3 are autoMirrored, and MultiLabelKey pins its label to LTR so "#+=" doesn't render reversed. The sample app's text field now follows the active layout's direction.
Contributor
|
thank you for this!! Gonna take a look Friday/early next week |
dupontgu
requested changes
Aug 1, 2026
dupontgu
left a comment
Contributor
There was a problem hiding this comment.
Thanks again for doing this. Technically I think it's perfect, but I got some feedback from a user that the keys were in the opposite order from right to left than they would expect. Does that ring true? I don't think it would be a difficult change. Here's the implementation from this PR vs. a Gboard screenshot:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a standard Arabic layout alongside the English ones, plus the plumbing an RTL, caseless language needs:
The sample app's text field now follows the active layout's direction.