Konami Code implementation for JavaScript with touchscreen support.
https://zbicin.github.io/konami-code-js
The demo file in docs is pretty self explanatory and I totally recommend reading through it. However, if you are impatient:
<script type="text/javascript" src="../lib/konami-code.min.js"></script> <script type="text/javascript"> function onKonamiCode() { console.log('konami code!'); } function onKonamiCodeGesture(event) { console.log(event.detail.name); } document.addEventListener('konamiCode', onKonamiCode); document.addEventListener('konamiCodeGesture', onKonamiCodeGesture); </script>