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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasette_keyboard_shortcuts-0.1.0.tar.gz.
File metadata
- Download URL: datasette_keyboard_shortcuts-0.1.0.tar.gz
- Upload date:
- Size: 52.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a753aed6c89ca052d8ec59973e02d71b6770c40da735e3217466be66b6a1f4
|
|
| MD5 |
f251c687160fd0ea7b39c7232254a69a
|
|
| BLAKE2b-256 |
4c325daa8e785067c7b0f04fca4aad59988e44f7dd54a4eed205981a631d381a
|
Provenance
The following attestation bundles were made for datasette_keyboard_shortcuts-0.1.0.tar.gz:
Publisher:
publish.yml on theophilec/datasette-keyboard-shortcuts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_keyboard_shortcuts-0.1.0.tar.gz -
Subject digest:
46a753aed6c89ca052d8ec59973e02d71b6770c40da735e3217466be66b6a1f4 - Sigstore transparency entry: 2572004944
- Sigstore integration time:
-
Permalink:
theophilec/datasette-keyboard-shortcuts@4bccdae1d244c8a1eee8fd422253e32c7da56612 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/theophilec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4bccdae1d244c8a1eee8fd422253e32c7da56612 -
Trigger Event:
release
-
Statement type:
File details
Details for the file datasette_keyboard_shortcuts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datasette_keyboard_shortcuts-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad64fa37b69f2236911f581eb625c02afd86dc60943fddf01c44771479d72c2a
|
|
| MD5 |
1d06c39eeb7121be67984a7cc26a65d6
|
|
| BLAKE2b-256 |
4260462d0ce5980a297667d33f15605ee4c57b953f69e923e09c7bb71951afe0
|
Provenance
The following attestation bundles were made for datasette_keyboard_shortcuts-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on theophilec/datasette-keyboard-shortcuts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_keyboard_shortcuts-0.1.0-py3-none-any.whl -
Subject digest:
ad64fa37b69f2236911f581eb625c02afd86dc60943fddf01c44771479d72c2a - Sigstore transparency entry: 2572005078
- Sigstore integration time:
-
Permalink:
theophilec/datasette-keyboard-shortcuts@4bccdae1d244c8a1eee8fd422253e32c7da56612 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/theophilec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4bccdae1d244c8a1eee8fd422253e32c7da56612 -
Trigger Event:
release
-
Statement type: