Loading ...
Sorry, an error occurred while loading the content.

A little more help please

Expand Messages
  • Tony Barber
    Thanks to ever one that helped with my last question I have with your help solved those problems, I have one more question. How do I trap the arrow keys
    Message 1 of 3 , Feb 3, 2006
    • 0 Attachment
      Thanks to ever one that helped with my last question I have with your
      help solved those problems, I have one more question. How do I trap
      the arrow keys (cursor keys) for the main window? Input$(1) does not
      work, how can I test to see if they are pressed?
    • bbjen@hotPOP.com
      ... That requires a graphic window. See the help file under Reading Mouse Events and Keystrokes. You might be able to trap the arrow keys in the main window
      Message 2 of 3 , Feb 4, 2006
      • 0 Attachment
        At 11:35 PM 2/3/06 -0000, you wrote:
        >Thanks to ever one that helped with my last question I have with your
        >help solved those problems, I have one more question. How do I trap
        >the arrow keys (cursor keys) for the main window? Input$(1) does not
        >work, how can I test to see if they are pressed?
        >---------------------------------------------------
        That requires a graphic window.
        See the help file under Reading Mouse Events and Keystrokes.

        You might be able to trap the arrow keys in the main window with
        "GetKeyboardState".
        See newsletter 105, "HOT KEYS AND MOUSE CLICKS" for some ideas.

        Bill Jennings
      • Gordon Sweet
        Here is a simple CAD using the Cursor keys. There is a more elaborate one WKEYSCAD to be found among the Tools at
        Message 3 of 3 , Feb 4, 2006
        • 0 Attachment
          Here is a simple CAD using the Cursor keys. There is a more elaborate one WKEYSCAD to be found among the Tools at

          http://sionet.mysite.wanadoo-members.co.uk/LBcode.htm

          Gordon S.

          ' Precision CAD using mainly the KEYS
          nomainwin
          WindowWidth = 800 : WindowHeight = 580
          open "Keys CAD" for graphics_nsb as #1
          #1 "cls; trapclose [quit]; when rightButtonDown [clear]"
          #1 "place 100 20; down"
          #1 "\Use cursor keys to draw, right click mouse to clear"
          #1 "place 100 100; down" : x = 100 : y = 100

          [Loop]
          #1 "discard"
          #1 "setfocus; when characterInput [fetch]"
          scan
          goto [Loop]

          [fetch]
          key$ = Inkey$
          keyV = asc(right$(key$, 1))
          rem print #1,"\";x;" ";y:print #1, t$ 'check xy points
          if keyV=38 and y>3 then y=y-1
          if keyV=40 and y<550 then y=y+1
          if keyV=37 and x>3 then x=x-1
          if keyV=39 and x<785 then x=x+1
          print #1, "goto ";x;" ";y
          goto [Loop]

          [clear] #1 "cls" : goto [Loop]

          [quit] close #1 : end



          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.