if you are using a counter to point to the current letter for input then you would reduce the counter (and reset the letter to blank) if the backspace is pressed.
i.e.
input_example.lua
local letter = {}
local letter_number = 1
pressed = 0
function input_example_main(e)
FreezePlayer()
--check for letters being pressed
if g_InKey ~= "" and pressed == 0 then
pressed = 1
letter[letter_number] = g_InKey
letter_number = letter_number + 1
end
--backspace pressed so delete letters
if GetScancode() == 14 and pressed == 0 then
pressed = 1
if letter_number > 1 then
letter_number = letter_number - 1
letter[letter_number] = ""
end
end
--show output on screen
x = 50 - (letter_number/2) --change adjustment amount here if change letter spacing below
y = 90
TextCenterOnX(50,85,3,"PASSWORD")
for a = 1, letter_number do
if letter[a] ~= nil then
Text(x,y,3,letter[a])
x = x + 1 --adjusts letter spacing
end
end
if GetScancode() == 0 then
pressed = 0
end
Prompt("currently pressed = "..GetInKey())
end