django-admin-keyshortcuts
A Django package that adds keyboard shortcuts to the Django Admin interface for improved accessibility.
Demo
A static preview of Django Admin with Keyboard Shortcuts is available at:
https://khanxmetu.github.io/django-admin-keyshortcuts-demo/
Setup
Install from pip:
pip install django-admin-keyshortcuts
then add django_admin_keyshortcuts before django.contrib.admin in your INSTALLED_APPS:
INSTALLED_APPS = (
...,
'django_admin_keyshortcuts',
'django.contrib.admin',
...,
)
Usage
The following is a list of supported shortcuts
| Description | Shortcut (Windows/Linux) | Shortcut (MacOS) | Scope |
|---|---|---|---|
| Show shortcuts help dialog | ? | ? | Global |
| Go to the site index | g i | g i | Global |
| Toggle sidebar | [ | [ | Global (where it exists) |
| Select previous row for action | k | k | Change List |
| Select next row for action | j | j | Change List |
| Toggle row selection | x | x | Change List |
| Focus actions dropdown | a | a | Change List |
| Focus search field | / | / | Change List |
| Save and go to change list | Ctrl+s | ⌘+s | Change Form |
| Save and add another | Ctrl+Shift+S | ⌘+Shift+S | Change Form |
| Save and continue editing | Ctrl+Alt+s | ⌘+⌥+s | Change Form |
| Delete | Alt+d | ⌥+d | Change Form |
| Confirm deletion | Alt+y | ⌥+y | Delete Confirmation |
| Cancel deletion | Alt+n | ⌥+n | Delete Confirmation |
Adding Custom Shortcuts
This package uses the GitHub Hotkey library for handling shortcuts. You can add new ones by extending templates:
- In the admin template, locate the element you want triggered by the shortcut.
- Extend the template and add data-hotkey attribute to the target element, e.g.
data-hotkey="Mod+s". See hotkey string format for supported modifier and key combinations. - Document the shortcut in the help dialog.
View-specific (per page) shortcuts: Extend change_list_shortcuts, change_form_shortcuts, or delete_confirmation_shortcuts.
Example:
{% extends "admin/change_list_shortcuts.html" %}
{% load shortcuts %}
{% block extra_shortcuts %}
{{ block.super }}
<section>
<h3>Custom Shortcuts</h3>
<dl>
<dt class="shortcut-description">A Custom Shortcut</dt>
<dd class="shortcut-keys">{% shortcut_format_kbd "Mod+s" %}</dd>
</dl>
</section>
{% endblock %}
Global shortcuts:
Example:
{% extends "admin/shortcuts.html" %}
{% load shortcuts %}
{% block global_shortcuts %}
{{ block.super }}
<section>
<h3>Custom Shortcuts</h3>
<dl>
<dt class="shortcut-description">A Custom Shortcut</dt>
<dd class="shortcut-keys">{% shortcut_format_kbd "Mod+S" %}</dd>
</dl>
</section>
{% endblock %}
Tip: Use the Mod key (⌘ on macOS, Ctrl on Windows/Linux). It ensures shortcuts are OS-independent and automatically map to the correct key per platform.
About
The django-admin-keyshortcuts package is being developed with the goal of eventually merging its functionality into Django core.
This package has been undergoing refinements with respect to GSoC 2025: Keyboard Shortcuts Specification
Metadata
Release files for django-admin-keyshortcuts 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_admin_keyshortcuts-0.2.2.tar.gz | 10.7 kB | Without provenance | Details for django_admin_keyshortcuts-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_admin_keyshortcuts-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for django_admin_keyshortcuts-0.2.2-py3-none-any.whl |
Total release size: 29.6 kB
Release files / django_admin_keyshortcuts-0.2.2.tar.gz
| Download URL | django_admin_keyshortcuts-0.2.2.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f008f98664b24efe1a55e549377c52c6235cc90f206d1f0dc453f70278428255
|
|
BLAKE2b-256 checksum How to use checksums |
9dd7c85b36a9fd0e7c9107f55e66bc27052c8f70aa9053b523d9494318214713
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.16
|
Release files / django_admin_keyshortcuts-0.2.2-py3-none-any.whl
| Download URL | django_admin_keyshortcuts-0.2.2-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b841c9c0750c898fb689abbfe1eecf4f0e4c2d67854b10e36b529416074196a3
|
|
BLAKE2b-256 checksum How to use checksums |
2c494b41620abe165b318d4453dada421a0f977613f6c195c5c66ed81f3085ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.16
|
Security for django-admin-keyshortcuts 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.