It is currently September 18th, 2021, 7:22 pm

Rainmeter blocks turn off hotkey

Get help with installing and using Rainmeter.
Ronin
Posts: 2
Joined: March 22nd, 2021, 2:24 pm

Rainmeter blocks turn off hotkey

Post by Ronin »

Hello.
When Rainmeter is on, I can't turn off my computer with alt-f4. However, I still can close windows with those keys.
Why does it happen, and how it can be fixed? Also, can Rainmeter be closed by hotkey?
Windows 10, Rainmeter 4.3.1.3321 (64-bit)
Last edited by Ronin on March 22nd, 2021, 6:41 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22276
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rainmeter blocks turn off hotkey

Post by jsmorley »

Yeah, Rainmeter will "see" the ALF F4, but does not respond to it like other applications and shut down. So in effect it does "block" using ALT F4 to close all running applications one after the other until Windows itself offers to shutdown.

The answer I think is the HotKey plugin.

https://forum.rainmeter.net/viewtopic.php?f=127&t=18849

So you might create a little skin like this:

QuitHotKey_1.0.rmskin

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeasureQuit]
Measure=Plugin
Plugin=HotKey
HotKey=ALT F4
KeyDownAction=[!Quit]

[MeterDummy]
Meter=String
That will run invisibly in the background, and when ALT F4 is pressed it will react to that and close Rainmeter.

The .rmskin above will install the HotKey plugin on your system for you.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22276
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rainmeter blocks turn off hotkey

Post by jsmorley »

If the goal is to have ALT-F4 shutdown or restart the computer itself, you might want to use that HotKey plugin like this:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
RestartComputer=[shutdown.exe -r -t 00]
HybridShutDownComputer=[shutdown.exe -s -hybrid -f -t 00]
FullShutDownComputer=[shutdown -s -f -t 00]
SleepComputer=[rundll32.exe PowrProf.dll,SetSuspendState 0,1,0]
LogoffWindows=[shutdown -l]
LockWindows=[rundll32.exe User32.dll,LockWorkStation]

[MeasureQuit]
Measure=Plugin
Plugin=HotKey
; Just replace the #Variable# below with the one for the action you want to take.
HotKey=ALT F4
KeyDownAction=#FullShutDownComputer#

[MeterDummy]
Meter=String
Ronin
Posts: 2
Joined: March 22nd, 2021, 2:24 pm

Re: Rainmeter blocks turn off hotkey

Post by Ronin »

Thank you.
QuitHotKey plugin is a suitable solution, and it works
User avatar
jsmorley
Developer
Posts: 22276
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rainmeter blocks turn off hotkey

Post by jsmorley »

Ronin wrote: March 22nd, 2021, 6:38 pm Thank you.
QuitHotKey plugin is a suitable solution, and it works
Great!