Forum Discussion

DidierReymond's avatar
DidierReymond
Community Member
16 days ago

Use keyboard keys to move a shape on a slide

Hi, everyone, 
I can't move a shape with the keyboard in storyline360.
I'd like to use the keyboard arrows to move a shape vertically and horizontally within a slide. I've tried with states, with move triggers, but it doesn't work.
Have any of you done this before and could you explain?

Thanks ! 

  • JesseWu's avatar
    JesseWu
    Community Member

    Depends on how flexible you are expecting your movement:


    Easy tier: (Trigger) When user presses [key], Move [object] along [motion path].
    Disadvantages: Stiff, as you can imagine.

    Bonus tier: You might want to learn from this author. He proved it is possible to do it without advanced scripts.

    JavaScript tier:
    Last time I did it:
    Add event listeners with Storyline triggers to arrow keys, so it works the same for users press keys and hold keys 
    Find the selectable identifier of my object and manipulate its position by desired pixels with triggers from above. 
    Create boundary (air wall preventing object goes out of screen)
    Disadvantages: Lot of steps and prerequisite knowledge.