How do I detect keystroke or mouse click?

Not favoritedFavorited Favorited 0 favourites
  • 8 posts
From the Asset Store
Click! Click! 136 click sounds for your video games or media projects
  • Hello...

    I am looking for a way to detect user activity while my app is minimized.

    It seems that e.g. mouse - on any click works only within the app window, but I need somehow to detect users activity generally while my app is not in focus.

    Any tip is more than welcome.

  • That's how all kinds of spyware and hacking programs work. The developers of operating systems and browsers themselves don't want your game or program to know anything about the user's actions outside of your game.

    Of course, there are all kinds of services that legally monitor your mouse or keyboard in the background all the time, but that's a whole different story.

  • I need somehow to detect users activity generally while my app is not in focus.

    I'm curious to why you need this?

  • Well, mine app works in a sense to popup certain time and alert user on certain actions. Like calendar that sends message on certain timer. But since users just close the lid of notebook I need to wake up my app once user is back and I was thinking to maybe detect keyboard activity to resume apps function.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So notifications? You can search here for "notification" plugins here:

    https://www.construct.net/en/make-games/addons

    There's a few in the Store.

  • No, I don't work with notifications. I just make that as an example. I need to wake my app, and I am looking for the way to do that. Unfortunately it can't be time based (that would be easy to make) because my users work in different time frames and they just shut the lid of the notebook and open it the next day... so how do I detect that they are active again in order to reactivate my app.?

    That's what's troubling me.

    any ideas?

  • I'm not sure if that's an app that's possible to make with construct. Construct is browser-based and I heavily doubt it's possible to do this with browsers for security reasons.

    You may be able to write some sort of wrapper in C# I'd think.

  • Nice, Grok provided a nice solution.

    Solved.

    Thanks all.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)