Skip to content

Press "S" key to toggle activity sidebar ⌨️ #527

Description

@anoopcodehack

Press "S" key to toggle activity sidebar ⌨️

File: client/src/pages/Dashboard.jsx

Activity sidebar needs navbar click 💀
Power users want keyboard shortcut fr!!

Fix: add keydown listener:
useEffect(() => {
const handler = (e) => {
if (e.target.matches('input, textarea')) return
if (e.key === 's' || e.key === 'S') {
setShowActivity(v => !v)
}
}
window.addEventListener('keydown', handler)
return () => window.removeEventListener('keydown', handler)
}, [])

// update shortcuts help modal too:

S — Toggle activity

~8 lines! No backend needed 🎯
showActivity already exists ✅

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions