Keyboard Navigation for a LocalGov Drupal website

Wouldn't it be cool if we could get around our LocalGov Drupal websites by using keyboard shortcuts?

Navigating a LocalGov Drupal backend via keyboard shortcuts

I had an idea for a module to allow us to navigate our LocalGov Drupal websites by keyboard shortcuts. Thanks to Big Blue Door for sponsoring my LGD-contribution time, I was able to put a proof-of-concept together yesterday evening to show off my idea.

It's quite simple. I created a new module called "LocalGov KeyNav" and put the code on GitHub on my own namespace for now. Now, when you have that module enabled, you can type "lgd" followed by a series of keys and get to different pages on the site. For example:

  • ac - goes to the content listing page
  • ap - goes to the people listing page
  • acdf - goes to the directory facets page
  • t2 - goes to the 2nd item in the toolbar menu (usually admin/content)
  • t8 - goes to the 8th item in the toolbar menu (usually admin/config)
  • nasp - goes to the "Add service page" form
  • naslp - goes to the "Add service landing page" form

We can add as many more sequences as we want.

Here's a video showing it in action.

If you think this is worth pursuing, let me know in the comments on YouTube or via the LGD Slack or any other way. Thanks.

Filed Under:

  1. Drupal Planet
  2. Drupal
  3. LocalGov Drupal
  4. Open Source