VOOZH about

URL: https://minecraft.wiki/w/Module:Keys

⇱ Module:Keys – Minecraft Wiki


Module:Keys

From Minecraft Wiki
Jump to navigation Jump to search
Documentation[view] [edit] [history] [purge]Jump to code ↴

This module implements {{keys}}.

The key symbols are kept at Module:Keys/Symbols.

[view] [edit] [history] [purge]The above documentation is transcluded from Module:Keys/doc.
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
Retrieved from "https://minecraft.wiki/w/Module:Keys?oldid=2928961"

Navigation menu