mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
97
frontend/ui/data/keyboardlayouts/fa_keyboard.lua
Normal file
97
frontend/ui/data/keyboardlayouts/fa_keyboard.lua
Normal file
@@ -0,0 +1,97 @@
|
||||
local en_popup = require("ui/data/keyboardlayouts/keypopup/en_popup")
|
||||
local fa_popup = require("ui/data/keyboardlayouts/keypopup/fa_popup")
|
||||
local com = en_popup.com -- comma (,)
|
||||
local prd = en_popup.prd -- period (.)
|
||||
local _at = en_popup._at
|
||||
local _eq = en_popup._eq -- equals sign (=)
|
||||
local alef = fa_popup.alef
|
||||
local h_aa = fa_popup.h_aa -- This is Persian letter هـ / as in English "hello".
|
||||
local waw = fa_popup.waw
|
||||
local yaa = fa_popup.yaa
|
||||
local kaf = fa_popup.kaf
|
||||
local diacritics = fa_popup.diacritics
|
||||
local diacritic_fat_ha = fa_popup.diacritic_fat_ha
|
||||
local diacritic_damma = fa_popup.diacritic_damma
|
||||
local diacritic_kasra = fa_popup.diacritic_kasra
|
||||
local diacritic_sukoon = fa_popup.diacritic_sukoon
|
||||
local diacritic_shadda = fa_popup.diacritic_shadda
|
||||
local diacritic_tanween_fath = fa_popup.diacritic_tanween_fath
|
||||
local diacritic_tanween_damm = fa_popup.diacritic_tanween_damm
|
||||
local diacritic_tanween_kasr = fa_popup.diacritic_tanween_kasr
|
||||
local arabic_comma = fa_popup.arabic_comma
|
||||
|
||||
|
||||
return {
|
||||
min_layer = 1,
|
||||
max_layer = 4,
|
||||
shiftmode_keys = {["1/2"] = true, ["2/2"] = true},
|
||||
symbolmode_keys = {["نشانهها"] = true,["الفبا"]=true}, -- نشانهها means "Symbol", الفبا means "letter" (traditionally "ABC" on QWERTY layouts)
|
||||
utf8mode_keys = {["🌐"] = true}, -- The famous globe key for layout switching
|
||||
umlautmode_keys = {["Äéß"] = false}, -- No need for this keyboard panel
|
||||
keys = {
|
||||
-- first row
|
||||
{ -- 1 2 3 4
|
||||
{ "ض", "ض", "~", "1", },
|
||||
{ "ص", "ص", "`", "2", },
|
||||
{ "ث", "ث", "|", "3", },
|
||||
{ "ق", "ق", "•", "4", },
|
||||
{ "ف", "ف", "√", "5", },
|
||||
{ "غ", "غ", "π", "6", },
|
||||
{ "ع", "ع", "÷", "7", },
|
||||
{ h_aa, h_aa, "×", "8", },
|
||||
{ "خ", "خ", "¶", "9", },
|
||||
{ "ح", "ح", "Δ", "0", },
|
||||
{ "ج", "ج", "‘", ">" },
|
||||
},
|
||||
-- second row
|
||||
{ -- 1 2 3 4
|
||||
{ "ش", "ش", "£", _at, },
|
||||
{ "س", "س", "¥", "#", },
|
||||
{ yaa, yaa, "$", "﷼", },
|
||||
{ "ب", "ب", "¢", "ـ", },
|
||||
{ "ل", "ل", "^", "&", },
|
||||
{ alef, alef, "°", "-", },
|
||||
{ "ت", "ت", "=", "+", },
|
||||
{ "ن", "ن", "{", "(", },
|
||||
{ "م", "م", "}", ")" },
|
||||
{ kaf, kaf, "\\", "٫", },
|
||||
{ "گ", "گ", "/", "<", },
|
||||
},
|
||||
-- third row
|
||||
{ -- 1 2 3 4
|
||||
{ "ظ", "ظ", "٪", "/", },
|
||||
{ "ط", "ط", "©", "«", },
|
||||
{ "ژ", "ژ", "®", "»", },
|
||||
{ "ز", "ز", "™", ":", },
|
||||
{ "ر", "ر", "✓", "؛", },
|
||||
{ "ذ", "ذ", "[", "!", },
|
||||
{ "د", "د", "]", "؟", },
|
||||
{ "پ", "پ", "↑", "↑", },
|
||||
{ waw, waw, "←", "←", },
|
||||
{ "چ", "چ", "→", "→", },
|
||||
{ label = "",
|
||||
width = 1,
|
||||
bold = false
|
||||
},
|
||||
},
|
||||
-- fourth row
|
||||
{
|
||||
{"نشانهها","نشانهها","الفبا","الفبا",
|
||||
width = 1.75},
|
||||
{ arabic_comma, arabic_comma, "2/2", "1/2",
|
||||
width = 1},
|
||||
{ label = "🌐", },
|
||||
{ label = "فاصله",
|
||||
" ", " ", " ", " ",
|
||||
width = 3.6},
|
||||
{ label = ".|.",
|
||||
diacritics, diacritics, diacritics, diacritics,
|
||||
width = 1},
|
||||
{ prd, prd, "↓", "↓", },
|
||||
{ label = "⮠",
|
||||
"\n", "\n", "\n", "\n",
|
||||
width = 1.7,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
70
frontend/ui/data/keyboardlayouts/keypopup/fa_popup.lua
Normal file
70
frontend/ui/data/keyboardlayouts/keypopup/fa_popup.lua
Normal file
@@ -0,0 +1,70 @@
|
||||
return {
|
||||
alef = {
|
||||
"ا",
|
||||
north = "أ",
|
||||
northeast = "إ",
|
||||
northwest = "ء",
|
||||
east = "آ",
|
||||
west = "ﭐ",
|
||||
},
|
||||
h_aa = {
|
||||
"ه",
|
||||
north = "ة",
|
||||
},
|
||||
waw = {
|
||||
"و",
|
||||
north = "ؤ",
|
||||
northeast = "ء",
|
||||
},
|
||||
yaa = {
|
||||
"ی",
|
||||
north = "ئ",
|
||||
northeast = "ي",
|
||||
},
|
||||
kaf = {
|
||||
"ک",
|
||||
north = "ك",
|
||||
},
|
||||
diacritic_fat_ha = {
|
||||
"َ",
|
||||
},
|
||||
diacritic_damma = {
|
||||
"ُ",
|
||||
},
|
||||
diacritic_kasra = {
|
||||
"ِ",
|
||||
},
|
||||
diacritic_sukoon = {
|
||||
"ْ",
|
||||
},
|
||||
diacritic_shadda = {
|
||||
"ّ",
|
||||
},
|
||||
diacritic_tanween_fath = {
|
||||
"ً",
|
||||
},
|
||||
diacritic_tanween_damm = {
|
||||
"ٌ",
|
||||
},
|
||||
diacritic_tanween_kasr = {
|
||||
"ٍ",
|
||||
},
|
||||
-- Diacritics (Harakat حركات)
|
||||
diacritics = {
|
||||
"",
|
||||
north = "َ",
|
||||
northeast = "ْ",
|
||||
northwest = "ً",
|
||||
east = "ُ",
|
||||
west = "ٌ",
|
||||
south= "ّ",
|
||||
southeast= "ِ",
|
||||
southwest= "ٍ",
|
||||
},
|
||||
arabic_comma = {
|
||||
"،",
|
||||
north = "؛",
|
||||
northeast="\"",
|
||||
northwest="'",
|
||||
},
|
||||
}
|
||||
@@ -666,6 +666,7 @@ local VirtualKeyboard = FocusManager:new{
|
||||
el = "el_keyboard",
|
||||
en = "en_keyboard",
|
||||
es = "es_keyboard",
|
||||
fa = "fa_keyboard",
|
||||
fr = "fr_keyboard",
|
||||
he = "he_keyboard",
|
||||
ja = "ja_keyboard",
|
||||
|
||||
Reference in New Issue
Block a user