diff --git a/enjoy/src/main.ts b/enjoy/src/main.ts index 53944ae6..5ccdc271 100644 --- a/enjoy/src/main.ts +++ b/enjoy/src/main.ts @@ -54,6 +54,10 @@ app.on("ready", async () => { globalShortcut.register("CommandOrControl+Shift+I", () => { mainWindow.win.webContents.toggleDevTools(); }); + + globalShortcut.register("CommandOrControl+Q", () => { + app.quit(); + }); }); // Quit when all windows are closed, except on macOS. There, it's common diff --git a/enjoy/src/renderer/components/sidebar.tsx b/enjoy/src/renderer/components/sidebar.tsx index 0434ca0a..15de0f69 100644 --- a/enjoy/src/renderer/components/sidebar.tsx +++ b/enjoy/src/renderer/components/sidebar.tsx @@ -11,7 +11,6 @@ import { HeadphonesIcon, VideoIcon, NewspaperIcon, - BookOpenTextIcon, BookMarkedIcon, UserIcon, BotIcon, @@ -20,11 +19,17 @@ import { useLocation, Link } from "react-router-dom"; import { t } from "i18next"; import { Preferences } from "@renderer/components"; import { Tooltip } from "react-tooltip"; +import { useHotkeys } from "react-hotkeys-hook"; export const Sidebar = () => { const location = useLocation(); const activeTab = location.pathname; + useHotkeys("Control+Comma", () => { + console.log("open preferences"); + document.getElementById("preferences-button")?.click(); + }); + return (
@@ -210,6 +215,7 @@ export const Sidebar = () => { ? "secondary" : "ghost" } + id="preferences-button" className="w-full xl:justify-start" data-tooltip-id="sidebar-tooltip" data-tooltip-content={t("sidebar.preferences")}