Keypress capture?

  • Vovix
    16th Aug 2011 Member 0 Permalink
  • Cr15py
    16th Aug 2011 Member 0 Permalink
    https://powdertoy.co.uk/Wiki.html?id=lua
    This should have been the first thing in this thread.
  • Vovix
    16th Aug 2011 Member 0 Permalink
    Are you sure this works? This script:
    function main()
    tpt.log(key_num)
    end
    tpt.register_keypress(main)

    does nothing.
    EDIT:
    Figured out the problem, but now this:

    function main(key_num)
    tpt.message_box("QUACK!", key_num)
    end
    tpt.register_keypress(main)

    returns the character and not the number of the key.
  • mniip
    16th Aug 2011 Developer 0 Permalink
    Umm... and now there is no sense in my tpt lua keyboard
  • Dingolo
    16th Aug 2011 Member 0 Permalink
    how to open my saved screenchot?