What you're probably look for is more of this:
SUB ExtendedInput (prompt$, result$)
PCOPY 0, 1
A = _AUTODISPLAY: X = POS(0): Y = CSRLIN
CP = 0: OldCP = 0 'Cursor Position
_KEYCLEAR
DO
PCOPY 1, 0
IF _KEYDOWN(100307) OR _KEYDOWN(100308) THEN AltDown = -1 ELSE AltDown = 0
k = _KEYHIT
IF AltDown THEN
SELECT CASE k 'ignore all keypresses except ALT-number presses
CASE 48 TO 57: AltWasDown = -1: alt$ = alt$ + CHR$(k)
END SELECT
ELSE
SELECT CASE k 'without alt, add any keypresses to our input
CASE 8
oldin$ = in$
IF CP > 0 THEN OldCP = CP: CP = CP - 1
in$ = LEFT$(in$, CP) + MID$(in$, CP + 2) 'backspace to erase input
CASE 9
oldin$ = in$
in$ = LEFT$(in$, CP) + SPACE$(4) + MID$(in$, CP + 1) 'four spaces for any TAB entered
OldCP = CP
CP = CP + 4
CASE 32 TO 128
IF _KEYDOWN(100305) OR _KEYDOWN(100306) THEN
IF k = 118 OR k = 86 THEN
oldin$ = in$
in$ = LEFT$(in$, CP) + _CLIPBOARD$ + MID$(in$, CP + 1) 'ctrl-v paste
'CTRL-V leaves cursor in position before the paste, without moving it after.
'Feel free to modify that behavior here, if you want it to move to after the paste.
END IF
IF k = 122 OR k = 90 THEN SWAP in$, oldin$: SWAP OldCP, CP 'ctrl-z undo
ELSE
oldin$ = in$
in$ = LEFT$(in$, CP) + CHR$(k) + MID$(in$, CP + 1) 'add input to our string
OldCP = CP
CP = CP + 1
END IF
CASE 18176 'Home
CP = 0
CASE 20224 'End
CP = LEN(in$)
CASE 21248 'Delete
oldin$ = in$
in$ = LEFT$(in$, CP) + MID$(in$, CP + 2)
CASE 19200 'Left
CP = CP - 1
IF CP < 0 THEN CP = 0
CASE 19712 'Right
CP = CP + 1
IF CP > LEN(in$) THEN CP = LEN(in$)
END SELECT
END IF
alt$ = RIGHT$(alt$, 3)
IF AltWasDown = -1 AND AltDown = 0 THEN
v = VAL(alt$)
IF v >= 0 AND v <= 255 THEN in$ = in$ + CHR$(v)
alt$ = "": AltWasDown = 0
END IF
blink = (blink + 1) MOD 30
LOCATE Y, X
PRINT prompt$; LEFT$(in$, CP);
IF blink \ 15 THEN PRINT " "; ELSE PRINT "_";
PRINT MID$(in$, CP + 1)
_DISPLAY
_LIMIT 30
LOOP UNTIL k = 13
PCOPY 1, 0
LOCATE Y, X: PRINT prompt$, in$
Result$ = in$
IF A THEN _AUTODISPLAY
END FUNCTION
Tweaked on my iPad and untested, so if it doesn't work 100% on the first try, maybe someone can correct whatever my glitch might be. If not, I'll correct it tomorrow when I'm back at the PC. (That's IF there's a glitch at all. I think it'll work with no issues, with these simple changes.
Usage here would then become:
LOCATE 6,3: ExtendedInput "Dozens =>", a$
It would eliminate the need for that PRINT statement and the semicolon after it.