How risky is it to use the + or - keys to provide additional controls for a custom tool?
I am aware of this thread but it doesn’t discuss these particular keys:
It is interesting to me that SketchUp chose to use Ctrl +/- as a control for the number of circle / arc segments for these tools rather than simply using +/- without the Ctrl combo. But what was the reason for this?
For my tool, I would prefer to use the + / - keys without the need for Ctrl since it easier.
Is the only risk that the user might have assigned one of these keys as a shortcut?
(I also notice that SketchUp 2025 is not even allowing me to set the - key as a shortcut)
I did not realize this. For a tool that does not use a web dialog I suppose it is okay.
But these shortcuts on PC (Command +/- on Mac) are for Browser/Web Dialog zoom control. CTRL 0 (Command 0) to reset.
I would say that this would be preferrable.
I asked the Copilot AI for examples of what these keys are used for in applications and got these:
Brush Size adjustments (Graphics apps)
Speed adjustments (Simulations/Animations)
Volume control (Media players)
Arithmetic (Calculators)
Scaling elements (Drawing programs)
Case folding / Code block folding (IDEs/Code editors)
General increment / decrement numeric values
So, if your intended use “fits” with anything similar I would say users would relate.
The Tool interface key callabcks say:
“Return true to prevent SketchUp from processing the event.”
I’m not sure if this works or is bugged. There were some previous complaints that using some keys exited from custom tools. Not sure if this was ever fixed.
ADD: I would think that these would not be allowed as shortcuts because of the need to enter values in the VCB or elsewhere that may need to be signed numeric values.
Yeah, as I’m sure you know (but maybe forgot) SketchUp processes the short-cut key before calling the custom tool methods. So returning true would not make a difference here.