I need help on getting the mouse buttons to work.
Can I get example code of one of the mouse buttons?
It is currently March 29th, 2024, 3:58 pm
HotKey plugin 1.0
-
- Posts: 3
- Joined: March 11th, 2017, 10:27 pm
-
- Developer
- Posts: 2674
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: HotKey plugin 1.0
Mouse buttons only work in combination with other non-mouse keys.Leaversa wrote:I need help on getting the mouse buttons to work.
Can I get example code of one of the mouse buttons?
https://github.com/brianferguson/HotKey.dll/blob/master/README.md#pre-defined-hotkey-keywords
There is an example using a mouse key in the hotkey docs:
https://github.com/brianferguson/HotKey.dll/blob/master/README.md#user-content-examples
Or a simple example here:
Code: Select all
[LeftMouseSpacebarHotkey]
Measure=Plugin
Plugin=HotKey
HotKey="SPACE LBUTTON"
KeyDownAction=[!SomeBang ...]
-Brian
-
- Posts: 9
- Joined: December 11th, 2017, 6:35 pm
Re: HotKey plugin 1.0
Hi,
Please could someone help with newb advice on how to use this plugin to trigger change of Rainmeter layout via a hotkey combo e.g. CTRL-ALT-A or Windows-CTRL-1 etc?
Please could someone help with newb advice on how to use this plugin to trigger change of Rainmeter layout via a hotkey combo e.g. CTRL-ALT-A or Windows-CTRL-1 etc?
-
- Rainmeter Sage
- Posts: 5384
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: HotKey plugin 1.0
You need to create a skin with the following code. Name it anything you want and save it in a new SKINS folder. Refresh Rainmeter and load this new skin. You will not see anything new on the screen, but it will be listed under active skins in the Manage dialog.markpud wrote:Hi,
Please could someone help with newb advice on how to use this plugin to trigger change of Rainmeter layout via a hotkey combo e.g. CTRL-ALT-A or Windows-CTRL-1 etc?
It uses CTRL ALT L as the hotkey combination to step through 3 layouts Elementary, illustro, Enigma Basic, and back to Elementary.
You can set the variables to step through any number of layouts, from 2 to as many layouts as you want.
To toggle between the current layout and another layout, set Layout0=@Backup and Layout1=anotherlayout and NumberOfLayouts=2.
NOTES:
1. In order for this to work, you MUST load this SAME SKIN into those layouts and re-save the layouts; that way this skin is included in those layouts and is ready to switch on the next layout when the hotkey combination is pressed.
2. Requires Rainmeter-4.1-r2876-beta minimum due to nested variable use.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
Group=#RootConfig#
; ========= Metadata ==========
[Metadata]
Name=
Author=
Information=You must add this SAME SKIN to every layout you set in the [Variables] otherwise it is not available and will not work. Requires Rainmeter-4.1-r2876-beta minimum due to nested variable use.
License=Creative Commons Share-Alike NC 4
Version=
; ========= Variables ==========
[Variables]
; Set this to the number of layouts you want to step through with each Hotkey press
NumberOfLayouts=3
CurrentLayoutNumber=0
; Add your layouts starting at zero
Layout0=Elementary
Layout1=illustro
Layout2=Enigma Basic
; ========= Measures ==========
[Hotkey]
Measure=Plugin
Plugin=HotKey
HotKey=CTRL ALT L
KeyDownAction=[!WriteKeyValue Variables CurrentLayoutNumber (([#CurrentLayoutNumber]+1)%[#NumberOfLayouts])][!SetVariable CurrentLayoutNumber (([#CurrentLayoutNumber]+1)%[#NumberOfLayouts])][!LoadLayout [#Layout[#CurrentLayoutNumber]]]
; ========= Meter Styles =========
; ========= Meters ==========
[DummyMeter]
Meter=String
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 9
- Joined: December 11th, 2017, 6:35 pm
Re: HotKey plugin 1.0
Thanks! I'll give it a go
eclectic-tech wrote:You need to create a skin with the following code. Name it anything you want and save it in a new SKINS folder. Refresh Rainmeter and load this new skin. You will not see anything new on the screen, but it will be listed under active skins in the Manage dialog.
It uses CTRL ALT L as the hotkey combination to step through 3 layouts Elementary, illustro, Enigma Basic, and back to Elementary.
You can set the variables to step through any number of layouts, from 2 to as many layouts as you want.
To toggle between the current layout and another layout, set Layout0=@Backup and Layout1=anotherlayout and NumberOfLayouts=2.
NOTES:
1. In order for this to work, you MUST load this SAME SKIN into those layouts and re-save the layouts; that way this skin is included in those layouts and is ready to switch on the next layout when the hotkey combination is pressed.
2. Requires Rainmeter-4.1-r2876-beta minimum due to nested variable use.
Code: Select all
[Rainmeter] Update=1000 AccurateText=1 DynamicWindowSize=1 Group=#RootConfig# ; ========= Metadata ========== [Metadata] Name= Author= Information=You must add this SAME SKIN to every layout you set in the [Variables] otherwise it is not available and will not work. Requires Rainmeter-4.1-r2876-beta minimum due to nested variable use. License=Creative Commons Share-Alike NC 4 Version= ; ========= Variables ========== [Variables] ; Set this to the number of layouts you want to step through with each Hotkey press NumberOfLayouts=3 CurrentLayoutNumber=0 ; Add your layouts starting at zero Layout0=Elementary Layout1=illustro Layout2=Enigma Basic ; ========= Measures ========== [Hotkey] Measure=Plugin Plugin=HotKey HotKey=CTRL ALT L KeyDownAction=[!WriteKeyValue Variables CurrentLayoutNumber (([#CurrentLayoutNumber]+1)%[#NumberOfLayouts])][!SetVariable CurrentLayoutNumber (([#CurrentLayoutNumber]+1)%[#NumberOfLayouts])][!LoadLayout [#Layout[#CurrentLayoutNumber]]] ; ========= Meter Styles ========= ; ========= Meters ========== [DummyMeter] Meter=String
-
- Rainmeter Sage
- Posts: 5384
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: HotKey plugin 1.0
Happy to help!
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 9
- Joined: December 11th, 2017, 6:35 pm
Re: HotKey plugin 1.0
Apologies for the delayed reply, but this worked a treat.. Thanks again!
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: HotKey plugin 1.0
Sorry to gravedig this thread, but I have a feature request: Could the string value of the measure be set to the hex ID of the last pressed key, when ShowAllKeys is enabled? I wish to be able to make a config interface for some hotkeys in one of my skins, but currently there is no way to do this aside from having the user manually open the log and copy the hex IDs to text boxes. Ideally, I would want the user to be able to click a button, and for me to be able to read the key(s) that have been pressed, then save it when the combo is released (this is similar to how many video games and keyboard macro recorders do it).
Thanks for your time. Great plugin, it's very useful and functional!
Thanks for your time. Great plugin, it's very useful and functional!
-
- Posts: 186
- Joined: May 27th, 2012, 5:16 am
Re: HotKey plugin 1.0
Unless I'm doing something wrong, ToggleMeasureGroup, PauseMeasureGroup and TogglePauseMeasureGroup don't seem to work with HotKey plugin measures.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: HotKey plugin 1.0
No, they are not, but as you seen there is another way to disable this kind of measure.