![]() |
VOOZH | about |
This module implements {{keys}}.
The key symbols are kept at Module:Keys/Symbols.
localp={} p.keys=function(f) localargs=f iff==mw.getCurrentFrame()then args=f:getParent().args end localkeys={} for_,keyinipairs(args)do key=mw.text.trim(key) ifkey~='+'andkey:find('%+')then localcomboKeys={} forcomboKeyinmw.text.gsplit(key,'%s*%+%s*')do table.insert(comboKeys,p.key(comboKey)) end table.insert(keys,table.concat(comboKeys,' + ')) else table.insert(keys,p.key(key)) end end returntable.concat(keys) end p.key=function(key) ifkey==''then return'' end localsymbols=mw.loadData('Module:Keys/Symbols') return'<kbd class="key nowrap">'..(symbols[key:lower()]orkey)..'</kbd>' end returnp