Using Arrow keys

Discussion in 'AutoCAD' started by RaghuMN, Jan 29, 2004.

  1. RaghuMN

    RaghuMN Guest

    Have anyone tried the arrow keys to impart movement to the selected object by a defined unit?

    I wish to move a selected text using the arrow keys for fine adjustment.

    The program that I have in my mind is that, the program asks for the unit distance to move.

    Once this is given, the user is at his liberty to move the text by using the arrow keys at what ever direction he wants.

    Any hint on how to use the arrow keys for the user input??

    Thanks,
    MNRaghu
     
    RaghuMN, Jan 29, 2004
    #1
  2. RaghuMN

    Jürg Menzi Guest

    RaghuM

    How about 'grread'?

    Cheers
     
    Jürg Menzi, Jan 29, 2004
    #2
  3. RaghuMN

    ECCAD Guest

    Hmm.
    I've been playing with the (grread), and typing on the Arrow keys. Seems like for Left Arrow, you need to hit Enter and you get (2 13) or such. For Up Arrow, is grabbed by ACAD and used for 'history' stuff at the command line. Just doesn't behave as you would think.
    ??
    Bob
     
    ECCAD, Jan 29, 2004
    #3
  4. RaghuMN

    ECCAD Guest

    This is a little strange, the Up/Down arrow keys work, but the Right/Left do not ?. Also try the NumLock Off, and the Arrow Keys there work real well.


    ;; KEYS.LSP
    ;; Function: to show keyboard scan codes
    ;;
    (defun C:KEY ( / key)
    (setvar "ATTDIA" 0)
    (command "_TEXTSCR")
    (prompt "\n ")
    (prompt "\nPress a Key Combination to check: <Escape Key to Quit>")
    (prompt "\n ")
    (setq code_12 (grread (setq code (grread))))
    (setq flag 1)
    (while (> flag 0)
    (setq code_12 (grread (setq key (last (grread)))))
    (princ key)
    (prompt "\n ")
    (setq key nil)
    ); end while
    (princ)
    ); end function

    Bob
     
    ECCAD, Jan 29, 2004
    #4
  5. RaghuMN

    RaghuMN Guest

    Thanks Bob and Juerg.

    It seems that Bob has given me nearly what I wanted.

    I will try to extend his advice with a little more effort and come back as soon as possible with some positive and easier way out.

    Please let me know if there is any other improvements in the thinking in this direction.

    Thanks again,

    MNRaghu
     
    RaghuMN, Jan 30, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.