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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #401576 Score: 0
    Profile photo of Jack Ellis
    Jack Ellis
    Member
    beginner
    intermediate
    curious george
    friend finder
    wise owl
    @jellis5612

    I’m trying to use normal javascript keystroke combinations (in this case alt + q).  Works like normal but when published for “seamless play”, it won’t work.  Even if I use the built in keystroke action (for a single key) in Lectora and seamless play, keystrokes aren’t getting picked up.  Why is this happening?

    #401605 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    249 pts
    @timk

    Try Run javascript:

    getDisplayWindow().onkeydown = function(e){
    if (e.keyCode == 81 && e.altKey){
    alert("Alt + q");
    }
    }

    If Lectora’s own actions aren’t working the code is slightly different:

    <a href="https://trivantis.com/support-help">Submit Bug Report</a>

    This post has received 1 vote up.
    #401818 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    38 pts
    @wheels

    We went back and tested this and an On Key triggered action for Alt+Q is working for us with publish to seamless play enabled.  Please post an example title or let us know the specifics of what your publish type and options are, and how you are delivering the course and what browser you are using.  This should work so we are very interested to see why it is not!  Thank you for reporting it ….

    #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.

    #401841 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    249 pts
    @timk

    How do you use an On Key Lectora action to be triggered on Alt + Q? I can select one key only, Alt is not accepted.

    #401859 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    38 pts
    @wheels

    Sorry it’s a Keystroke action only available on a page, click into the next key typed trigger and then hold the alt key before pressing the Q key…

    I see in Lectora Desktop you can’t do this, I’ll write up a bug on this.  It works in Lectora Online.

    • This reply was modified 5 months ago by Profile photo of Joe Wieloch Joe Wieloch.
    Attachments:
    #401880 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    249 pts
    @timk

    … but thanks for the explanations how to press two keys at once, might be helpful from time to time 😉

    This post has received 1 vote up.
    #401882 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    38 pts
    @wheels

    Yeah it took me a while to figure it out, anything more than Ctrl+C and Ctrl+V is a struggle for me! Heh heh.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.