How to represent values of arrow keys using getch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sky1124
    New Member
    • Mar 2010
    • 1

    How to represent values of arrow keys using getch

    If arrow keys do not have ASKII code but if instead they have scan values only then how do i represent them using getch() ?
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Most of the keys without an ASCII code return 2 characters so you need to call getch() twice to interpret them.

    However I do not know if there is any standard fr what is returned.

    Comment

    • kiruthikaU
      New Member
      • Feb 2010
      • 4

      #3
      Visit the following link.
      <Link to competing website removed please read our posting guidelines>

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        Arrow keys are not within the minimum character set required of all compiler implementations . Therefore, there is no way to represent them as character constants in the same simple way we do for 'A' or '*'. The answer to your question is implementation dependent.

        What compiler are you using?
        What processor and operating system does your program run on?

        Comment

        Working...