Any events that don't need window focus?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
radiantDev
Prole
Posts: 1
Joined: Wed Oct 07, 2015 11:58 pm

Any events that don't need window focus?

Post by radiantDev »

I am trying to start and stop a timer I made in love2d, but I want to be able to start and stop it even when the window does not have focus. Is this possible? I already tried the Keypress callback and love.keyboard.isDown() but they don't work without focus.

Any help is greatly appreciated!
User avatar
zhek0s
Prole
Posts: 8
Joined: Fri Nov 07, 2014 3:02 pm

Re: Any events that don't need window focus?

Post by zhek0s »

User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Any events that don't need window focus?

Post by zorg »

Unless you get some kind of hooking library that notifies your program about keypresses/whatever as the os receives them, i don't think it's possible.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Any events that don't need window focus?

Post by T-Bone »

I think it's deliberate that input (keyboard, mouse, etc) shouldn't affect a window that's not in focus. love.update still runs, but you can't (and shouldn't) be able to access any input.

If you need that, it sounds like you're choosing the wrong tool for the job.
Post Reply

Who is online

Users browsing this forum: No registered users and 210 guests