# HG changeset patch # User Nicholas Jillings # Date 1437646236 -3600 # Node ID 1d80719b81de72e9c894e710320bfe2f74b026a0 # Parent b9546c7f809ef43881d8dd076dcb1d9b65f82911 Feature #1302: Enter key bounded to button proceed of popup. Only triggered if popup is visible. All enter codes are captured though. diff -r b9546c7f809e -r 1d80719b81de core.js --- a/core.js Thu Jul 23 10:58:08 2015 +0100 +++ b/core.js Thu Jul 23 11:10:36 2015 +0100 @@ -105,6 +105,13 @@ var blank = document.getElementsByClassName('testHalt')[0]; blank.style.zIndex = 2; blank.style.visibility = 'visible'; + $(window).keypress(function(e){ + if (e.keyCode == 13 && popup.popup.style.visibility == 'visible') + { + // Enter key pressed + popup.buttonProceed.onclick(); + } + }); }; this.hidePopup = function(){