Module:Btn

local getArgs = require('Module:Arguments').getArgs local p = {}

function p.main(frame) local args = getArgs(frame) return p._main(args) end

function p.tt(text, tooltip_text) result = ""..text.." " return result end

function p._main(args) buttons = { ["shift"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/8/8f/ButtonShift.png", "Shift key"), ["enter"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/7/72/ButtonEnter.png", "Enter key"), ["backspace"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/f/f9/ButtonBackspace.png", "← Backspace key"), ["back"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/f/f9/ButtonBackspace.png", "← Backspace key"), ["bksp"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/f/f9/ButtonBackspace.png", "← Backspace key"), ["ctrl"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/2/2e/Ctrl.png/revision/latest?cb=20230803052607&format=original", "Ctrl key"), ["control"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/2/2e/Ctrl.png/revision/latest?cb=20230803052607&format=original", "Ctrl key"), ["esc"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/7/7c/ButtonEscape.png", "Escape key"), ["escape"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/7/7c/ButtonEscape.png", "Escape key"), ["w"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/f/f9/ButtonW.png", "W key"), ["a"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/5/50/ButtonA.png", "A key"), ["s"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/b/b4/ButtonS.png", "S key"), ["d"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/e/ef/ButtonD.png", "D key"), ["f"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/e/e9/ButtonF.png", "F key"), ["m"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/5/53/ButtonM.png", "M key"), ["z"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/e/e9/ButtonZ.png", "Z key"), ["x"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/6/6e/ButtonX.png", "X key"), ["c"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/8/82/ButtonC.png", "C key"), ["v"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/b/bc/ButtonV.png", "V key"), ["1"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/1/19/Button1.png", "1 key"), ["2"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/8/8f/Button2.png", "2 key"), ["3"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/f/fd/Button3.png", "3 key"), ["4"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/5/53/Button4.png", "4 key"), ["up"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/9/9b/ButtonUp.png", "Up arrow key"), ["down"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/2/24/ButtonDown.png", "Down arrow key"), ["left"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/d/de/ButtonLeft.png", "Left arrow key"), ["right"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/a/ab/ButtonRight.png", "Right arrow key"), ["home"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/2/2d/ButtonHome.png", "Home key"), ["end"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/b/ba/ButtonEnd.png", "End key"), ["fn"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/3/35/ButtonFn.png", "Fn key"), ["f9"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/9/98/ButtonF9.png", "F9 key"), ["f10"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/2/2e/ButtonF10.png", "F10 key"), ["f11"] = p.tt("https://static.wikia.nocookie.net/pmysteryuniverse/images/1/11/ButtonF11.png", "F11 key") }

input = {}

for k, v in pairs(args) do       v = string.lower(v) table.insert(input, buttons[v]) end

return "" .. table.concat(input, " + ") .. " "

end return p