local conv={
	["0"]="pge.controls.pressed(PGE_CTRL_LEFT)",
	["1"]="pge.controls.pressed(PGE_CTRL_RIGHT)",
	["2"]="pge.controls.pressed(PGE_CTRL_UP)",
	["3"]="pge.controls.pressed(PGE_CTRL_DOWN)",
	["4"]="pge.controls.pressed(PGE_CTRL_CROSS)",
	["5"]="pge.controls.pressed(PGE_CTRL_CIRCLE)",
	["6"]="pge.controls.pressed(PGE_CTRL_TRIANGLE)",
	["7"]="pge.controls.pressed(PGE_CTRL_SQUARE)",
	["8"]="pge.controls.pressed(PGE_CTRL_LTRIGGER)",
	["9"]="pge.controls.pressed(PGE_CTRL_RTRIGGER)",
	a="pge.controls.pressed(PGE_CTRL_SELECT)",
	b="pge.controls.pressed(PGE_CTRL_START)",
	c="pge.controls.analogx()<-65",
	d="pge.controls.analogx()>65",
	e="pge.controls.analogy()>65",
	f="pge.controls.analogy()<-65"
}
local keys={
	"m_left",
	"m_right",
	"m_jump",
	"m_look_up",
	"m_look_down",
	"m_remove",
	"m_place",
	"m_inv_left",
	"m_inv_right",
	"m_inv",
	"m_pause",
	"m_cam_left",
	"m_cam_right",
	"m_cam_up",
	"m_cam_down"
}

for t=1,6 do 
	loadstring(keys[t]..'=loadstring("return '..string.gsub(conv[char(cons_file,t)],"pressed","held")..'")')()
end
for t=7,11 do
	loadstring(keys[t]..'=loadstring("return '..conv[char(cons_file,t)]..'")')()
end
for t=12,15 do 
	loadstring(keys[t]..'=loadstring("return '..string.gsub(conv[char(cons_file,t)],"pressed","held")..'")')()
end

collectgarbage("collect")
dofile("menu.lua")