Module:Keyboard vis: Difference between revisions

Tristanbay (talk | contribs)
Switched to using images instead of plain text
Tristanbay (talk | contribs)
fixed resizing
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
local p = {}
local p = {}


local SIDE_L = '[[File:Keyboard_vis_side_left|20]]'
local END_L = '[[File:Keyboard_vis_end_left.png|20px]]'
local SIDE_R = '[[File:Keyboard_vis_side_right|20]]'
local END_R = '[[File:Keyboard_vis_end_right.png|20px]]'
local BORDER_BLACK_KEY = '[[File:Keyboard_vis_border_black_key|20]]'
local BORDER_BLACK_KEY = '[[File:Keyboard_vis_border_black_key.png|20px]]'
local BORDER_WHITE_KEY = '[[File:Keyboard_vis_border_white_key|20]]'
local BORDER_WHITE_KEY = '[[File:Keyboard_vis_border_white_key.png|20px]]'


-- Produces a small keyboard visualization
-- Produces a small keyboard visualization
Line 11: Line 11:
local step_pattern = step_pattern or "LLLsLLs"
local step_pattern = step_pattern or "LLLsLLs"
local result = SIDE_L
local result = END_L
for i = 1, #step_pattern do
for i = 1, #step_pattern do
Line 21: Line 21:
end
end
end
end
result = result .. SIDE_R
result = result .. END_R
return result
return result