Merge pull request #376 from imAnesYT/patch-16

Arabic keyboard
This commit is contained in:
Loup 2025-05-28 21:57:20 +05:30 committed by GitHub
commit 372852ae51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 51 additions and 0 deletions

View file

@ -1861,6 +1861,25 @@
"md5sum": "3ad8036b3491588bdc8a002803f2df58"
}
}
},
"arabic_keyboard": {
"description": "Add arabic language to interal keyboard",
"external_url": "",
"authors": [
{
"name": "imAnesYT",
"email": "",
"discord": "v4_y"
}
],
"versions": {
"1.0.0": {
"api_version": 9,
"commit_sha": "665d7d4",
"released_on": "28-05-2025",
"md5sum": "7d1f771d40103c4cd3f9719353516ba7"
}
}
}
}
}

View file

@ -0,0 +1,32 @@
# ba_meta require api 9
import bauiv1
# Full Arabic characters (real Arabic keyboard layout simulation)
arabic_chars = [
list('ضصثقفغعهخحج'), # Row 1: QWERTY top
list('شسيبلاتنمكط'), # Row 2: QWERTY middle
list('ئءؤرلاىةوزظ'), # Row 3: QWERTY bottom (with 'لا' and more)
]
# Fill each row to exactly 10 characters
for row in arabic_chars:
while len(row) < 10:
row.append('') # Invisible char
# Arabic numerals and essential symbols
arabic_nums = list('١٢٣٤٥٦٧٨٩٠') + list('؟،؛ـ“”أإآًٍُِّْ')[:16]
while len(arabic_nums) < 26:
arabic_nums.append('')
# ba_meta export bauiv1.Keyboard
class ArabicKeyboard(bauiv1.Keyboard):
"""Arabic Keyboard by \ue048Freaku"""
name = 'Arabic Keyboard by yANES'
chars = arabic_chars
nums = arabic_nums
pages = {
'symbols': tuple('!@#$%^&*()-_=+[{]}\\|;:\'",<.>/?')[:26]
}