Rank: Newbie
Groups: Approved
Joined: 12/12/2019(UTC) Posts: 3 Was thanked: 2 time(s) in 2 post(s)
|
Hello there! S + supports right mouse button, middle button, left button, X1, X2, to start gestures, I want to be able to support custom keys to initiate gestures. This can make some mouse buttons more effective. I do n’t understand English, this section uses Google Translate, I hope you can understand it.
|
1 user thanked X9dZQm2wSvHpqr for this useful post.
|
|
|
Rank: Newbie
Groups: Approved
Joined: 7/23/2019(UTC) Posts: 7 Thanks: 1 times
|
It is already there. <<<"" Modifiers"">>> Control, Alt, Shift
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 12/12/2019(UTC) Posts: 3 Was thanked: 2 time(s) in 2 post(s)
|
Originally Posted by: halikjk It is already there. <<<"" Modifiers"">>> Control, Alt, Shift Thank you for your reply. I am not going to use modifier keys. I hope it can be used directly, with custom keys to initiate gestures. For example, only use the "A" key, and don't use other keys to trigger gestures.
|
1 user thanked X9dZQm2wSvHpqr for this useful post.
|
|
|
Rank: Advanced Member
Groups: Translators, Moderators, Approved Joined: 4/6/2020(UTC) Posts: 79 Thanks: 1 times Was thanked: 21 time(s) in 21 post(s)
|
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 12/12/2019(UTC) Posts: 3 Was thanked: 2 time(s) in 2 post(s)
|
Originally Posted by: liuxilu# 热键可以设单个键 你是指“热键”功能中,有命令可直接触发手势吗?
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 9/6/2020(UTC) Posts: 1
|
hi, there is a chance to use only a key to start gesture? For example alt key
|
|
|
|
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)
|
So this is kind of a hack (and not really a perfect solution), but if you go to the Downloads page and scroll to bottom, enter 0.3.9.5 and download, you can try this out. In your action, select the Alt key as a modifier (if you're using that key in the script as I have below), since that will part of the recognition if you're holding it - then add the script below in the Load tab. The sp.StartManualCapture action accepts true/false, false is default and signals capturing the Primary stroke button, true tells the capture to simulate the Secondary stroke button (this is relevant to how the action action is configured). Global Actions > Load/Unload > Load tabCode:if(__spEngineWrapper.Engine.Name == sp.EngineList().Last().Engine.Name)
{
var keyboardEventObj = sp.GetStoredObject("keyboardEvent");
if(!keyboardEventObj.GetType().FullName.includes('EventConnection'))
{
//Uncomment the line below if you do not want S+ to capture on mouse button down
//sp.ManualCaptureOnly = true;
//Bind to the asynchronous event (non-blocking)
var keyboardEvent = KeyboardHook.OnKeyboardHookEventAsync.connect(
function (sender, keyboardHookEvent) {
try
{
//If the Left or Right Alt key is pressed/released
if(keyboardHookEvent.Key == vk.LMENU || keyboardHookEvent.Key == vk.RMENU)
{
//Alt key is down, start gesture capture
if(keyboardHookEvent.KeyState == KeyState.Down)
{
sp.StartManualCapture(); //Simulates pressing the Primary stroke button
//sp.StartManualCapture(true); //Use this to simulate the Secondary stroke button
}
else
{
//Alt key released, stop capture and process gesture
sp.StopManualCapture();
}
}
}
catch {}
});
sp.StoreObject("keyboardEvent", keyboardEvent);
}
}
At some point I may need to make a truly supported key method, but it's not something the majority of people request, and it adds a layer of complexity to the hooks.
|
1 user thanked Rob for this useful post.
|
|
|
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