Search code examples
javascriptdom-eventskey-bindingsintro.js

intro.js - add shift + ? keyboard hotkey / shortcut support to launch (or trigger) introJs().start()


How do I make mousetrap launch intro.js guided tour?

SHIFT + ? will ... <a href="javascript:void(0);" onclick="startIntro();">launch tour</a>


Solution

  • This is the code I used to achieve results:

    <script type="text/javascript">
    Mousetrap.bind(["?"], function(e) {
        startIntro();
    });
    </script>