$(function(){ $('html').keydown(function(e){ $('#keypress_con').text(e.which); }); });
<div id='keypress_con'></div>