From dae7a01221507d49853e183f1a9feddb08322d8b Mon Sep 17 00:00:00 2001 From: Franzz Date: Fri, 27 Mar 2020 18:09:09 +0100 Subject: [PATCH] New Key Down event catching --- script/spot.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/spot.js b/script/spot.js index 41bce8a..08ee7b4 100755 --- a/script/spot.js +++ b/script/spot.js @@ -23,6 +23,9 @@ function Spot(asGlobals) self.resetTmpFunctions(); + //On Key down + $('html').on('keydown', function(oEvent){self.onKeydown(oEvent);}); + //on window resize $(window).on('resize', function(){self.onResize();}); @@ -169,6 +172,7 @@ function Spot(asGlobals) self.onQuitPage = function(){return true}; self.onResize = function(){}; self.onFeedback = function(sType, sMsg){feedback(sType, sMsg);}; + self.onKeydown = function(oEvent){}; }; this.switchPage = function(asHash)