yuangiu - If you want the tab key to toggle orthomode, you will have to edit your keys file manually because of the way the keys editor interprets the tab key.
Add a key with a modifiers value of zero, a virtual key value of 9, and (setvar "ORTHOMODE" (if (zerop (getvar "ORTHOMODE")) 1 0)) for the command value.
It sounds like autohook lets you actually map one key on the keyboard to be interpreted as an entirely different key. HotKeys doesn't work quite that way. It allows you to have AutoCAD execute a macro when you press a key.
Thank you, Chuck, It DOES WORK, very wonderful.
now I set in the xml for modifiers 0 and key 9 and then the tab is define:),
and the (setvar "ORTHOMODE" (if (zerop (getvar "ORTHOMODE")) 1 0)) is really work in transparent mode, very nice, how can it work, it is hard to do it, can lisp be executed transparently in command, I never try it before.
autohook is a special software just for autocad, maybe it is also wrote in arx, it is not just map key function I think, it could also execute a serial command, just like in autohook, I define ortho to tab by define tab ('^o ), the bracket is not include, then it works, but autohook is a shareware.
Thanks again.