It would be nice if one could navigate through slideshows without a mouse as this makes presenting easier. Most webbrowsers support a feature called accesskeys. Links can have a property accesskey="x". This makes a browser follow that link when pressing alt-x.
This is easily hackable. I used a recent MoinMoinDesktopEdition. You need to modify two files.
The MoinMoin.wikiutil.link_tag() function has to accept accesskey via **kw, so add the following to the beginning of the function.
if kw.has_key('accesskey'): accesskey = kw['accesskey'] del kw['accesskey'] else: accesskey = None
Furthermore the following block is needed near the end of the function. It's obvious where to add.
if accesskey: attrs += ' accesskey="%s"' % accesskey
The MoinMoin.macro.Navigation.Navigation.do_slides() function has to be extended a bit. So replace the line
result.append(Page(self.macro.request, name).link_to(self.macro.request, text=label, querystr=self.querystr)) with result.append(Page(self.macro.request, name).link_to(self.macro.request, text=label, querystr=self.querystr, accesskey='^': 'g', '|<': 'h', '<<': 'k', '>>': 'j', '>|': 'l'}[label]))
Yes, this hack is ugly and that's why you should clean this before commiting. -- HelmutGrohne
- Can you add a unified diff please?