Shop OBEX P1 Docs P2 Docs Learn Events
Backspace key — Parallax Forums

Backspace key

NewzedNewzed Posts: 2,503
edited 2007-04-02 23:20 in Propeller 1
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
·

Comments

  • NewzedNewzed Posts: 2,503
    edited 2007-04-02 23:12
    Chip, I tried it with the Delete key - ASCII 127 - but that didn't work either.· With both the Backspace key and the Delete key the EEPROM stores a capital E with an accent over it.

    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
    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-02 23:13
    Sid,
    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).
  • NewzedNewzed Posts: 2,503
    edited 2007-04-02 23:20
    Mike, thank you.

    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
    ·
Sign In or Register to comment.