Using Arrow keys

RaghuMN

Usenet Archive
Joined
Jul 14, 2003
Messages
97
Reaction score
0
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
 
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
 
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
 
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
 

Member Recommended

Back
Top