When (hardcoded) Key Pressed, Down, Released Event

Dom818

  • *
  • Posts: 1292
I think there should be an event that allows us to detect when a key on the keyboard is pressed, held, or released. There should also be a drag able block that allows us to get the current key that was pressed. This would allow much easier access to the keyboard.

« Last Edit: November 05, 2012, 02:03:22 pm by Jon »

saulochina

  • Posts: 214
pressed or release already exists as events in "add event/input" if you choose keyboard. and if you go to controls in the game settings you can choose any key to be a control and give it a name. then under user input you can find the blocks to detect if the key was pressed, released or held(is down).
Finding the fun!
Squib Wars. Now complete, and avaible for free on App Store! http://bit.ly/LxJ62L
https://www.facebook.com/twoheadedgames
Twitter: @saulochina
MSN: sauloj.china@hotmail.com

Dom818

  • *
  • Posts: 1292
pressed or release already exists as events in "add event/input" if you choose keyboard. and if you go to controls in the game settings you can choose any key to be a control and give it a name. then under user input you can find the blocks to detect if the key was pressed, released or held(is down).

I know that; but I was thinking of something a little different. It would tell you which key was pressed so you wouldn't have I set up individual controls (there are a lot of keys on the keyboard which would lead to hundreds of controls).

Hectate

  • *
  • Posts: 4643
This sounds like a good extension perhaps...
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

captaincomic

  • *
  • Posts: 6108
This will be in 3.1

dripple

  • Posts: 747
Yiiiiiehaaaa. Thanks!!!!
Just found the event, finally we can develop proper keyboard handlers :D
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

captaincomic

  • *
  • Posts: 6108
:) Let me know if it works as expected. I would be curious to know if the event also works with mobile on-screen keyboards, if you do mobile games as well.