Simple script that adds chord-style shortcuts to SketchUp using the native command palette

This thing is pretty bare bones but very functional and easy to use for anyone interested. It requires only AutoHotkey and contains no Ruby code. The good thing about that is that the code is very short, simple, human readable. The bad thing about it is that AHK is Windows-exclusive.

If I get time I’ll add more functionality. Currently it depends on the native SketchUp search / command palette - default is Shift + s to open. I’d suggest adding something easy on your non-mouse hand to trigger the search so that you can roll right into a command. I use s (s for SketchUp) as the leader key which then opens the command palette. The AHK mappings are only active when the command palette has focus. Using the native search was a way to make the script dramatically shorter simpler and reduce the risk of unwanted inputs.

If, for example, you want to open preferences by typing in `prefs` and you’d set your shortcut for command palette to s, then input sprefs it would open the preferences window.

So far I’ve only created functionality for chords, i.e. strings of keys pressed in sequence. This means that the command will fire on the last press - i.e. on the final s in sprefs. If you would rather hit the spacebar or enter after the command and have it trigger on that it would be easy to add that option. So far, I prefer not having a space/enter because it’s faster and fewer keystrokes, but that would make it feel more like a command line and open up the opportunity to have shortcuts that can overlap like rec and recr for rectangle and rotated rectangle. With the current script, a rec mapping monopolizes that prefix to only trigger one tool.

It’s pretty easy to use and set up, just install AutoHotkey version 2 and run the SketchUpChords.ahk file like any windows app once you’ve set up your shortcuts.csv. The syntax for the shortcuts is pretty basic and there are instructions. You can have multiple aliases for the same command if you use the pipe | character to separate them. I included my csv file to use as a template. My mappings are not good and may include mappings for plugins you don’t have so I’d scrap it and build your own. You can edit csv files in excel or google sheets. The script reads the csv file on script startup.

Added functionality for command-line style inputs. Start your trigger with :: and it won’t fire until you hit space or enter at the end. This would allow for overlapping triggers like ::save and ::saveas

The next place to go for this would be to use AHK to take control of the native floating command palette so that it remembers its location. My sketchup 2026 does not and it always pops up on my off monitor.

It would also be relatively easy for it to read the Preferences.dat file that windows sketchup users can export and import for their shortcuts.

  • Added PALETTE_OFFSET constant - set your pixel coordinate for the command prompt to pop up. For simplicity it only references the top left corner of the sketchup window. This makes it dynamic as far as moving to wherever your sketchup window is, but I didn’t bother to do the math of having it reference the bottom right corner where it would have to dynamically adjust to the size of the sketchup window. I have it set to pop up just under the menu bar on the left end of the tool bar, and I drag the toolbars over so it leaves a blank spot for it. It works.
  • Added another trigger for the command prompt - Space. It’s a big move but I’m giving it a shot. It makes inputting commands much smoother but you lose the native mapping for the spacebar, which was to cancel your command and open the Select tool. I mostly solved this by adding a special mapping to escape the command prompt with a second Space input. So, you can single tap spacebar and input a command or you can double-tap it to clear your active command and use Select. If you don’t like this just map to something else. It’s all optional.
  • Fixed a bug where Alt modifier mappings were causing the cursor to lose focus.

Up to 130 lines - it’s pretty dang functional now so I’m probably gonna go slop it up on something else.

Sloppy Steaks Slop Em Up GIF - Sloppy Steaks Slop Em Up I Think You Should  Leave - Discover & Share GIFs