I was able to take these
<a id="north" data-passage="North">North</a>
<a id="east" data-passage="East">East</a>
<a id="south" data-passage="South">South</a>
<a id="west" data-passage="West">West</a>
and by simply replacing the
[[North]]
[[East]]
[[South]]
[[West]]
links that were found in the Moving Through a Dungeon example combined with a slight modification of the JavaScript snippet below that GreyElf showed
(function () {
$(document).on('keyup', function (ev) {
/* the ev variable contains a keyup event object.
* ev.key contains the key value of the key that was released.
*/
/* the following moves you around. */
if (ev.key === 'w') {
$('a#north').click();
}
else if (ev.key === 's') {
$('a#south').click();
}
else if (ev.key === 'd') {
$('a#east').click();
}
else if (ev.key === 'a') {
$('a#west').click();
}
});
}());
I was able to make that dungeon crawl happen with just keystrokes. The whole thing only took a minute to set up. Of course... that's because someone did all the work before. Thank you to whomever that was.
But I found this to be a cool feature.
Hope that helps!