StrokesPlus.net Forum
»
General Discussion
»
General Discussion
»
Create Hotkeys for Surface Pen within Specific Applications
Rank: Newbie
Groups: Approved
Joined: 9/5/2021(UTC) Posts: 8 Thanks: 2 times
|
Hey Rob, really loving your software, don't know what I would do without it! This is a bit of a niche problem I'm trying to figure out. I recently bought a Microsoft Surface Touch Tablet, and I'm experimenting with S+ on it. Here's the two threads that are the most relevant on the forum: Make hotkeys work only in specific programsApp Specific ShortcutsBasically, I'm trying to create specific hotkeys for difference applications with the Surface Pen. The Surface Pen has an erase button with three Hotkeys: WIN + F18, F19, F20 (Single press, double press, and hold). Here's an example script for WIN + F19 (which isn't working): Code:if(sp.ForegroundWindow().Title.indexOf("- Obsidian") > -1) {
sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_E]);
}
Here's another example: Code:if(sp.ForegroundWindow().ExecutableName == "Obsidian.exe") {
sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_E]);
} else {
// Otherwise send F1 for any other app
sp.SendVKey(vk.F1);
}
Any ideas on what could be going on? The whole Surface Pen setup is a little clumsy, so it's possible this is a Microsoft problem. Thanks!
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
Are you able to confirm whether S+ is seeing the hotkey being pressed at all? e.g. is you just put this as the script and see if it shows up in the S+ Console > User tab? Code:StrokesPlus.Console.Log("pressed");
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Newbie
Groups: Approved
Joined: 9/5/2021(UTC) Posts: 8 Thanks: 2 times
|
Okay just tried it, doesn't register at all. I might stick to AHK for this one, that's how I've gotten it to work so far.
Thanks for your help Rob.
|
|
|
|
StrokesPlus.net Forum
»
General Discussion
»
General Discussion
»
Create Hotkeys for Surface Pen within Specific 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