datasette-keyboard-shortcuts
Plugin for configuring keyboard shortcuts for Datasette.
Installation
uv add datasette-keyboard-shortcuts
Configuration
Shortcuts can be configured in datasette.yaml or metadata.json:
plugins:
datasette-keyboard-shortcuts:
shortcuts:
- id: run-query
key: Mod+Enter
action: run-query
Default shortcuts
Mod+Enter runs the SQL query on the query page. Shift+Mod+F formats the
query using Datasette's built-in Format SQL button. Mod means Command on
macOS and Control on Windows and Linux.
Configured shortcuts with the same id replace defaults. Set
enabled: false to disable one. The supported actions are run-query and
format-query; unknown actions are ignored.
Adding more shortcuts
The browser runtime exposes window.datasetteKeyboardShortcuts for other plugins. You can call it like this:
const unregister = window.datasetteKeyboardShortcuts.register({
id: "focus-search",
key: "Mod+K",
handler: () => document.querySelector("input[type=search]")?.focus(),
});
Development
uv sync --extra test
uv run pytest
Metadata
Release files for datasette-keyboard-shortcuts 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datasette_keyboard_shortcuts-0.1.0.tar.gz | 52.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datasette_keyboard_shortcuts-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.3 kB
Release files / datasette_keyboard_shortcuts-0.1.0.tar.gz
| Download URL | datasette_keyboard_shortcuts-0.1.0.tar.gz |
|---|---|
| Size | 52.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46a753aed6c89ca052d8ec59973e02d71b6770c40da735e3217466be66b6a1f4
|
|
BLAKE2b-256 checksum How to use checksums |
4c325daa8e785067c7b0f04fca4aad59988e44f7dd54a4eed205981a631d381a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logRelease files / datasette_keyboard_shortcuts-0.1.0-py3-none-any.whl
| Download URL | datasette_keyboard_shortcuts-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad64fa37b69f2236911f581eb625c02afd86dc60943fddf01c44771479d72c2a
|
|
BLAKE2b-256 checksum How to use checksums |
4260462d0ce5980a297667d33f15605ee4c57b953f69e923e09c7bb71951afe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency log