Add initial keyboard shortcut support.

This commit is contained in:
Dermot Duffy
2024-06-05 21:44:17 -07:00
parent 904f6d8142
commit 7ab545738d
186 changed files with 9564 additions and 3658 deletions
+4 -3
View File
@@ -4,9 +4,10 @@
* [Screenshots](../screenshots.md)
* [Troubleshooting](../troubleshooting.md)
* [Usage](README.md)
* [2-way audio](2-way-audio.md)
* [Casting](casting.md)
* [URL Actions](url-actions.md)
* [2-way audio](2-way-audio.md)
* [Casting](casting.md)
* [Keyboard Shortcuts](keyboard-shortcuts.md)
* [URL Actions](url-actions.md)
---
+18
View File
@@ -0,0 +1,18 @@
# Keyboard Shortcuts
There are two ways to have the card respond to key input:
* As a convenience, the card supports a small number of built in shortcuts with pre-defined default bindings. See below for these built in shortcuts. Use the [`keyboard_shortcuts`](../configuration/view.md?id=keyboard_shortcuts) configuration to change their bindings.
* More generally, _any_ [action](../configuration/actions/README.md) can be configured to run in response to keyboard input as part of an [automation](../configuration/automations.md), even if that action does not have a pre-defined shortcut. See [keyboard automation example](../examples.md?id=responding-to-key-input) to show how to execute any arbitrary action(s) in response to keyboard activity.
## Built-in shortcuts
| Name | Default key binding | Action | Description |
| - | - | - | - |
| `ptz_down` | `ArrowDown` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ move down. |
| `ptz_home` | `h` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ home / default. |
| `ptz_left` | `ArrowLeft` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ move left. |
| `ptz_right` | `ArrowRight` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ move right. |
| `ptz_up` | `ArrowUp` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ move up. |
| `ptz_zoom_in` | `+` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ zoom in. |
| `ptz_zoom_out` | `-` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ zoom out. |
+3 -3
View File
@@ -1,7 +1,7 @@
# URL Actions
It is possible to pass the Frigate card one or more
[actions](../configuration/actions.md) from the URL (e.g. select a particular
[actions](../configuration/actions/README.md) from the URL (e.g. select a particular
camera, open the live view in expanded mode, etc).
### When actions are executed
@@ -44,7 +44,7 @@ unless the action is targeted with a `CARD_ID` as shown above.
## Supported Actions
Only a subset of all [actions](../configuration/actions.md) are supported in URL form.
Only a subset of all [actions](../configuration/actions/README.md) are supported in URL form.
| Action | Supported in URL | Explanation |
| - | - | - |
@@ -68,7 +68,7 @@ Only a subset of all [actions](../configuration/actions.md) are supported in URL
| `recording` | :white_check_mark: | |
| `recordings` | :white_check_mark: | |
| `screenshot`| :heavy_multiplication_x: | Latest media information is not available on initial render. |
| `show_ptz` | :heavy_multiplication_x: | Please [request](https://github.com/dermotduffy/frigate-hass-card/issues) if you need this. |
| `ptz_controls` | :heavy_multiplication_x: | Please [request](https://github.com/dermotduffy/frigate-hass-card/issues) if you need this. |
| `snapshot` | :white_check_mark: | |
| `snapshots` | :white_check_mark: | |