317
редагувань
starcitizen>DuskFyre Немає опису редагування |
м (6 ревізій: Template:Main_page/headerTemplate:Main page/header/styles.css) |
||
| (Не показано 3 проміжні версії 2 користувачів) | |||
| Рядок 10: | Рядок 10: | ||
['shift'] = '⇧ Shift', | ['shift'] = '⇧ Shift', | ||
['[[shift key|shift]]'] = '⇧ [[Shift key|Shift]]', | ['[[shift key|shift]]'] = '⇧ [[Shift key|Shift]]', | ||
['enter'] = '↵ Enter', | ['enter'] = '↵ Enter', | ||
['[[enter key|enter]]'] = '↵ [[Enter key|Enter]]', | ['[[enter key|enter]]'] = '↵ [[Enter key|Enter]]', | ||
| Рядок 166: | Рядок 164: | ||
end | end | ||
local lc = id:lower() | local lc = id:lower() | ||
local text = keyText[lc] or keyText[keyAlias[lc]] or | local text = keyText[lc] or keyText[keyAlias[lc]] | ||
result:add(kbdPrefix .. text .. kbdSuffix) | local leftRight = lc:match("^left ") or lc:match("^right ") | ||
if not text and leftRight then | |||
local _lc = lc:gsub("^" .. leftRight, "") | |||
local suffix = keyText[_lc] or keyText[keyAlias[_lc]] | |||
if suffix then | |||
text = leftRight:gsub("^%l", string.upper) .. " " .. suffix | |||
end | |||
end | |||
result:add(kbdPrefix .. (text or id) .. kbdSuffix) | |||
end | end | ||
return mw.getCurrentFrame():extensionTag{ | return mw.getCurrentFrame():extensionTag{ | ||