StrokesPlus.net Forum
»
General Discussion
»
Feature Requests
»
Disable secondary gestures in certain applications
Rank: Newbie
Groups: Approved
Joined: 4/18/2019(UTC) Posts: 1
|
I am a loyal fan. I used Strokesplus before. First switch to Strokesplus.net. I found that secondary gestures are a very good feature. I really like it. I defined the middle mouse button. But there are some problems. For example, some software needs to move with the middle mouse button. This will draw the secondary gesture. And this is not what I need. The current method is after opening the specific software. Disable secondary gestures first. After the software is used up, turn on the secondary gestures. Is there any way to disable secondary gestures in some specific applications.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
You can use the Global Actions > Window Events > Foreground Window Change to control things based on the application which gains focus. For example, this disabled the secondary stroke button if Chrome is the foreground window, otherwise the middle button is set to the secondary stroke button. Code://If Chrome is the foreground (active) window,
//disable secondary, otherwise set middle mouse as secondary stroke button
if(sp.ForegroundWindow().Process.MainModule.ModuleName == "chrome.exe"){
sp_config.SecondaryStrokeButton = MouseButtons.None;
} else {
sp_config.SecondaryStrokeButton = MouseButtons.Middle;
}
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 1/11/2022(UTC) Posts: 3
Thanks: 2 times
|
This works, but I get this error dialog every time I minimize any window or unlock windows: Quote:
Scripting Engine Failure
Script execution failed.
Error: Unable to enumerate the process modules. at Script [18]:7:33 -> if(sp.ForegroundWindow().Process.MainModule.ModuleName == "edge.exe"){
Since disabling right key gesture in games is a common usage, can you add an per application setting to disable one of the stroke buttons? Edited by user Wednesday, January 12, 2022 3:33:18 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Try 0.5.5.6 - I added new properties (.ExecutableName & .ExecutablePath) which use the internal methods for getting EXE name/path. These methods are more resilient and try more than one approach to obtaining the EXE name/path. Note that there can still be instances where S+ cannot obtain the EXE info due to security, in that case these properties will just return an empty string (but no error). Code://If Chrome is the foreground (active) window,
//disable secondary, otherwise set middle mouse as secondary stroke button
if(sp.ForegroundWindow().ExecutableName == "chrome.exe"){
sp_config.SecondaryStrokeButton = MouseButtons.None;
} else {
sp_config.SecondaryStrokeButton = MouseButtons.Middle;
}
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Newbie
Groups: Approved
Joined: 1/11/2022(UTC) Posts: 3
Thanks: 2 times
|
There are no error dialogs now, thanks. Quote:Since disabling right key gesture in games is a common usage, can you add an per application setting to disable one of the stroke buttons? Did you see this part of my previous post? When I was using the old (not .net) version, I used to add every single game to the ignore list. I can use the script to change the stroke buttons now, but it would be nice if we can configure the stroke buttons for each application.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
I did see it, but it's not something I'll be adding soon, since it's a bit complicated internally and my time is limited.
|
|
|
|
StrokesPlus.net Forum
»
General Discussion
»
Feature Requests
»
Disable secondary gestures in certain applications
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.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close