September 24, 2013

Swarm Hotkeys in a Hurry

Helix Swarm

Image: shadphotos w/Flickr

As Neal Stephenson wrote, "In the Beginning was the Command Line", and for many of us we are still there. Living in a terminal will quickly make a keyboard bigot of anyone; it is the lightsaber to the blaster that is the mouse. Why reach for that thing a full foot away when a quick key press takes barely a thought? Even when using websites, especially my dearly departed friend Google Reader, I rely on keyboard shortcuts to speed my workflow and save me from a repetitive stress injury.

Which is why the lack of hotkeys in our code collaboration tool, Swarm, makes me so sad. Thankfully one of our UX designers, Allan Yu, also missed having them and wrote an extension to Swarm to add hotkeys during our internal hackathon. The hackathon was his first coding experience and he took one of the top prizes in the event for his work (all the judges were command line users as well.)

If you'd like to add hotkey support to your own installation, the process is a breeze. Grab his code from the Public Depot and drop it into a folder named 'custom' inside of the 'public' directory of your Swarm deployment. Refresh the page and Swarm will automatically load the javascript and send you to hotkey nirvana.

Allan's project is also a great example of how easy it is to modify the behavior of Swarm to fit your needs. A little CSS and Javascript can go a long way to add new functionality or to integrate data from other systems. If you have any questions about how to approach modifying Swarm hit us up on the Perforce forums and we'll be happy to help.