Add keyboard shortcuts (#637)

* Add documentation
* Fix manual styling
* Add dialog for setting Movie images
* Mention manual in README
This commit is contained in:
WithoutPants
2020-07-02 08:45:14 +10:00
committed by GitHub
parent 3157d748bc
commit bfeb7d1824
23 changed files with 698 additions and 30 deletions

View File

@@ -32,6 +32,19 @@ export const SceneList: React.FC<ISceneList> = ({
},
];
const addKeybinds = (
result: FindScenesQueryResult,
filter: ListFilterModel
) => {
Mousetrap.bind("p r", () => {
playRandom(result, filter);
});
return () => {
Mousetrap.unbind("p r");
};
};
const listData = useScenesList({
zoomable: true,
otherOperations,
@@ -40,6 +53,7 @@ export const SceneList: React.FC<ISceneList> = ({
renderDeleteDialog: renderDeleteScenesDialog,
subComponent,
filterHook,
addKeybinds,
});
async function playRandom(