Keyboard bindings

Jump to: navigation, search
Keyboard bindings for editing mode
Project state INITIAL SPECIFICATION
Tracker issue TODO
Discussion TODO
Assignee moodle.com


Moodle 2.4


Rationale

A number of popular websites use keyboard bindings these days to allow users to navigate around more easily. Examples include google mail, google reader, twitter, google search, and others. These allow users to navigate around more easily without forcing them to use the mouse.

Basics

A setting in a user's profile would be added to enable keyboard navigation. Initially this would just be added for course pages, but could easily be extended to forums, quizzes, and other modules.

A YUI module would need to be created to:

  • display the cursor on the page to highlight the currently selected item
  • listen for keyboard events and pass these to appropriate handlers
  • allow dialogues to steal keyboard focus temporarily (e.g. modal dialogues) via a function call
  • register new keyboard bindings
  • register sets of keyboard bndings (e.g. for a module to register it's own keyboard bindings rather than doing so one at a time)
  • display help for all registered keyboard bindings

Care needs to be taken to support the peculiarities of course formats and this may be considered in the upcoming rewrite of course formats.

Suggested bindings

General bindings

  •  ? = show help displaying all keyboard bindings

Course Navigation bindings

  • j = move cursor down one course module
  • k = move cursor up one course module
  • J = jump cursor down to next course section - first course module is selected
  • K = jump cursor up to next course section - first course module is selected
  • <return> = select course module

Course Editing bindings

  • h = indent course module left
  • l = indent course module right
  • # = delete course module
  • e = edit course module
  • E = edit course section
  • s = toggle show/hide of course module
  • S = toggle show/hide of section
  • Y = add currently selected course module to copy buffer (within current course only)
  • p = paste course module after cursor
  • P = paste course module before cursor

General Navigation bindings

  • g c = goto course
  • g h = goto home/myhome
  • g m = goto messages
  • g g = goto gradebook
  • g s = move cursor to search box

See also