Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: window.keypress is undefined #143

Open
YTCuber opened this issue May 25, 2018 · 3 comments
Open

TypeError: window.keypress is undefined #143

YTCuber opened this issue May 25, 2018 · 3 comments

Comments

@YTCuber
Copy link

YTCuber commented May 25, 2018

When I load the Keypress script in my own site or even on https://dmauro.github.io/Keypress/, it does not work at all.

Browser: Firefox Quantum 60.0.1 (64 bit)
OS: Ubuntu 17.10

Error messages:
TypeError: window.keypress is undefined in main.js:5:3
Trace:
@https://dmauro.github.io/Keypress/js/main.js:5:3
@https://dmauro.github.io/Keypress/js/main.js:2:2

@akhzarjaved
Copy link

@YTCuber Any solution on this ?
same error occurring for me

@mangru
Copy link

mangru commented Jan 13, 2021

Same problem for me: window.keypress is undefined

@jjuambel
Copy link

jjuambel commented Jan 13, 2021

Hi.

Not sure if you have already tried this but in my case it was
a silly mistake.

In my HTML code I was loading my own JS file -from where I was trying
to use keypress- before loading keypress.js itself.

<script src='js/myFile.js'></script>
<script src='js/keypress.js'></script>

I moved the reference to keypress.js to the top

<script src='js/keypress.js'></script>
<script src='js/myFile.js'></script>

and that was it.

Hope this helps.

Same problem for me: window.keypress is undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants