Explore the community Forums Lectora Lectora Questions & Answers Seamless play and keystroke combination Reply To: Seamless play and keystroke combination

#401833 Score: 0
Profile photo of Jack Ellis
Jack Ellis
Member
beginner
intermediate
curious george
friend finder
wise owl
@jellis5612

Using an external js file with

window.addEventListener(‘keydown’, function (e) {
if (e.altKey && e.keyCode == 81) {
alert(“alt q”)
}
});

Using the above solution with getDisplayWindow() works for me when publishing for seamless play so I’m just going wilth that.  But just messing around more, something else strange happens.  Used the key trigger action and for whever reason, it started to work…kind of.  Just published without seamless play and if I did the key trigger action first (just using the letter “w”), it’d work and then if I used the alt q from the external js file, that would work.  But when go and try to use “w” key again, then the keystroke wouldn’t be picked up.  The alt q continued to work.  This is probably a very unlikely scenario anyone would experience so it probably doesn’t matter too much.