Keyboard events

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I am working on the last stages of a project and seem to be having a small issue. What im trying to do is pass keyboard events to my app but seem to not get anything to work that involves capturing them. Anything that is press on the keyboard doesnt get noticed at all. Even simple functions to detect a keypress doesnt work. Would these scripts need to be put in the viewer to get this to work or is rise blocking keyboard events. Thanks
Photo of William Oneal

William Oneal, Champion

  • 13,770 Points 10k badge 2x thumb

Posted 3 years ago

  • 1
Photo of HSuarez

HSuarez

  • 11,896 Points 10k badge 2x thumb
Are you looking to pass keyboard events to your app via the display? What OS are you using?
If you are on a touch screen display and want to add a keyboard, have you considered adding an on-screen keyboard instead? 
Photo of William Oneal

William Oneal, Champion

  • 13,770 Points 10k badge 2x thumb
Yes I'm wanting to pass connected keyboard events via the display. This isn't touch, something a bit different. What I'm doing is I'm working on an app/player that runs risevision. Problem i have is webview (browser) doesn't allow key presses through native code unless you have JavaScript to notify the webview that a certain key is pressed. I'm needing this to get back to the menu I made.

Now adding just simple key press JavaScript to a presentation thats map to a certain key should work, but it doesn't. Even in chrome it doesn't work or show up when I have console.log. That means it's either blocked or the viewer has control of the keyboard events. Hopefully this helps on what I'm doing. Might need a developer to help answer this one since it's a Viewer question.
Photo of Blake Freeman

Blake Freeman, Official Rep

  • 36,116 Points 20k badge 2x thumb
William,

Our content team is out today, but I'll get this question to them tomorrow. They will be the best team to answer this!
Photo of William Oneal

William Oneal, Champion

  • 13,770 Points 10k badge 2x thumb
Thanks Blake. No Rush. I have been moving offices today so i can wait. :) 
Photo of Donna Peplinskie

Donna Peplinskie

  • 7,142 Points 5k badge 2x thumb
Hi William,

As far as I know, Viewer doesn't interfere with keyboard events at all. Do you have a link that shows the code you're trying to run?

Thx.
Photo of William Oneal

William Oneal, Champion

  • 13,770 Points 10k badge 2x thumb
I decided to do something else instead since its not viewer issue but a webview issue. I got it to work in chrome after you click on the page. Seems like there is no focus to the page unless you click or interact with it first so i needed something else to work. 
Photo of Donna Peplinskie

Donna Peplinskie

  • 7,142 Points 5k badge 2x thumb
That's good news, and good luck with the rest of the project!
Photo of William Oneal

William Oneal, Champion

  • 13,770 Points 10k badge 2x thumb
Thanks Donna. :)