I have made a simple function that returns true once the enter button is pressed whilst using this API. Neither on my keyboard seem to return true, despite every other key working!
Here is my code written in typescript:
function detectenter(){ var listener = new window.keypress.Listener(); //Javascript include is in the index.html file. if(listener.simple_combo("enter")) { return true; } else { return false; } }
I did try other methods of the function to see if that was the issue, this was the latest in a long line, and thus I have concluded that it is most likely not a problem with the function.
It looks like you're expecting a boolean to be returned by the simple_combo method. Here is some documentation and code samples to help: http://dmauro.github.io/Keypress/
Hi,
I have made a simple function that returns true once the enter button is pressed whilst using this API. Neither on my keyboard seem to return true, despite every other key working!
Here is my code written in typescript:
function detectenter(){ var listener = new window.keypress.Listener(); //Javascript include is in the index.html file. if(listener.simple_combo("enter")) { return true; } else { return false; } }
I did try other methods of the function to see if that was the issue, this was the latest in a long line, and thus I have concluded that it is most likely not a problem with the function.
From, Reiss Jones -http://www.rjones.me