PDA

View Full Version : [HotKeyNet] Key Modifiers?



xRavyn
10-14-2011, 01:39 PM
Hello all!

I'm posting here for a few reasons, chief among them being that I'm entirely new to multiboxing. In addition, the HotKeyNet forums seem to be dead, so I figured here would be the best place to ask my question. :)

I'm having a slight problem; all my number keys are being sent to both wow1 and wow2, however when I hold a modifier key, like Shift, it still activates the skill in that slot on my wow1, even though the game's hotkeys are not set to do such. I presume there's something I need to add in the script I'm using, which is the starter WoW script from HKN's site.

I've tried implementing a few commands in various places but as I'm not the most code-savvy person out there, I can't seem to identify the problem.

Any help is greatly appreciated!

-Ravyn

Khatovar
10-14-2011, 01:45 PM
Use a keylist and make sure "Clear Modifiers Before Executing a Hotkey" is unchecked in the settings

http://www.dual-boxing.com/wiki/index.php/HotKeyNet_A_New_Boxer's_Guide#Refining_your_script


<KeyList MyList 0-9, Numpad0-Numpad9, Divide, Multiply, NumpadMinus, Tab, NumpadPlus, Backspace, Insert, Home, PgUp, PgDn, Delete, F1-F12, Esc, Oem1-Oem7, except OEM2, w, a, s, d, q, e, x>
<Keylist All 0-9, A-Z, Space, Esc, Enter, Tab, Oem1-Oem7>

<Hotkey CapsLockOff MyList; CapsLockoff Shift MyList; CapsLockOff Alt MyList; CapsLockOff Ctrl MyList>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey CapsLockOn All>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

xRavyn
10-14-2011, 05:15 PM
I've substituted the code you gave me, but perhaps in the wrong place? I'm still having the same problem. And I have indeed unchecked the option you suggested. Here's the script I'm running, in its entirety.


//================================================== ==============
// 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
//================================================== ==============

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

//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "c:\users\ravyn\desktop\World of Warcraft\WoW.exe">
<RenameTargetWin %2%>

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

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

//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList WoW 0-9, Numpad0-Numpad9, Divide, Multiply, NumpadMinus, Tab, NumpadPlus, Backspace, Insert, Home, PgUp, PgDn, Delete, F1-F12, Esc, Oem1-Oem7, except OEM2, w, a, s, d, q, e, x>
<Keylist All 0-9, A-Z, Space, Esc, Enter, Tab, Oem1-Oem7>

<Hotkey ScrollLockOff MyList; CapsLockoff Shift MyList; CapsLockOff Alt MyList; CapsLockOff Ctrl MyList>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
<Hotkey ScrollLockOn All>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn up, down, left, right>
<SendLabel w1, w2>
<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>
<ClickMouse %TriggerMainKey%>]

flux1
10-14-2011, 08:22 PM
One thing I see offhand with your script is using <SendLabel w1, w2, w3, w4, w5> in 2 spots when you only have 2 wow windows open. w1 - w5 is used when you have 5 wows open. Try changing them both to <SendLabel w1, w2> and see if that helps.

Edit: To add, I see you have two key lists, All and WoW, but in the first hotkey command you are using MyList. I assume the MyList part should be the WoW key list. So try changing <KeyList WoW 0-9 ... to <KeyList MyList 0-9... ect

I'm far from an expert on HKN, but those are what stand out to me. Are you trying to make it so when you hold Shift it only does an action in the second wow window?

xRavyn
10-14-2011, 10:34 PM
I've fixed those... still no luck. :/

And yes, in a sense. I've got two Druids, one feral and one restoration. I'm trying to make it so that 0-9, - and = only trigger the feral's abilities ( in the wow1 window ) and ALT- or Shift-0 through 9, - and = only trigger the resto's abilities.

flux1
10-15-2011, 12:29 AM
Edit: I realized shortly after I posted that the code mod I made would actually send Shift + Whatever Key to WoW2 instead of the key itself as you wanted. You'll have to adapt the key lists and modifiers from above to get them working that way. I'll let someone more competent look over things and give you some better advice :P

All of my keys I've done to send to specific windows I coded each single key like <Hotkey Shift ScrollLockOn 1> <SendLabel w1> <Key 1> There are ways to do it without having to do each one manually, its just above my scripting abilities. If it might be of any use I'll leave what I came up with below.



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

<Hotkey ScrollLockOn 0-9, Plus, Minus>
<SendLabel w1>
<Key %Trigger%>

<Hotkey Shift ScrollLockOn Plus, Minus, 0-9>
<SendLabel w2>
<Key %Trigger%>

Freddie
10-15-2011, 01:23 AM
In addition, the HotKeyNet forums seem to be dead...
The HotkeyNet forum is not dead. I read everything posted there and usually (not always) give user support.

Khatovar
10-15-2011, 02:01 AM
Adjust the script to use ScrollLock, not CapsLock.


<Hotkey ScrollLockOff MyList; CapsLockoff Shift MyList; CapsLockOff Alt MyList; CapsLockOff Ctrl MyList>

You can also check the output in the HotKeyNet window to see what's happening when you press the various keys.

Bettysue
10-15-2011, 05:26 AM
//================================================== ==============
// 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
//================================================== ==============

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

//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "c:\users\ravyn\desktop\World of Warcraft\WoW.exe">
<RenameTargetWin %2%>

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

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

//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<KeyList MyList 0-9, Numpad0-Numpad9, Divide, Multiply, NumpadMinus, Tab, NumpadPlus, Backspace, Insert, Home, PgUp, PgDn, Delete, F1-F12, Esc, Oem1-Oem7, except OEM2, w, a, s, d, q, e, x>
<Keylist All 0-9, A-Z, Space, Esc, Enter, Tab, Oem1-Oem7>

<Hotkey ScrollLockOff MyList; CapsLockoff Shift MyList; CapsLockOff Alt MyList; CapsLockOff Ctrl MyList>
<SendLabel w1, w2>
<Key %Trigger%>
<Hotkey ScrollLockOn All>
<SendLabel w1, w2>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn up, down, left, right>
<SendLabel w1, w2>
<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>
<ClickMouse %TriggerMainKey%>

You have to make sure you don't try to send to undefined labels. You can define them and not load a window which will create a short error on every hotkey press, but you can not try to send to an undefined label. If you look on HKN below the actions window there is a button labelled "show loaded hotkeys," had you clicked on this during testing you would have seen only 16 keys from your original code were loading and the rest were resulting in an error.

It helps to simplify your code in order to troubleshoot as well.

If you still have trouble with the code I posted above it is likely a setting in WoW. As all of the keys you have defined are outputting as they should.

Freddie
10-15-2011, 05:33 AM
If you look on HKN below the actions window there is a button labelled "show loaded hotkeys," had you clicked on this during testing you would have seen only 16 keys from your original code were loading and the rest were resulting in an error.

It helps to simplify your code in order to troubleshoot as well.
Excellent advice.

xRavyn
10-15-2011, 04:13 PM
I'm now running the script Bettysue posted, and still having the same problem; Shift does not seem to modify the keys being sent to the first/active window. It will modify them to the second window, so that the second character only uses their abilities when shift is held ( which is how I have WoW's keybindings set ), but even with that key held down, the first/active window still treats the numbers as if there is no shift key held.

And, I apologize for my newbishness. :(

Freddie
10-16-2011, 12:23 AM
Do you always have the same window (that copy of WoW) in the foreground?

Bettysue
10-16-2011, 12:52 AM
Alright let's try to break the problem down. What are you pressing on the keyboard and what are you expecting to happen on each WoW.
For instance I am pressing "1" and expect to see "shift 1" on WoW1 and WoW2.


If you are pressing shift 1 and want to see it broadcast to each wow you need to make sure your keybinding for that particular actionbar are set to "shift 1."

Or you could the macro on the particular key.
For example, Set the keybinding for the first action button to "1" (above the letter Q)
Then make a macro like
/cast ability; [mod:shift] otherabilityMake sure you have unbound all of the modifier+key combos in the keybinding menu. The easiest way to be sure you have done this is pick the key you want and bind it to an action, this will clear it from all other spots it may have been bound then unbind the key, and set it to the desired keybinding.

341

another option: You could also add "shift" "ctrl" and "alt" to your keylist.

Another thing to be aware of is use of the numberpad and shift. Quite a few of the standard keyboards on the market already have key assignments for shift numberpad0-9. For example shift numpad0 sends the insert ket to WoW.

Hopefully, we can get you on the right track pretty quickly, just let me know if this helps or not, and answer the question in the first line if nothing works. What we can do from there is write a single key script and make that work before we add a bunch of other keys.

Freddie
10-16-2011, 04:45 AM
Another thing to be aware of is use of the numberpad and shift. Quite a few of the standard keyboards on the market already have key assignments for shift numberpad0-9. For example shift numpad0 sends the insert ket to WoW.
You're doing a great job with xRayvn's problem so I'll stay out of it.

Warning: digression ahead :)

About the number pad keys, this is not a matter of key assignment. What you are seeing here is that when Shift is down, NumLock's effect on the number pad is disabled.. This is done by the system software. This is standard behavior on PCs because IBM designed the original IBM PC that way.

As an example, here's how the number pad Zero key works:

1. When NumLock is off, the key is an Insert key.
2. When NumLock on and Shift is up, the key is a Zero key.
3. When NumLock is on and Shift is down, the key is an Insert key.

The third point often surprises people. The shift key temporarily turns off NumLock. That's part of IBM's design from 1981.

Here's an article about this feature by somebody who claims he helped design it: Use Shift to Disable Numlock (http://www.techweb.com/news/231400193/use-91-shift-93-to-disable-numlock-during-data-entry.html)

Just in case anybody here finds this interesting (for some strange reason, I do), here's the relevant code from the BIOS of the original IBM PC.

The point being, this is built into the computer, not the keyboard.

I highlighted the part where Shift cancels NumLock.

http://hotkeynet.com/art/ibm-pc-keyboard-bios.gif

Bettysue
10-16-2011, 06:41 PM
Hey Freddie thanks for the info. I know a few of the stranger programmable keyboards have remapped the functionality of the numpad, basically making the numbers the same as the numbers above the letter keys. My G15 does this but it seems not all of them do...so either I changed something somewhere or they have a couple different versions of the same keyboard. Anywho that's why i thought it was worth mentioning the the numberpad+shift quirks.