I found this http://twolivesleft.com/Codea/Talk/discussion/comment/5706 really helpful in figuring out how to get backspace to work with showkeyboard()
snippet below
function keyboard(key)
if key ~= nil then
if string.byte(key) == 10 then
--do something with "return" key
elseif string.byte(key) == nil then --must be a backspace
if string.len(yourtext) > 0 then
yourtext = string.sub(yourtext, 1, string.len(yourtext) - 1)
end
else
yourtext = yourtext..key
end
end
end
(this is to make it easier to search for in this forum)