Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: making hotkey in mainpage global

Ilian Sapundshiev03303335168f
diff --git a/src/renderer/containers/MainPage.tsx b/src/renderer/containers/MainPage.tsx
index 38a4e9733..351289d95 100644
--- a/src/renderer/containers/MainPage.tsx
+++ b/src/renderer/containers/MainPage.tsx
@@ -32,7 +32,7 @@ import { styled, useTheme } from '@mui/material/styles';
import { buffer } from '@tagspaces/tagspaces-common/misc';
import clsx from 'clsx';
import React, { useEffect, useReducer, useRef, useState } from 'react';
-import { HotKeys } from 'react-hotkeys';
+import { GlobalHotKeys } from 'react-hotkeys';
import { connect, useSelector } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Split } from 'ts-react-splitter';
@@ -287,11 +287,7 @@ function MainPage(props: Props) {
return (
<Root>
- <HotKeys
- handlers={keyBindingHandlers}
- keyMap={keyMap}
- style={{ height: '100%' }}
- >
+ <GlobalHotKeys handlers={keyBindingHandlers} keyMap={keyMap}>
<PageNotification />
<div
style={{
@@ -364,7 +360,7 @@ function MainPage(props: Props) {
</>
)}
</div>
- </HotKeys>
+ </GlobalHotKeys>
</Root>
);
}