Page 1 of 1

Is there a script to auto press a key top prevent backlight timeout?

Posted: 22 Sep 2017, 10:35
by noylopa
I know this is a stretch, since this is more a hardware issue -- but I was wondering if there was a script I could run that would mimic a keypress to prevent my keyboard backlight from timing out? I work in a very dim office and need to have the keyboard backlight on pretty much all the time. Unfortunately my keyboard backlight times out after 30 seconds.

So I was thinking of a script that would automatically mimic a keypress every 20 seconds? But would that even have an affect on something that is based on hardware configuration?

I've already checked my BIOS and unfortunately, there are no options there to adjust the keyboard backlight settings.

Any help with this would be GREATLY appreciated. Thank you in advance!

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 22 Sep 2017, 10:40
by BoBo
Tested by H.S.! :thumbup: (now animated) :!:

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 22 Sep 2017, 10:45
by noylopa
BoBo wrote:Tested by H.S.! :thumbup:
Ok, thank you for that, that was funny at least:)

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 22 Sep 2017, 10:59
by BoBo

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 22 Sep 2017, 20:24
by noylopa
Honestly, I couldn't make heads or tails of that. I'm really a complete noob at this. I only use one script to keep certain windows on top, whether focused or not (very handy) that another user was kind enough to forward me.
Given that what most people seem to use autohotkey for is pretty elaborate stuff, I think my stupidly basic request is probably harder to grasp.

But if anyone happens to know a script that will mimic a physical keypress (of any key) that occurs every 20 seconds, that would be bloody awesome:)

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 23 Sep 2017, 09:57
by vahju
You may want to check out the keyboard manufacturer's website. It is possible that your keyboard has a built in setting that allows you to change the back light settings.

On my Aukey keyboard I can press FN+INS keys to through the various back light modes.

Hope that helps.

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 24 Sep 2017, 06:37
by Potato
This presses Scrolllock twice every 20seconds

Code: Select all

#Persistent
SetTimer, PressTheKey, 20000
Return

PressTheKey:
Send {Scrolllock}
Send {Scrolllock}
Return

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 24 Sep 2017, 22:40
by noylopa
Thank you very much for taking the time to reply -- unfortunately, that didn't work. The script is correct but since this is a weird hardware issue, it needs to replicate an actual physical keypress, not the end result of the keypress. I know there are cases where AHK can be effective on a hardware level, but it's tricky to nail down.

I guess I need to just get a laptop with an optional continuous backlight. But thanks to all who replied!

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 24 Sep 2017, 23:11
by Xtra
Seems like a power saving setting of some kind turning it off. What brand and model laptop is it?

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 24 Sep 2017, 23:48
by noylopa
It's an Acer Spin 5. Great laptop EXCEPT for its backlight keyboard whose 30 second timeout is a power saving feature. What's frustrating is the laptop has a +10 hour battery life, so it could totally stand to waste a little extra power keeping the keyboard continuously lit. Others on the acer forums have expressed the same grievances but no one has found a fix yet. I thought I'd try my luck with the AHK experts, but I know this is a tricky request, given this is a hardware-centric issue.

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 25 Sep 2017, 00:03
by jeeswg
I don't know if this will work for you, but it might be worth a try:

Code: Select all

q:: ;move mouse if idle
vInactivityLimit := 25000, vJogDistance := 1
;vInactivityLimit := 2000, vJogDistance := 100
Loop
{
	if (A_TimeIdlePhysical > vInactivityLimit)
	{
		MouseMove, 0, % vJogDistance, 0, R
		vJogDistance *= -1
	}
	Sleep, % vInactivityLimit
}
return
There may also be some programs e.g. video players (web browsers possibly) which, while open, prevent the PC being seen as idle.

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 25 Sep 2017, 10:18
by noylopa
Thank you for taking the time -- I will try this as soon as I get home!

Re: Is there a script to auto press a key top prevent backlight timeout?

Posted: 29 Sep 2017, 22:41
by noylopa
Unfortunately, this didn't work. Mouse movements don't trigger the keyboard backlight after it's gone out -- only key presses do that (I don't know why I didn't realize that sooner).

So I would need to figure out how to clone an actual physical keypress, if that is at all possible...