"use strict";!function(){function e(){var e=document.querySelectorAll("div, a, input, button, select, textarea,ul,li"),t=0,n=[];function o(e){var o=t+e;document.querySelectorAll(".items")[t=o].focus()}(function(e){for(var o=0;o<e.length;o++)e[o].className+=" items",e[o].setAttribute("tabindex",o),n.push(e[o]);return n})(e).forEach(function(e,o,t){return n=t});document.activeElement.addEventListener("keydown",function(e){switch(e.key){case"ArrowUp":o(-1),console.log("You click on ArrowUp",e.which||e.keyCode);break;case"ArrowDown":o(1),console.log("You click on ArrowDown",e.which||e.keyCode);break;case"ArrowRight":o(1),console.log("You click on ArrowRight",e.which||e.keyCode);break;case"ArrowLeft":o(-1),console.log("You click on ArrowLeft",e.which||e.keyCode)}},!0);var c=function(){console.log("You click on SoftLeft")},r=function(){console.log("You click on Enter")},i=function(){console.log("You click on SoftRight")};document.addEventListener("keydown",function(e){switch(e.key){case"SoftLeft":c();break;case"SoftRight":i();break;case"Enter":r()}})}var o;o=function(){e()},"interactive"===document.readyState||"complete"===document.readyState?o():document.addEventListener("DOMContentLoaded",o)}();