TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Beekee on February 02, 2016, 08:17:38 AM

Title: Simulate of RightClick
Post by: Beekee on February 02, 2016, 08:17:38 AM
Hello,

I'm looking for some way how to simulate mouse RightClick.
For more than a decade I was using RightClick as ENTER. Now we moved to CIVIL 3D and I would like use Shortcut Menu as well - somehow, but keep right button as ENTER.

What I'm looking for is this:

toogle 'SHORTCUTMENU to MENU
somehow simulate RightClick
toogle 'SHORTCUTMENU back to ENTER


I can write this quick toggle, but it is still too cumbersome.
(defun C:SC nil
  (if (= (getvar 'SHORTCUTMENU) 0)
    (progn
      (setvar 'SHORTCUTMENU 15)
      (princ "\n>> Right-button means MENU"))
    (progn
      (setvar 'SHORTCUTMENU 0)
      (princ "\n>> Right-button means ENTER")))
  (princ)
)

I know about time sensitive settings, but the limit of this function is that for SELECTED ENTITIES this is not available.
I was thinking about mouse settings as well, but ROCCAT mouse driver does not allow change right button function (to ENTER or SPACE). :/

Thanks for any idea...
Title: Re: Simulate of RightClick
Post by: ChrisCarlson on February 02, 2016, 08:22:56 AM
Look into the settings of right click, there should be different options for right click ie. while in command right click is enter, while in edit mode right click is shortcut menu, etc.
Title: Re: Simulate of RightClick
Post by: Beekee on February 02, 2016, 08:35:57 AM
Yes it is... But this is the reason why I'm looking for other solution - because you have to CHOOSE one of them.
Title: Re: Simulate of RightClick
Post by: dgorsman on February 02, 2016, 10:10:35 AM
Get a mouse with a thumb button, map ENTER to the that button.  Or use the SPACE bar with the thumb on the non-mouse hand.  Zero coding required.
Title: Re: Simulate of RightClick
Post by: Beekee on February 02, 2016, 10:32:51 AM
Get a mouse with a thumb button, map ENTER to the that button.  Or use the SPACE bar with the thumb on the non-mouse hand.  Zero coding required.

Thanks for the suggestion. Actually I have multi-button mouse already. And as I said, ROCCAT driver software not allows the change of right button function. Add ENTER to any other button does not make any sense, because I still need to learn the new way how to control such a basic thing as mouse is.

And yes, if I don't find some better solution, slowly coming to terms with the fact that I the left thumb stick on the spacebar. And I hate this idea...
Title: Re: Simulate of RightClick
Post by: ronjonp on February 02, 2016, 11:08:41 AM
Get a mouse with a thumb button, map ENTER to the that button.  Or use the SPACE bar with the thumb on the non-mouse hand.  Zero coding required.
And yes, if I don't find some better solution, slowly coming to terms with the fact that I the left thumb stick on the spacebar. And I hate this idea...
The spacebar has been enter in AutoCAD for MANY years.
Title: Re: Simulate of RightClick
Post by: Beekee on February 02, 2016, 11:32:06 AM
Get a mouse with a thumb button, map ENTER to the that button.  Or use the SPACE bar with the thumb on the non-mouse hand.  Zero coding required.
And yes, if I don't find some better solution, slowly coming to terms with the fact that I the left thumb stick on the spacebar. And I hate this idea...
The spacebar has been enter in AutoCAD for MANY years.

Sure. I know that. It's not bad to use it... but I just used the right click for so many years... just used to it. It would be more simple to me keep it that way.
Title: Re: Simulate of RightClick
Post by: danallen on February 02, 2016, 11:55:53 AM
Autohotkey may be able to remap right-click to spacebar only in AutoCAD application. I use it in other programs to remap shortcuts when the programs don't have the option.
Title: Re: Simulate of RightClick
Post by: cmwade77 on February 02, 2016, 12:47:48 PM
Umm, this is exactly what Time Sensitive right click was designed for.

I have it set where a click click presses enter and holding it down brings up the shortcut menu.

You can turn this on under User Preferences in Options.

You can also set it up so that Shift-Right Click brings up the shortcut menu instead.
Title: Re: Simulate of RightClick
Post by: Beekee on February 04, 2016, 05:18:38 AM
Umm, this is exactly what Time Sensitive right click was designed for.

I am sure of it. But if that solves 75% of the problem, it's not a good solution.

I have it set where a click click presses enter and holding it down brings up the shortcut menu.

Well, I don't want that. I want the simple solution for all situation - when I click, it's always enter. When I hold, it always brings up the shortcut menu. Unfortunately, this is not possible.

You can also set it up so that Shift-Right Click brings up the shortcut menu instead.

Yes, I would love to use it. That's actually the first hand solution... very natural... please, show me how to set it, how to move all the functionality, all the selected entities depending menus, from RightClick to CTRL+RightClick (or Shift+...). I would be very thankful.
Title: Re: Simulate of RightClick
Post by: Beekee on February 04, 2016, 05:23:27 AM
Autohotkey may be able to remap right-click to spacebar only in AutoCAD application. I use it in other programs to remap shortcuts when the programs don't have the option.

Thanks for suggestion... yes, it may...  I'll definitely try it when I get back in the office.
Title: Re: Simulate of RightClick
Post by: cmwade77 on February 04, 2016, 12:27:26 PM
I have it set where a click click presses enter and holding it down brings up the shortcut menu.

Well, I don't want that. I want the simple solution for all situation - when I click, it's always enter. When I hold, it always brings up the shortcut menu. Unfortunately, this is not possible.
That is EXACTLY what time sensitive right click does, click presses enter and holding it down brings up the shortcut menu, you can even specify how long holding it down is vs. just clicking it.

Quote
You can also set it up so that Shift-Right Click brings up the shortcut menu instead.

Yes, I would love to use it. That's actually the first hand solution... very natural... please, show me how to set it, how to move all the functionality, all the selected entities depending menus, from RightClick to CTRL+RightClick (or Shift+...). I would be very thankful.
This is default behavior in AutoCAD as far as I am aware, but you can customize it in the CUI editor under mouse buttons.

Both of these options work 100% of the time, not 75%.
Title: Re: Simulate of RightClick
Post by: Beekee on February 04, 2016, 01:15:48 PM

That is EXACTLY what time sensitive right click does, click presses enter and holding it down brings up the shortcut menu, you can even specify how long holding it down is vs. just clicking it.

This is default behavior in AutoCAD as far as I am aware, but you can customize it in the CUI editor under mouse buttons.

Both of these options work 100% of the time, not 75%.

You cannot set time sensitive right click for "Edit mode". And yes, it's possible for "Default mode" and "Command mode". So that's 2 of 3...  hmm, not even 75 %.

In my experience, in CUI you can set "a static" shortcut menu for CTRL/Shift Click. It's always the same, no matter what entities you have selected, never related.

Neither of those is the solution for me.