I have the following code which navigates between elements using the left and right arrow keys.
$(document).keydown(function (event) {
if (event.keyCode === 37) {
console.log("left")
currentPosition > 0 ? currentPosition-- : maxFocusablePosition;
}
if (event.keyCode === 39) {
console.log("right")
currentPosition < maxFocusablePosition ? currentPosition++ : 0;
}
I tried implementing the following, but it doesnt work:
if ( event.ctrlKey && ( event.which === 37 ) ) {
console.log( "Combo Move" );
}