Update selected item color in Pass menu
[ProtonMail-WebClient.git] / packages / pass / hooks / useSaveShortcut.ts
blob990b03edb2606c1d1aac372094758b3253097186
1 import { useKeyPress } from '@proton/components';
3 export const useSaveShortcut = (onSave: () => void) => {
4     useKeyPress(
5         (evt) => {
6             if ((evt.ctrlKey || evt.metaKey) && evt.key === 's') {
7                 evt.preventDefault();
8                 onSave();
9             }
10         },
11         [onSave]
12     );