Improved keyboard functionality

From GitHub #558

Logseq text and blocks can’t be edited without using the mouse a lot, which is much slower. The below functions would help improve keyboard-only usage.

  • When a block is selected, arrow keys should unselect it and allow editing again without an additional mouse click.
  • Alt-Shift-Up only moves blocks when they are in editing mode. It should also work when blocks are selected. It should also be improved to work on several consecutive blocks.
  • Create keyboard shortcuts to allow the user to put the cursor in a specific block and begin editing, even when no block is currently selected and the page is not in editing mode. For implementation, see the Roam extensions Roam42 and/or Roam Navigator.
  • Create a keyboard shortcut to jump to the first or last block on a page
  • Create keyboard shortcuts to expand/collapse child items in several ways:
  • Expand/collapse everything below the current focused or selected block
  • Expand/collapse one level at a time for the whole page (e.g., unfold all level 1 and level 2 items, but keep levels 3+ folded)
  • Expand/collapse all levels at once for the whole page

sabre23t comment: " When a block is selected, arrow keys should unselect it and allow editing again without an additional mouse click.
This already works. Can use Arrow Up to edit previous block, and Arrow Down to edit next block, while you are editing current block."

my response: “By “selected”, I don’t mean that the cursor is in the block in edit mode. I mean selected in the sense that the whole block is highlighted when not in edit mode. To see this state, put the cursor in a block, hold Shift, and tap the up arrow key twice. There is no way to “un-highlight” that block now without using the mouse.”

@Cobblepot Thanks for putting all this together. I come from “Checkvist” where keyboard centric use is a core concept.

For you second point…

I even created a bug report …

and also for a similar problem here …

I fully agree that - for heavy use - a keyboard centric approach is essential. While typing, editing and searching your fingers are away from the mouse. Switching between mouse and keyboard again and again is slow and can be avoided.