[ENG-1277] Windows open context menu key correction (#1576)

Update SharedItems.tsx
This commit is contained in:
ameer2468 2023-10-13 20:01:30 +03:00 committed by GitHub
parent 8f944ddf98
commit b21d928479
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,7 @@ export const OpenOrDownload = new ConditionalItem({
const keybind = useKeybindFactory();
const { platform } = usePlatform();
const { doubleClick } = useViewItemDoubleClick();
const os = useOperatingSystem(true);
if (platform === 'web') return <Menu.Item label="Download" />;
else
@ -45,7 +46,9 @@ export const OpenOrDownload = new ConditionalItem({
<>
<Menu.Item
label="Open"
keybind={keybind([ModifierKeys.Control], ['O'])}
keybind={keybind(os === 'windows' ? [] : [ModifierKeys.Control], [
os === 'windows' ? 'Enter' : 'O'
])}
onClick={() => doubleClick()}
/>
<Conditional items={[OpenWith]} />