bombsquad-plugin-manager/plugins/utilities/arabic_keyboard.py
2025-05-28 16:07:16 +00:00

32 lines
991 B
Python
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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]
}