Space Bar Play/Pause Video


(Jud) #1

Is it possible to call on the space bar or Enter key via JavaScript to both play and pause a video on scene load? What code would I use to accomplish that function? Thanks!


(Mark Hunte) #2

Found this by using the term key events on this at the top of the forum page :grin:


Number Keys Jump to Scene
(Jud) #3

Thanks so very much!


(Jud) #4

I used the Enter key, but could not find the key code for the spacebar.


(Mark Hunte) #5

Have you done a search for this any where?

Or better yet used the console to see what key is pressed when you log the key event.


(Jud) #6

How do I use the Console to see key codes?


(Jud) #7

Found the spacebar key code = 32.

http://keycode.info


(Mark Hunte) #8

So I was a little bored and a video would be too big to upload .
Have a look at this…

console.zip (2.6 MB)


(Jud) #9

Awesome! Thanks again.