From 3a5cf1a97fc4393e36f2dc28190d6603b124b95c Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 15 Jul 2024 23:53:26 +0800 Subject: [PATCH] feat: tab shorcut --- src/renderer/src/lib/shortcuts.ts | 2 +- src/renderer/src/modules/feed-column/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/lib/shortcuts.ts b/src/renderer/src/lib/shortcuts.ts index a4861ec6b9..9c82bbcf5a 100644 --- a/src/renderer/src/lib/shortcuts.ts +++ b/src/renderer/src/lib/shortcuts.ts @@ -22,7 +22,7 @@ export const shortcuts = { }, switchBetweenViews: { name: "Switch Between Views", - key: "Left, Right", + key: "Tab, Left, Right", }, }, entries: { diff --git a/src/renderer/src/modules/feed-column/index.tsx b/src/renderer/src/modules/feed-column/index.tsx index cb111b56cd..2154a70546 100644 --- a/src/renderer/src/modules/feed-column/index.tsx +++ b/src/renderer/src/modules/feed-column/index.tsx @@ -94,7 +94,8 @@ export function FeedColumn() { useHotkeys( shortcuts.feeds.switchBetweenViews.key, - () => { + (e) => { + e.preventDefault() if (isHotkeyPressed("Left")) { setActive((i) => { if (i === 0) { @@ -188,7 +189,6 @@ export function FeedColumn() { active === index && item.className, "flex h-11 flex-col items-center gap-1 text-xl", "hover:!bg-theme-vibrancyBg", - "focus-visible:!outline-none", )} onClick={(e) => { setActive(index)