playMaker

Author Topic: Simulate keypresses/input as if using a real physical keyboard/mouse  (Read 535 times)

AndroYD

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Hello,
I've read this article here: https://answers.unity.com/questions/588786/is-it-possible-to-simulate-a-keypressinput-in-code.html
And apparently it's totally possible to do it in Windows with Unity, any hero willing to port this code into Playmaker, please?
That would be very incredibly useful, no more struggling with converting a project from using physical keys to virtual buttons, not to mention for automating repetitive tasks.
Thanks in advance.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4116
    • View Profile
    • jinxtergames
Re: Simulate keypresses/input as if using a real physical keyboard/mouse
« Reply #1 on: September 28, 2018, 09:42:16 PM »
Hi.
I actually use something recently from github :
https://github.com/kmpm/MoJ/tree/master/references/InputSimulator.0.1.0.0-bin

I also made actions for this that will be included in one of my upcoming assets.
(hoping to release in 2 weeks)

Thore

  • Full Member
  • ***
  • Posts: 212
    • View Profile
Re: Simulate keypresses/input as if using a real physical keyboard/mouse
« Reply #2 on: September 30, 2018, 07:10:44 PM »
Seems this forums Jean is an expert on this 😊

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14057
  • Official Playmaker Support
    • View Profile
Re: Simulate keypresses/input as if using a real physical keyboard/mouse
« Reply #3 on: October 01, 2018, 12:19:55 AM »
Hi,

 well, this applies to those who can code.

 today, I would simply recommand using a proper Input Manager like Rewired ( https://assetstore.unity.com/packages/tools/utilities/rewired-21676) which has PlayMaker support.

 then you have extrem power in handling complex input scenarios.

 Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4116
    • View Profile
    • jinxtergames
Re: Simulate keypresses/input as if using a real physical keyboard/mouse
« Reply #4 on: October 01, 2018, 01:43:52 AM »
Hi jean.

I don't think that rewired works in the window environment.
(outside the game)

I made an app for my midi controller so i could set some strings on a midi key
this way i only need to press the midi key to set a url link like the link to the Ecosystem
Code: [Select]
[url=https://hutonggames.fogbugz.com/default.asp?W1181]Ecosystem[/url]

AndroYD

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: Simulate keypresses/input as if using a real physical keyboard/mouse
« Reply #5 on: October 01, 2018, 06:08:52 AM »
Exactly what Djaydino said, imagine even doing some crazy Psycho Mantis stuff ( https://youtu.be/t0oHnGM_iQw?t=1m22s) in a horror game.