Hey all!
I just made a short project to figure out how to use the keyboard, and I noticed something weird with the backspace button. After typing something in, if you hold down backspace it should continue to backspace on its own, but after doing this for a few seconds it stops. Anyone know why?
Thanks
--# Main
-- Keyboard
function setup()
var = ""
showKeyboard()
end
function draw()
background(40, 40, 50)
strokeWidth(5)
fill(255, 255, 255, 255)
text(var,WIDTH/2,HEIGHT*2/3)
end
function keyboard(key)
if key == RETURN then
hideKeyboard()
else
var = var..key
end
if key == BACKSPACE then
var = string.sub(var,1,string.len(var)-1)
end
print(key)
end
function touched(touch)
if not isKeyboardShowing() then showKeyboard() end
end