feat: tab shorcut

This commit is contained in:
DIYgod 2024-07-15 23:53:26 +08:00
parent 1a7aa33d02
commit 3a5cf1a97f
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ export const shortcuts = {
},
switchBetweenViews: {
name: "Switch Between Views",
key: "Left, Right",
key: "Tab, Left, Right",
},
},
entries: {

View File

@ -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)