Log in

View Full Version : Send key combination using HKN



oeg91
06-13-2020, 11:35 PM
I've been trying to get this for days. I want to broadcast shift+space to my boxs, but isnt working (i use those keys to descent while gathering herbs).
This my script.
Im not sure where i should add the LShift+Space keys. I would like if anyone of you can edit my script and add those keys, or show me a guide to learn how to do that specifically.

//================================================== ==============// SAMPLE SCRIPT FOR TWO WOW'S ON ONE PC
//
// Instructions: Copy this entire script (all the blue writing
// on gray background including comments). Save it in a file.
// Load it into HotkeyNet.
//
// Toggle the scroll lock key to turn hotkeys off and on. (You
// can change this if you want, just like you can change
// everything else with HotkeyNet.)
//
// Requires HotkeyNet build 147 or higher.
//
// For more info, go to www.hotkeynet.com (http://www.hotkeynet.com)
//================================================== ==============

//-----------------------------------------------------------
// PRESS CTRL R, CTRL R, CTRL T TO RENAME WOW'S IF YOU LAUNCH THEM MANUALLY
//-----------------------------------------------------------
<Hotkey ScrollLockOn Ctrl R>
<SendPC local>
<RenameWin "World of Warcraft" WoW1>
<SendPC local>
<RenameWin "World of Warcraft" WoW2>
<SendPC local>
<RenameWin "World of Warcraft" WoW3>

<Hotkey ScrollLockOn Ctrl T>
<SendPC local>
<RenameWin WoW1 "World of Warcraft">
<SendPC local>
<RenameWin WoW2 "World of Warcraft">
<SendPC local>
<RenameWin WoW3 "World of Warcraft">
//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "L:\WOW\World of Warcraft\_retail_\Wow.exe">
<RenameTargetWin %2%>

//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME BOTH WOW'S.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Alt Ctrl L>
<LaunchAndRename Local WoW1>
<LaunchAndRename Local WoW2>
<LaunchAndRename Local WoW3>

//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 Local SendWinM WoW3>

//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Enter, R, X, Z, except W, A, S, D>
<SendLabel w1, w2, w3>
<Key %Trigger%>

//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL FORMATIONS BINDS.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn 8>
<SendLabel w1>
<Key F1>
<SendLabel w2>
<Key F1>
<SendLabel w3>
<Key F1>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn Space>
<SendLabel w1, w2, w3>
<Key %Trigger%>

//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
// THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>

<Hotkey ScrollLockOn Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3>
<ClickMouse %TriggerMainKey%>
<RestoreMousePos>

Wubsie
06-14-2020, 02:11 AM
You'd define it as a movement key as you want the keypress to be held by HKN while the hotkey is pressed. You'll also need to define Lshift to be a modifier key before it can be used as such in the script.

These are the 2 relevant documentation pages:

http://www.hotkeynet.com/ref/usekeyasmodifier.html

http://www.hotkeynet.com/p/movement.html

Note that you don't actually need to be sending Shift+Space to the clients. You can have that be the hotkey that you press and have HKN just send Space.

oeg91
06-14-2020, 06:49 AM
Thanks for the repply.
Im not sure what do you meant, but i try to add this:

//================================================== ==============// SAMPLE SCRIPT FOR TWO WOW'S ON ONE PC//
// Instructions: Copy this entire script (all the blue writing
// on gray background including comments). Save it in a file.
// Load it into HotkeyNet.
//
// Toggle the scroll lock key to turn hotkeys off and on. (You
// can change this if you want, just like you can change
// everything else with HotkeyNet.)
//
// Requires HotkeyNet build 147 or higher.
//
// For more info, go to www.hotkeynet.com (http://www.hotkeynet.com)
//================================================== ==============


//-----------------------------------------------------------
// PRESS CTRL R, CTRL R, CTRL T TO RENAME WOW'S IF YOU LAUNCH THEM MANUALLY
//-----------------------------------------------------------
<Hotkey ScrollLockOn Ctrl R>
<SendPC local>
<RenameWin "World of Warcraft" WoW1>
<SendPC local>
<RenameWin "World of Warcraft" WoW2>
<SendPC local>
<RenameWin "World of Warcraft" WoW3>


<Hotkey ScrollLockOn Ctrl T>
<SendPC local>
<RenameWin WoW1 "World of Warcraft">
<SendPC local>
<RenameWin WoW2 "World of Warcraft">
<SendPC local>
<RenameWin WoW3 "World of Warcraft">
//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "L:\WOW\World of Warcraft\_retail_\Wow.exe">
<RenameTargetWin %2%>


//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME BOTH WOW'S.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Alt Ctrl L>
<LaunchAndRename Local WoW1>
<LaunchAndRename Local WoW2>
<LaunchAndRename Local WoW3>


//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 Local SendWinM WoW3>


//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Enter, R, X, Z, except W, A, S, D>
<SendLabel w1, w2, w3>
<Key %Trigger%>


//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL FORMATIONS BINDS.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn 8>
<SendLabel w1>
<Key F1>
<SendLabel w2>
<Key F1>
<SendLabel w3>
<Key F1>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn Space, LShift>
<SendLabel w1, w2, w3>
<Key %Trigger%>


//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
// THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>


<Hotkey ScrollLockOn Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3>
<ClickMouse %TriggerMainKey%>
<RestoreMousePos>
//-----
<UseKeyAsModifier LShift>
<Hotkey LShift Space>
But im getting this error
LShift is already a modifier.


Empty hotkeys were found.
Disregarding empty hotkey: <Hotkey LShift Space>

Wubsie
06-14-2020, 02:16 PM
Thanks for the repply.
Im not sure what do you meant, but i try to add this:

But im getting this error
LShift is already a modifier.


Empty hotkeys were found.
Disregarding empty hotkey: <Hotkey LShift Space>
The first error just says that Lshift is already a modifier key. I was under the impression that Hotkeynet did not have "default" modifier keys, but perhaps it does since there definitely isn't a double definition for Lshift to be a modifier in your config.

The second error is due to the hotkey you made on the very last line being, as HKN tells you, empty... You've defined a hotkey (not a movement key) of Lshift+Space. But that hotkey has no actions tied to it.

I would probably just try adding this to the the config you first posted:



<MovementHotkey ScrollLockOn LShift Space>
<SendLabel w1, w2, w3>
<Key Space>
can't test this currently, but I believe it should work. ( I assume all your characters have Space bound to jump/fly up)

oeg91
06-14-2020, 07:01 PM
I couldnt make it work, but i change the descent settings on wow for T and its working. Thanks for the help :D