Sending Ctrl+B to Google Chrome window

100 views
Skip to first unread message

Sean Anderson

unread,
Jul 23, 2013, 3:52:27 PM7/23/13
to hoe...@googlegroups.com
Hey guys,

I'm new to hoekey, but have high technical knowledge. Just curious how I should be debugging this.

I would like to replicate having focus inside of Google Chrome and pressing "Ctrl + B";

My current message looks like:

~A=Msg|Chrome_WidgetWin_1|1024|67134976|525340

I started with using Spy++. I put focus over the parent chrome window to get the unique name Chrome_WidgetWin_1.

Then, I followed the instructions here: https://groups.google.com/forum/#!topic/hoekey/0_Myb12eQFU

The instructions were pretty clear and I've got the following log message:

<0000001> 000D02BC S WM_COMMAND wNotifyCode:0400 wID:26112 hwndCtl:0008041C

when I right-click I can see the following paramaters:

wParam: 04006600
IParam: 0008041C


As such I converted those values to decimal and used them in my message. I do not see the effect of ctrl+b when I hit windows + A, though.

Playing around with various keybindings -- I don't see the WM_COMMAND changing, which seems odd. I should be seeing different commands for different keyboard strokes, yeah?

Any ideas?

Thanks

Miles Comer

unread,
Jul 23, 2013, 6:28:54 PM7/23/13
to Sean Anderson, hoe...@googlegroups.com
Silly question, what does "Ctrl+B" do in Google Chrome? If I Ctrl+Shift+B it toggles the Bookmarks bar, but I can't seem to figure out what Ctrl+B does. Thanks in advance.


--
You received this message because you are subscribed to the Google Groups "hoekey" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hoekey+un...@googlegroups.com.
To post to this group, send email to hoe...@googlegroups.com.
Visit this group at http://groups.google.com/group/hoekey.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sean Anderson

unread,
Jul 23, 2013, 6:31:52 PM7/23/13
to Miles Comer, hoe...@googlegroups.com
Nothing special. It could be any key combination. I have the key mapped to my Google Chrome Extension through http://developer.chrome.com/extensions/commands.html and I would like to illicit the event in my extension through hoekey.


Miles Comer

unread,
Jul 25, 2013, 1:17:23 AM7/25/13
to Sean Anderson, hoe...@googlegroups.com
I think you are right about the "why isn't Spy++ changing as I press a key in Chrome", I was getting the same results. Looking at http://www.bcheck.net/apps/hoekey.htm I see a section for "Keys" and it made me think "You are using a keyboard shortcut, to send a keyboard shortcut", and that is where you may have to approach this problem in a different manner.

The "MSG" in HoeKey is to duplicate those call/wParam/iParam; but those aren't keyboard presses. I think that's why you aren't seeing anything in Spy++.

To fix your issue: does your Extension send a MSG of call/wParam/iParama ? Perhaps you could use those values.

Or: Have your extension instead use one of the shortcut HoeKey does offer with "Keys" like Ctrl+Up, Ctrl+Down, Alt+Up, Alt+Down; but there might be an issue there because I don't see an option in the "Keys" section to specify "I want this keyboard press to be executed in this program"; it seems to just put in the text where the cursor is at the moment.

FYI: Always save before testing, I tried:
~A=Keys|Now is the %g for all good men to come to the aid of their parties
Then ran it in notepad, I saw it type: Now is the
Then the computer locked my account as if I had hit Window+L and when I logged back in a bunch of command prompts were open, with another in the Run box, Notepad was blank, and everything was frozen.
Reply all
Reply to author
Forward
0 new messages