If anyone's looking to detect a given key and needs to know the status of the "modifiers" (as they are called in Java), i.e. Shift, Alt and Control keys, you can do something like this, which responds to keydown
on key F9, but only if none of the Shift, Alt or Control keys is currently pressed.
jqMyDiv.on( 'keydown', function( e ){
if( ! e.shiftKey && ! e.altKey && ! e.ctrlKey ){
console.log( e );
if( e.originalEvent.code === 'F9' ){
// do something
}
}
});