@Ygamedy,
I developed a solution. I would welcome the input of others.
The environment variable, ContextMenus, has various bit values to control which right-click menus are displayed. Bit 16 toggles the time-sensitive (quick) option.
FYI - Kudos to the Hyperpics site for having the information on the ContextMenus environment variable.
http://www.hyperpics.com/downloads/resources/customization/autolisp/AutoCAD%20Environment%20Variable...
The code below checks the state of bit-16 and toggles as needed.
Note that ContextMenus requires a string, not an integer.
Step 1 - Create AutoLISP to toggle the time sensitive right-click
(defun ToggleTimeSensitiveRightClick ()
(if (= (logand (atoi (getenv "ContextMenus")) 16) 16)
(setenv "ContextMenus" (itoa (- (atoi (getenv "ContextMenus")) 16)))
(setenv "ContextMenus" (itoa (+ (atoi (getenv "ContextMenus")) 16)))
) ;_if
) ;_defun
Save this code to an AutoCAD Support Path.
Step 2 - Create keyboard shortcut
Using the CUI command, I created a custom command. I added this command to the keyboard shortcut group. (I would recommend that you add this to a personal or custom menu, not the AutoCAD menu)
I assigned a keyboard shortcut to the command. (see attached image)
Step 3 - Use
Now when I press CTRL+SHIFT+R, the time-sensitive right-click is toggled by the AutoLISP routine.
It may be possible to place the entire AutoLISP code into the custom command macro, but I went with an external LISP routine as the first solution.
You will need to save and load this AutoLISP routine each time when you start AutoCAD. There are plenty of on-line examples for that.
I hope this is helpful. I welcome your feedback.
Regards,
Jerry
-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional