DE EN FR ES IT CZ
Back Back to top

isKeyPressed

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  • #1, by andy-rinaldi 13 years ago Quote
    Hi, I need to write a character as * or < and I'm not able to find it in Key Actions. I was thinking to use lua:

    if isKeyPressed(z) then
        add("Z")
    end
    


    but it's no works.

    Also I tried with isKeyDown but nothing happened.

    Thanks.
  • New to Visionaire Studio?

    Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.

    See the Indie Bundle Try it for free
  • #2, by afrlme 13 years ago Quote
    Lua key input support was only recently added to 4.1. You need to create a keyboard event handler to check key pressed/released & special keys.

    http://wiki.visionaire-tracker.net/wiki/RegisterEventHandler -- check example 3.

    Keydown will constantly trigger code if character == x
    keyup will only trigger once on release
    textkeyinput is for unicode characters...

    there are also some special keys that have their own eKey access, which I will add to the _(CMS) page version I will get around to typing up at some point.