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

Notification

Icon
Error

Options
Go to last post Go to first unread
bullfrog  
#1 Posted : Sunday, December 8, 2019 12:14:50 PM(UTC)
bullfrog

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/8/2019(UTC)
Posts: 4
Korea, Republic Of
Location: Gwangju

I tried to use BROWSER_BACK and BROWSER_FORWARD gestures, but it does not work.
This is not a problem of gesture, as I confirmed Alt+left combination working well.
I also confirmed BROWSER_BACK and BROWSER_FORWARD virtual keys are supported by my browser(firefox), by using autohotkey to send BROWSER_BACK.
Other virtual keys, like MEDIA_PLAY_PAUSE, also does not work.

After trial and errors, I found that WM_APPCOMMAND message is the source of problem. autohotkey sends WM_APPCOMMAND message automatically, while strokesplus does not.

For example, following script does not work as intended:
Code:

sp.SendVKey(vk.BROWSER_BACK);


But following script does:
Code:

action.Window.SendMessageObj(0x0100 /*WM_KEYDOWN*/, 0xA6 /*BROWSER_BACK*/, 0x416A0001);
action.Window.SendMessageObj(0x0319 /*WM_APPCOMMAND*/, action.Window.HWnd, 1 << 16 /*BROWSER_BACK*/); 
action.Window.SendMessageObj(0x0101 /*WM_KEYUP*/, 0xA6 /*BROWSER_BACK*/,  0x016A0001);


I Think SendVKey should also send proper WM_APPCOMMAND messages for media keys.
Rob  
#2 Posted : Sunday, December 8, 2019 2:46:20 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
That's odd, they all work fine for me. I tried Chrome and Firefox for browser navigation and the media play/pause/next/prev track VKs and they all work fine in VLC.

What Windows version are you using?

I will definitely research the WM_APPCOMMAND especially in conjunction with these keys.
bullfrog  
#3 Posted : Sunday, December 8, 2019 2:55:43 PM(UTC)
bullfrog

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/8/2019(UTC)
Posts: 4
Korea, Republic Of
Location: Gwangju

My OS is Windows 10 1903. I'm using laptop that lacks any media keys, could that be relevant? My laptop does have volume up/down key, and VOLUMN_UP/DOWN virtual keys work just fine...
bullfrog  
#4 Posted : Sunday, December 8, 2019 3:00:01 PM(UTC)
bullfrog

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/8/2019(UTC)
Posts: 4
Korea, Republic Of
Location: Gwangju

Testing again, AIMP does react to MEDIA_PLAY_PAUSE. But MPC_HC does not. Both correctly responds to autohotkey-generated MEDIA_PLAY_PAUSE.
Rob  
#5 Posted : Sunday, December 8, 2019 6:26:44 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Nah, my laptop doesn't have media/browser keys. I'm sure it's a matter of WM_APPCOMMAND needing to be sent. Not sure why it works on my system, but I'll look into it and confirm the behavior still works on my system and roll it out in the next release.
Rob  
#6 Posted : Monday, December 9, 2019 3:53:06 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Hmm, I updated the code to also send the app command message after key down, but that caused problems for me; essentially the command was happening twice. Once for the key and once for the app command.

So I changed it to only send either the app command or the key message and it seems to be working.

I will need to do some more testing, but I will include it in the upcoming beta release which adds new Steps functionality (instead of a script, you can use Steps...which is targeted at less technical people).
Rob  
#7 Posted : Monday, December 9, 2019 3:57:56 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Also, try testing that one your end, only sending the app command message, not the key down/up and see if it works for you.
bullfrog  
#8 Posted : Monday, December 9, 2019 4:22:16 PM(UTC)
bullfrog

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/8/2019(UTC)
Posts: 4
Korea, Republic Of
Location: Gwangju

Sending only appcommand definitely works here. I thought adding 'send appcommand for media keys' option would do in case of double press, but either way it will be great.
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.