StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Roland  
#1 Posted : Tuesday, June 25, 2019 6:27:32 AM(UTC)
Roland

Rank: Member

Reputation:

Groups: Translators, Approved
Joined: 11/7/2018(UTC)
Posts: 12
Germany

Thanks: 1 times
I'd like to put hotkeys on my extra mouse buttons X1 and X2 so I can switch between different desktops (CTRL+WIN+LEFT and CTRL+WIN+RIGHT).

It works ok, but the hotkeys are sent TWICE, one when I press the mouse button, one when I release it.

The script is this:
sp.SendModifiedVKeys([vk.LCONTROL,vk.LWIN], [vk.LEFT]); // or "RIGHT"

I tried other hotkeys and they are always sent twice.

Rob  
#2 Posted : Tuesday, June 25, 2019 7:20:12 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 208
United States

Thanks: 4 times
Was thanked: 39 time(s) in 32 post(s)
Do you have this script in your X1/X2 Click Scripts?

If so, this is not a bug, you just need to qualify the event. The script gets executed when the mouse button is pressed down, then again when released as someone may want to leverage things in a more complicated way.

Code:
//Only fire on mouse down
if(click.Down) {
    sp.SendModifiedVKeys([vk.LCONTROL,vk.LWIN], [vk.LEFT]); // or "RIGHT"
}


Code:
//Only fire on mouse up
if(!click.Down) {
    sp.SendModifiedVKeys([vk.LCONTROL,vk.LWIN], [vk.LEFT]); // or "RIGHT"
}

Roland  
#3 Posted : Tuesday, June 25, 2019 7:58:14 AM(UTC)
Roland

Rank: Member

Reputation:

Groups: Translators, Approved
Joined: 11/7/2018(UTC)
Posts: 12
Germany

Thanks: 1 times
Ah!!!
Much better!

Thank you :)
2014218866  
#4 Posted : Thursday, June 27, 2019 9:05:48 AM(UTC)
2014218866

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 5/6/2019(UTC)
Posts: 36
China

Thanks: 6 times
Dear Rob, the default function of my X1 in the mouse is backward.
Can you disable the backward function when executing the script mentioned above?
Rob  
#5 Posted : Thursday, June 27, 2019 10:14:49 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 208
United States

Thanks: 4 times
Was thanked: 39 time(s) in 32 post(s)
Unfortunately, these click scripts to not interfere with the mouse button messages, so Windows (or the mouse driver) will still receive them and respond.

You may need to find where the forward/backward are bound for the mouse and disable them.

I might consider adding that as an option, to just absorb mouse events for certain buttons.
2014218866  
#6 Posted : Thursday, June 27, 2019 5:05:44 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 5/6/2019(UTC)
Posts: 36
China

Thanks: 6 times
Yeah,Rob,thanks
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.