We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

how to trigger animation when pressing a keyboard key with Puzzle ?

Home Forums General Questions how to trigger animation when pressing a keyboard key with Puzzle ?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #66876
    Claas
    Participant

    I see that the event system has a logic for doing something when a geometry object is clicked with the mouse but I do not see anything for when pressing a keyboard key instead.

    How would you do this?

    Next question would be how a HTML button pressed with the mouse could trigger a change too.

    Like changing the material of a mesh object as an example.

    #66877
    xeon
    Customer

    Try this page for HTML puzzles
    https://www.soft8soft.com/docs/manual/en/puzzles/HTML.html

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #66878
    Claas
    Participant

    Hi Xeon

    Thank you – I see for the keyboard it does use a different event system.

    Thank you !

    #66879
    Claas
    Participant

    so I have rebuild a the logic

    everything works but not when I press a button in this case left arrow.

    any idea what is wrong?

    Attachments:
    You must be logged in to view attached files.
    #66884
    xeon
    Customer

    Your puzzles are correct except for one small detail. Replace “keypress” with “keyup”.

    Attachments:
    You must be logged in to view attached files.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #66887
    kdv
    Participant

    but not when I press a button in this case left arrow

    Enable in parent doc like in the last two puzzles. When embedded in a frame the app’s page (document) is practically never in focus and doesn’t “hear” key events.

    And yes, you’d better avoid using keypress and keydown. They are recurring events while keyup occurs only once.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #66912
    Claas
    Participant

    Thank you both of you!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.