2
0
mirror of https://github.com/koreader/koreader synced 2024-11-18 03:25:46 +00:00
koreader/frontend/ui/data/keyboardlayouts/fa_keyboard.lua

87 lines
4.2 KiB
Lua
Raw 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.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local en_popup = require("ui/data/keyboardlayouts/keypopup/en_popup")
local fa_popup = require("ui/data/keyboardlayouts/keypopup/fa_popup")
local prd = en_popup.prd -- period (.)
local _at = en_popup._at
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 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,
},
},
},
}