Hello everyone,
I’m currently developing a custom interactive Ruby tool for SketchUp. For my tool’s specific workflow, it would be extremely ergonomic for the user to cycle through some temporary alignment options by pressing the space key while my tool is active.
However, I’ve run into the well-known limitation where SketchUp’s native shortcut accelerator intercepts the spacebar (to switch to the Select tool) before it even reaches my tool’s onKeyDown callback. I am perfectly able to capture other keys like tab or the arrow keys, but VK_SPACE is swallowed by the host application.
I am aware that relying on an invisible UI::HtmlDialog to steal window focus is a workaround to capture keydown events, but I am looking for a purely native ruby tool approach.
Is there any known API trick, native workaround, or event hook to temporarily bypass the workspace shortcut and capture space exclusively for my tool while it is active, without forcing the user to manually erase their keyboard shortcuts map?
Any insights would be greatly appreciated. Thanks!