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

Unable to use Ctrl+Enter to play #73

Open
mohammedtouheedpatelgithubcom opened this issue Apr 28, 2021 · 2 comments
Open

Unable to use Ctrl+Enter to play #73

mohammedtouheedpatelgithubcom opened this issue Apr 28, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@mohammedtouheedpatelgithubcom

Describe the bug
A clear and concise description of what the bug is.
redhat

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [windows 7]
  • Browser [Firefox]
  • Version [88.0 (64-bit)]

Additional context
I have checked my keyboard other functionalities like space and wad are working fine only ctrl+play isn't working not sure if it's a bug or not.Or maybe it's Functionality are missing.

@mohammedtouheedpatelgithubcom mohammedtouheedpatelgithubcom added the bug Something isn't working label Apr 28, 2021
@rluders
Copy link
Contributor

rluders commented Apr 28, 2021

All right, I actually checked this one. It seems that the canvas doesn't get the focus when we open the page. So, we probably need to add something to set it to the canvas by default when the page loads, so it can capture the keyboard events.

In order to simulate what I'm saying:

  1. Open the podscape.io
  2. Try to press Ctrl + Enter (it should not work)
  3. Now, click in any place of the game canvas
  4. Try to press Ctrl + Enter (it should now work)

We could probably add some javascript to the export template:

document.getElementsByTagName('canvas')[0].focus()

And it should solve the issue.

@mohammedtouheedpatelgithubcom
Copy link
Author

Yeah! You are absolutely correct.I too just checked now it is working.I found this luckily since my mouse wasn't working well.So I tried everything with keyboard.Thank you for your feedback @rluders .Yeah that may fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants