$(function(){ $(document).on("keydown",window,function(a){ if(a.which == 123) return false; }) })