Does Mojo or HKN2 and HKN play nice together?

The next generation of HotkeyNet.

Does Mojo or HKN2 and HKN play nice together?

Postby LightCC on Sat Jan 30, 2010 5:10 pm

I love how my HKN scripts are working. I have modes for sending normal boxing keys, and modes for copying basically the entire keyboard...

But ideally I could also use the mouse to control the 2nd PC from mouseover or pressing a button to change PCs. Mojo does this well, but obviously loses a ton of functionality currently.

So I tried running both Mojo and HKN, which was working for the most part, but Enter wouldn't work on the main PC no matter what mode mojo was in... Is there something I can do to have them both working, or should I make suggestions over in the Mojo forums to keep in mind compatibility if possible - I wouldn't want them spending a lot of time, but if it's something simple to keep them running together for the shortterm.

All I need from mojo for the moment is the mouseover (not even keyboard copying), really... could it be as simple as which order I load the programs in?
LightCC
 
Posts: 8
Joined: Wed Nov 18, 2009 2:44 pm

Re: Does Mojo or HKN2 and HKN play nice together?

Postby HotkeyNet on Sat Jan 30, 2010 6:33 pm

LightCC wrote:So I tried running both Mojo and HKN, which was working for the most part, but Enter wouldn't work on the main PC no matter what mode mojo was in...

Thanks for reporting this problem.

I can't think of any reason why Mojo and HotkeyNet 1 would interfere with each other, or why the Enter key would be different from any other key.

Can you describe exactly what you're doing when you press Enter, and what exactly it's not doing that makes you say it's not working?

You can continue posting about this here, that's fine.
-- Freddie
HotkeyNet
Site Admin
 
Posts: 5177
Joined: Fri Mar 28, 2008 8:36 pm

Re: Does Mojo or HKN2 and HKN play nice together?

Postby LightCC on Fri Feb 12, 2010 4:46 am

Ok...

First I load up HKN1 on both PCs. All my scripts are working fine. With 'normal' mode for me (not copying anything to the second PC except some modified hotkeys and some numberpad keys), everything is working fine - pressing Enter executes the following in HKN1 (on the local PC):

<SendFocusWin>
<Key Enter>
<SetToggle 1 Hotkey CapsLockOff NumLockOn Enter>

The last one is just something that helps control which mode I'm in, and being in normal mode this keeps it in that mode indefinitely, until I manually hit CapsLock or NumLock to change modes. Anyway, everything is working fine.

However, once I load up Mojo on the local PC (it doesn't matter whether Mojo is up or connected on the 2nd PC), Enter just stops passing through to the window with focus - I get the exact same messages in HKN1 as I did before. If I remove the checkmark by the 'Turn On' hotkeys box, Enter starts working again, and when I turn hotkeys back on it stops working. All my other keys seem to be working fine. Enter fails to fire off in both Everquest II and in other local windows with focus (like this one as I type this message, I've had to close down Mojo or turn off hotkeys in HKN1 to press enter).

-------

While writing this, just figured out - if I shut down HKN1 and open it after Mojo is already running, everything works fine. Enter only fails if Mojo runs after HKN1 is already running. This is true of each PC individually also - I cannot copy Enter to the second PC with HKN1 if Mojo is running and was loaded after HKN1 - independent of whether Enter is working on the local PC. After closing HKN1 and reopening it (on the 2nd PC, while Mojo continues to run), Enter will copy to the 2nd PC correctly.

So this probably has something to do with the order in which the programs are hooking the keyboard handler (is that the right programming description? heh).


--------

With a workaround for this problem now (I think), at this point the main problem I've been having with the mouseover is that I get shift, alt, and ctrl (and other normal keys as well) 'stuck on' when I swap between PCs. It would be really nice to have a checkbox for a mode where all keys are released when you mouse over to a different PC (well, all virtual keys, I suppose it should just revert to the mode the local keyboard is in?)

But the mouseover control and functionality is top notch, you all did a really good job there - I'm able to right-click and drag in EQ2, which a few other programs I tried were not able to do successfully. The amount of updates needed and quality of control is there. Keep up the good work! :D
LightCC
 
Posts: 8
Joined: Wed Nov 18, 2009 2:44 pm

Re: Does Mojo or HKN2 and HKN play nice together?

Postby HotkeyNet on Fri Feb 12, 2010 7:32 am

So this probably has something to do with the order in which the programs are hooking the keyboard handler (is that the right programming description? heh).

Thanks for taking time to write this report!

Your description is very very close to what a programmer would say. The programs are hooking the keyboard. When they hook the keyboard, they install a handler. The handler is the part of Mojo or HotkeyNet that does something (like execute a hotkey) when you press a key. And yes, the order matters.

What it boils down to is whether or not the program's handler allows other programs' handlers to see the keystroke. There is a chain of handlers, and each one makes a decision about whether the handlers that follow will see the keystroke. To control this with HotkeyNet, you include or omit <PassThrough> in a hotkey definition. Mojo allows other handlers to see the keystroke except when (1) broadcast is on and it broadcasts or (2) mouseoever is on and it's moused over.

The next handler can belong to the operating system itself. With HotkeyNet, for example, if you trigger a hotkey that doesn't contain <PassThrough>, HotkeyNet will execute the hotkey in response to your physical key press but the operating system won't do what it normally does when that key press happens.

All this behavior is by design. Its intrinsic to what people want these programs to do. If the progams always called the next handler in the chain of hooks, they wouldn't do their jobs.

With Mojo, I haven't yet fine-tuned exactly when it calls the next handler and when it doesn't, so you might have found something I should change.

I'm still wondering if you found something that's exclusive to the Enter key for some reason. There's no special code for that key and nothing that I wrote above applies to that key more than any other key.

If you want more help with this, I'll need to see the whole hotkey (not just the fragment you pasted).

With a workaround for this problem now (I think), at this point the main problem I've been having with the mouseover is that I get shift, alt, and ctrl (and other normal keys as well) 'stuck on' when I swap between PCs. It would be really nice to have a checkbox for a mode where all keys are released when you mouse over to a different PC (well, all virtual keys, I suppose it should just revert to the mode the local keyboard is in?)

I fixed this in a recent Mojo build for the case where it happens due to things such as Alt-tabbing on the local PC. It sounds like you found another situation where the fix needs to be applied. Could you give me a step-by-step procedure for making the problem happen?

But the mouseover control and functionality is top notch, you all did a really good job there - I'm able to right-click and drag in EQ2, which a few other programs I tried were not able to do successfully. The amount of updates needed and quality of control is there. Keep up the good work! :D

Thanks for the kind words! And thanks for taking time to write this report! Much appreciated.
-- Freddie
HotkeyNet
Site Admin
 
Posts: 5177
Joined: Fri Mar 28, 2008 8:36 pm


Return to HotkeyNet 2

Who is online

Users browsing this forum: No registered users and 1 guest