-1

I am working on an application where I need to detect whether user has pressed ctrl+f6 for certain navigation path. How to capture ctrl+f6 key press event in javascript/jquery?

Misha Akopov
  • 12,241
  • 27
  • 68
  • 82
Sayantan Ghosh
  • 998
  • 2
  • 9
  • 29

1 Answers1

3

Hope this helps (source)

$(window).keydown(function(event) {
  if(event.ctrlKey && event.keyCode == 117 ) { //f6 keycode
    console.log("Hey! Ctrl + F6 event captured!");
    event.preventDefault(); 
  }
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Hit Ctrl + F6 to see console log on this event.
Krzysztof Janiszewski
  • 3,763
  • 3
  • 18
  • 38