JQuery/Javascript suppress space bar in OSX Xenon App

Hi all,

I'm using some no longer supported software (very recently) from http://www.multidmedia.com/software/xenon/ that uses the Chromium Embedded Framework (CEF) at it's core, to allow desktop Apps to be made from HTML.

It has an issue, a javascript issue, that happens when a user presses the 'space bar'. An alert box says 'You pressed the space bar!'.

I've even found the source code (pre compiled)
(just search 'You pressed the space bar!')

I've tried some simple Javascript but not sure not to override. Any ideas or code snippets out there that may fix this??
It's only an issue on OSX compiled Apps (.app) but not an issue on the PC end (.exe) files.

Attempted code:
$(document).keydown(function(e) {

Open in new window

Thanks in advance!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

//save a reference to the built-in alert() function
var temp=window.alert;

// now overwrite the built-in definition with your own
   //if you detect 'You pressed...", then simply return
   if(str=='You pressed the space bar!')

  //otherwise call the default/original alert function by using the 
  //saved reference

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dev09Author Commented:
Wow!! thanks, i wish i could give you 5000 points.  Many thanks :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.