Projects BibleWeb Bookmarks Keyboard shortcut (`B`)
Planned

Keyboard shortcut (`B`)

Area: Bookmarks Milestone: v1

Context

Problem: Bookmarking via the context menu requires multiple clicks: click verse → wait for menu → click "Bookmark." Power users want a faster way.

Solution: A single-key shortcut — press B while reading any chapter to instantly bookmark it.

Not included: Shortcut customization or other single-key actions. Just B for bookmark.

Functional

Expected user flow:

  1. User is reading a chapter
  2. Presses B on the keyboard
  3. Chapter is instantly bookmarked (or unbookmarked if already bookmarked)
  4. Brief visual feedback (toast or icon flash)

Edge cases:

  • Should not trigger when typing in an input/textarea (search, notes, etc.)
  • Toggle behavior: pressing B again on a bookmarked chapter removes the bookmark
  • Should work on any page that has a "current chapter" context

UX & Design

Feedback: Brief toast notification ("Bookmarked" / "Bookmark removed") or bookmark icon animation.

Key: B (lowercase, no modifier keys needed).

Technical

Implementation:

  • Add keydown listener in reader page
  • Check e.key === 'b' and not in an input element
  • Call addBookmark() or removeBookmark() based on isBookmarked() state
  • Show brief feedback

Files:

  • apps/web/src/routes/(app)/read/[[book]]/[[chapter]]/+page.svelte (modify — add B key handler)

Status

Current: PLANNED Milestone: v1 Priority: Low — power-user convenience

Dependencies:

  • Requires: chapter-level bookmarks (DONE)