published by | A. Rafey Khan |
---|---|
in blog | The Django weblog |
original entry | Keyboard shortcuts in Django via GSoC 2025 |
This summer I participated in the Google Summer of Code program with Django. My work focused on introducing keyboard shortcuts to the Django admin interface which led to a new package: django-admin-keyshortcuts.
My original GSoC proposal was to improve the existing django-admin-keyboard-shortcuts package maintained by one of my mentors, Tom. The plan was to fix bugs, add new keyboard shortcuts, build a command palette, and eventually merge these features into Django's core admin. I initially thought getting my GSoC proposal accepted meant I could dive straight into coding. But Tom explained that Django has its own process for new features, which starts off with community discussions.
After posting on the forum and gathering feedback, we decided to focus on keyboard shortcuts only, and continue exploring that in packages rather than target Django core immediately. This way the feature can be tested and improved more quickly without waiting on Django's long release cycle.
The accessibility team helped drafting keyboard shortcuts outlining key requirements and expected outcomes, in particular making sure shortcuts would be widely compatible with browsers and assistive technologies. That document served as the base for developing django-admin-keyshortcuts.
This package adds useful keyboard shortcuts to the Django admin interface. The goal is to make the Django admin interface faster to navigate and more accessible to keyboard-first users. Here are some of the shortcuts we have added so far:
The package also comes with a keyboard shortcuts dialog, crucial so users of the admin can discover those new features:
Developers can also define custom shortcuts by extending admin templates. Detailed instructions can be found in the package's README.
Under the hood, the package uses the hotkey library for handling shortcuts. The library seems to be well maintained (compared to other alternatives) and is used for keyboard shortcuts in GitHub.
We have made a lot of progress, but there's still work to do before we can push to merge this functionality inside Django core.
Right now, there are a couple of known problems:
To address these we may wait for the hotkey library maintainers to implement the necessary fixes, or look for alternatives.
We want more users to try it out! Testing in different scenarios will help find bugs faster and improve the package. The default shortcut set is also small, we need feedback to determine which shortcuts are most useful. We also plan to list the package on a new "Experiments" section on the new Django Ecosystem page to make it more visible.
But for now, try it out and let us know what you think! We have a static admin demo for people to directly try the shortcuts. Or install django-admin-keyshortcuts to test it on your own project.
Let us know what you think over on the Django Forum!