gnab / remark

A simple, in-browser, markdown-driven slideshow tool.
http://remarkjs.com
MIT License
12.67k stars 854 forks source link

Is it possible to add or change shortcuts? #684

Open raphaelfournier opened 1 year ago

raphaelfournier commented 1 year ago

When going forward with a presentation, one can use 5 keys (down, right, PgDn, j, space). 4 of these "forward" have a "backward" counterpart (resp.: up, left, PgUp, k), but not space. In several other programs, one may use Shift-Space to go backward. Would it be possible with remark? Space is what I use the most to go forward, I would find it very convenient to have Shift-Space to go backwards…

Looking at the code, I guess there is a bit of work because the modifiers are currently unused.

peterj commented 1 year ago

I think the space & shift-space shortcut is already implemented. https://github.com/gnab/remark/blob/1bbce13f65c25990c4f140cd6fbd88cfb768cf25/src/remark/controllers/inputs/keyboard.js#L35

raphaelfournier commented 1 year ago

That's great to know! I copy-pasted the fix you mention in my local version, and it works. It does not appear in the "help" screen, though.

However, I don't see it in use on the on https://remarkjs.com/#6 website (it does not work and it's not in the "help screen" for keybindings). And I don't see it in the https://gnab.github.io/remark/downloads/remark-latest.min.js that my page calls by default, according to the template provided here.

So: Is it only in a specific/development version? What should I do to use the downloadable js version with this shortcut?