mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 02:12:30 +01:00
add mousetrap type
This commit is contained in:
parent
2f361b4dd6
commit
f444a029f8
@ -57,6 +57,7 @@
|
||||
"@types/luxon": "^3.4.2",
|
||||
"@types/mime-types": "^2.1.4",
|
||||
"@types/morgan": "^1.9.9",
|
||||
"@types/mousetrap": "^1.6.15",
|
||||
"@types/node": "18",
|
||||
"@types/react": "^18.2.66",
|
||||
"@types/react-dom": "^18.2.22",
|
||||
|
@ -49,7 +49,10 @@ function fixKeys(keys: string[]) {
|
||||
const CreateBinding = memo(({
|
||||
actionsMap, action, setCreatingBinding, onNewKeyBindingConfirmed,
|
||||
}: {
|
||||
actionsMap: ActionsMap, action: KeyboardAction | undefined, setCreatingBinding: Dispatch<SetStateAction<KeyboardAction | undefined>>, onNewKeyBindingConfirmed: (a: KeyboardAction, keys: string[]) => void,
|
||||
actionsMap: ActionsMap,
|
||||
action: KeyboardAction | undefined,
|
||||
setCreatingBinding: Dispatch<SetStateAction<KeyboardAction | undefined>>,
|
||||
onNewKeyBindingConfirmed: (a: KeyboardAction, keys: string[]) => void,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
@ -40,6 +40,8 @@ export default ({ keyBindings, onKeyPress: onKeyPressProp }: {
|
||||
}
|
||||
});
|
||||
|
||||
return () => mousetrap.reset();
|
||||
return () => {
|
||||
mousetrap.reset();
|
||||
};
|
||||
}, [keyBindings]);
|
||||
};
|
||||
|
@ -2149,6 +2149,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/mousetrap@npm:^1.6.15":
|
||||
version: 1.6.15
|
||||
resolution: "@types/mousetrap@npm:1.6.15"
|
||||
checksum: 10/58ec552218108f8e5f0d40ee81579aafbdb00c3af0ef4b6d3fb193a8a11a2d37aa84c6e20524120b7f218c2a87dac24f426ee3b23e1269d42f8145a1a37c9eca
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/ms@npm:*":
|
||||
version: 0.7.31
|
||||
resolution: "@types/ms@npm:0.7.31"
|
||||
@ -7610,6 +7617,7 @@ __metadata:
|
||||
"@types/luxon": "npm:^3.4.2"
|
||||
"@types/mime-types": "npm:^2.1.4"
|
||||
"@types/morgan": "npm:^1.9.9"
|
||||
"@types/mousetrap": "npm:^1.6.15"
|
||||
"@types/node": "npm:18"
|
||||
"@types/react": "npm:^18.2.66"
|
||||
"@types/react-dom": "npm:^18.2.22"
|
||||
|
Loading…
Reference in New Issue
Block a user