Shop OBEX P1 Docs P2 Docs Learn Events
Arrow keys with hyperterminal? — Parallax Forums

Arrow keys with hyperterminal?

mosquito56mosquito56 Posts: 387
edited 2008-02-29 10:39 in Propeller 1
 key:=$00
  printstr(string("3.Showsettings"))
    repeat while key==$00
      key:=debug.rx
      hex(key,4)
      waitcnt(clkfreq/10+cnt)

I am using fullduplexserialplus to try to read keystokes from hyperterminal. Works fine but up arrow, down arrow, left arrow and right arrow all return $1B. How do you differencitate the arrow keys?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······

······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-02-29 01:11
    These and other function keys send an escape sequence. From TeraTerm with local echo on and debug select (shift ESC) this is what I read:
    ^[noparse][[/noparse][noparse][[/noparse]D     left arrow = ESC [noparse][[/noparse] D  = $1B,$5B,$44
    ^[noparse][[/noparse][noparse][[/noparse]C     right arrow
    ^[noparse][[/noparse][noparse][[/noparse]A     up arrow
    ^[noparse][[/noparse][noparse][[/noparse]B     down arrow
    
    


    *Peter*

    Post Edited (Peter Jakacki) : 2/29/2008 1:18:06 AM GMT
  • jazzedjazzed Posts: 11,803
    edited 2008-02-29 02:44
    For positioning cursor on terminal based on arrows, use VT100 escape codes.
    See: http://pegasus.cs.csubak.edu/Tables_Charts/VT100_Escape_Codes.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley

    Traffic is slow at times, but Parallax orders·always get here fast 8)
  • mosquito56mosquito56 Posts: 387
    edited 2008-02-29 03:46
    Peter, thanx works fine.

    I am just using the hyperterminal till I wire up my keys. Anyone know of a small keyboard like a phone, up,down,left, right, enter that I can mount on front of t.v.? A row of touchsensitive buttons would work also?

    Any ideas? My t.v. has 2 speakers belowl eft and below right with·grill in the middle about 3 inches tall.·Perfect for a keyboard entry system of some sort.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • PerryPerry Posts: 253
    edited 2008-02-29 03:56
    For a simple interface like up/down/left/right why not consider a TV remote control.
    there are a couple of examples in the object exchange.

    Perry
  • mosquito56mosquito56 Posts: 387
    edited 2008-02-29 10:39
    I had thought of that idea but· this is going into an airplane. The thought of hunting a remote at 7,000ft is not a good one. I dropped my coke in a liter·bottle one time on the passenger floor and damn near killed myself trying to get it.

    · Hmm, got to thinking. If I could find somewhere to velcro it but I'm supposed to be flying the plane not hunting buttons on a remote. Will give it some thought, good idea though thanx.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
Sign In or Register to comment.