facebook / facebook/docusaurus

RFC: Keyboard Shortcuts

Aperta
#3,020 9 commenti 5 reazioni 0 assegnatari Vedi su GitHub
feature
Lingua principale
TypeScript
Stelle
66.2k
Fork
10k
Merge medio
1g 3h
PR unite (30g)
52

Descrizione

Initially proposed by @yangshun here: https://github.com/facebook/docusaurus/issues/2267

## 💥 Proposal: Keyboard Shortcuts

**Difficulty**: Easy-Medium

How it works - plugins can register keyboard shortcuts which Docusaurus will attach as a global event listener and show a list of all supported shortcuts on the website when the user types ?, like Reddit:

Screen Shot 2020-06-05 at 7 55 28 PM

Of course it'll be up to the plugins to define their own logic for responding to events. Docusaurus can provide the keyboard event listening mechanism and call plugin code when a specific key combination occurs.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.