# [TurboWarp](https://turbowarp.org), 424 bytes

[Try it here.](https://turbowarp.org/1070983410)

Key-presses are really hard to manage well.

**NOTE:** This will not work in Scratch, because `backspace` is only detectable in TurboWarp.

**NOTE:** In the scratchblocks version and the picture, I used a custom block containing 1 argument. This was because I had to actually use the block rather than leave it as a function, and scratchblocks needs *something* in a custom block to recognize it as one. The project linked to will use an empty block, however. 

*edit: translating into scratchblocks is HARD*

```
define(
set[i v]to(0
repeat until<(i)>(9
if<key(i)pressed?>then
set[x v]to(join(x)[*
stop[this script v]
end
change[i v]by(1
end
when gf clicked
set[x v]to[
repeat until<(length of(x))=(4
if<<key(any v)pressed?>and<not<key(backspace v)pressed?>>>then
(
end
if<key(backspace v)pressed?>then
set[j v]to((length of(x))-(2
set[x v]to[
repeat until<(length of(x))>(j
set[x v]to(join(x)[*
end
end
wait until<not<key(any v)pressed?
```
[![enter image description here][1]][1]


 [1]: https://i.sstatic.net/mLHW6meD.png