Backspace key
Newzed
Posts: 2,503
Chip, I have an EEPROM writing program for my Prop piggyback.· Since I make an occasional typo, I added a "backspace" routine:
PUB recdataB·· 'receives data for storage
· repeat
··· addrb := readword($F618)
··· u := serialIn(si,stampBaud,sim#NInv,8)
··· if u == 45····· 'Adds backspace capability using the·minus key
····· writeword($F618, addrb-1)
····· recdataB
·This works perfectly - the data stored in EEPROM is free of typos.· I wanted to use the backspace key instead of the minus key so I changed the "if" line:
··· if u == 8···· 'ASCII for backspace
Nothing happened - the EEPROM data still had the typo.· Does the Propeller recognize the Backspace key - ASCII 8?
Thanks
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
PUB recdataB·· 'receives data for storage
· repeat
··· addrb := readword($F618)
··· u := serialIn(si,stampBaud,sim#NInv,8)
··· if u == 45····· 'Adds backspace capability using the·minus key
····· writeword($F618, addrb-1)
····· recdataB
·This works perfectly - the data stored in EEPROM is free of typos.· I wanted to use the backspace key instead of the minus key so I changed the "if" line:
··· if u == 8···· 'ASCII for backspace
Nothing happened - the EEPROM data still had the typo.· Does the Propeller recognize the Backspace key - ASCII 8?
Thanks
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
Comments
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
The code for backspace (ASCII - 8) is what's used for most serial connections. If you're using the PS/2 keyboard driver, you need to look at the keycode table in the comments near the end of the driver. The backspace keycode returned by the driver is $C8. There are lots of other keycodes for various control keys. The only ones that match those in the ASCII character set are Tab (9) and Return/Enter (13).
I wrote:
if u == 200· 'same as $C8
and it worked perfectly.· I'm happy again.
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·