javascript - Is it possible to disable esc/F11 key during full screen mode of webpage, programmatically? -


is possible disable esc/f11 key during full screen mode of webpage, programmatically? need have exit button within webpage exit fullscreen mode, need prevent come outside fullscreen mode using other funcationality of windows(like esc, f11, etc.). please me if have idea this.

with jquery can disable listening keydown event:

$(document).on("keydown",function(ev){  	console.log(ev.keycode);  	if(ev.keycode===27||ev.keycode===122) return false  })
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

keycode 27 stands esc key , 122 f11. tested in chrome, maybe other browsers can other number


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -