Hide tray using api

I do not think so. Supposedly, according to the API docs, the keystroke callbacks will not bubble up if true is returned, but I do not remember this ever preventing shortcuts from changing the tool.

No, I know of none. The ToolsObserver#onActiveToolChanged callback is triggered in the past tense (i.e., after the tool has changed.)

Again, no not at this time. It is a common complaint by tool coders.

Correct. There is no current way to prevent the panel from popping up. It is not just coders, but everyday users are also complaining that there is no way to stop the panel from seizing the keyboard focus. Some users want to use the Paint Sampling feature of the tool and not the Materials inspector, so they’ve asked for a switch the tell SketchUp not to activate the tray panel.

There is nothing else to try, that is exposed to the Ruby API.


FYI, This has no effect on MS Windows. It’s a Mac only action string. See my old example:

[Example] Send Escape Key - Cancel Operation script


Probably not a very good idea. It sounds like you are trying to make SketchUp work like ACAD’s command driven interface. SketchUp was purposefully designed to NOT be like CAD. It has been called “the unCAD”. SketchUp has a tool driven interface where there is always an active tool that the user uses to interact with the geometry.

I would guess that Trimble may take a dim view of an extension that interferes with SketchUp’s default tools. I suggest reading the Terms of Service carefully before releasing anything that does what you describe.

It will always be more acceptable to create your own palette of custom tools rather than circumvent the default tools.

2 Likes