Download
(19Kb)
Download
Updated: 12-23-06 01:47 PM
Pictures
File Info
Updated:12-23-06 01:47 PM
Created:unknown
Downloads:5,245
Favorites:24
MD5:

qUserKey - Bind Keys to all Spells, abilities, items  Popular! (More than 5000 hits)

Version: 1.6
by: quel [More]

UserKey
v1.0
By Quel ([email protected])

FOR USE WITH The Burning Crusade (WOW 2.0) AND LATER, ONLY. WILL NOT WORK WITH WoW patch 1.12 at all in any way shape or form. It relies on new functionality introduced in The Burning Crusade Beta.

Abstract
Begining with The Burning Crusade, the user interface may bind keys directly to spells, abilities, macros and usable inventory items; however, the game does not provide a gui for making such key assignments. UserKey scans you spellbook, your macros, your inventory (including your bank) and provides a gui for assigning keys to those actions/items.

Also includes a mini-API for other add-on authors to add their own custom bindings to buttons they've created with the new secure templates.

Usage
UserKey adds a new entry to the main game menu called "User Key Bindings" directly below the original "Key Bindings" button.Click the button and scroll through the available items. Items from the spellbook are displayed first (with tabs/schools indicated), then macros, then usable items. Then click the item you want to bind, press the key you want (including CTRL, ALT, and/or SHFT) just like the official Key Binding interface.

AddOn Authors:
To add your own buttons to the UserKey table, simply call:
UserKey_AddButton(addon, section_name, button_table);
where:
addon = "your addon name";
section_name = "My Clever Title for My buttons";
button_table = { { " name button1", "mybutton1" }, {"name button2","mybutton2"} };

This will add entries to a section titled "My Clever Title for My buttons". When you bind a eky to "name button1," UserKey will perform a SetBindingClick(key,"mybutton1"). Subsequently pressing the key will "click" your button.

If your addon fails to load, the binding will no longer be displayed.

To remove a binding button from the list dynamically, call UserKey_RemoveButton(addon, section_name, button_table).

Notes Regarding Inventory Changes
The inventory scan checks your bags anytime your inventory is updated. It also checks your bank whenever you open the bank interface. It then labels which bag/bank slot contains the item to make it a little easier to find in your bags. If you consume an item, sell an item or destroy an item, UserKey can't readily tell why the item left your inventory. So, it assumes that any items that suddenly go "missing" must have been stored in your bank slot. They will be displayed with the tag (bank?) indicating the UserKey isn't really sure where the item is. The next time you open your bank, UserKey will have access to your full inventory. Any (bank?) items that aren't truly in your bank will be removed.

Technically, UserKey could assume that any item that goes "missing" must have been sold/destroyed/lost if you don't have your bank frame open. it's a little safer, though, for serKey to assume it missed some event firing and therefore assume your item is in the bank. As soon as you open your bank again, UserKey will be able to resynch.

The "reset data" button ONLY clears the text displayed by UserKey. It does NOT undo all of your keybinds. This is primarily a debugging tool that I've left in the mod to facilitate future additions.

The "scan" button rescans your spellbook, macros and inventory. UserKey triggers off many events and should automatically detect any changes to bindable actions. If, however, you find an item doesn't automatically appear in your list, try clicking the Scan button. You can reclick scan as often as you want, it will not create duplicate entries in the display.

Change history:

1.6 Changes
- Add two columns of key bindings
- Fixes problems with SHFT/ALT/CTRL introduced it the patch
- New alignment of the columns may solve ClearFont problems (no guarantees, though)

1.5 Changes
- Permanent fix for the line 911 errors
- Fixed a conflict with LoadIt trying to place a game menu button at the location as UserKey

1.4 Changes
- fixed possible error if wearing two identical rings or weapons
- redesigned code to help track down the dreaded "line 911" errors some folks are seeing

1.2 Changes
- Added support for binding actions to mousebuttons 3 -5 (but not left/right click since the standard UI prohibits this also)
- fixed a scanning bug occuring when an item had a colon in the name
- fixed a scanning bug when duplicate items/stacks were scattered throughout the bank
- set a safety limit to prevent UserKey from entering more item binds than the maximum possible inventory size

1.1 Fixes for:
- Cancel Button errors
- Data reset warnings after Battleground deaths
- Removed some debugging messages in the chat log
- Improved the "unbind" logic when assigning a new key

1.0-20000b - No functional changes, just re-zipped the file with the \qUserKey directory path.

1.0-20000 - Original file.

Optional Files (0)


Post A Reply Comment Options
Unread 03-01-09, 06:07 AM  
servi
A Kobold Labourer

Forum posts: 0
File comments: 70
Uploads: 0
Hello quel
I want to say its rly great addon but i miss in it one feature witch would be awsome update for it, i would like it to have "profiles" cos i would like to have other keybinding for PvE healing other for PvP Healing and it would be so nice to just click one button and boom keybindings changed. The best would be icon at minimap that would allow to do that. Think about it plz
Report comment to moderator  
Reply With Quote
Unread 09-30-07, 12:47 PM  
Krellmax
A Kobold Labourer

Forum posts: 1
File comments: 10
Uploads: 0
Fix for 2.2. patch

Go to line 335 and change it to this:

elseif ( arg1 == "UNKNOWN" or arg1 == "LSHIFT" or arg1 == "LCTRL" or arg1 == "LALT" or arg1 == "RSHIFT" or arg1 == "RCTRL" or arg1 == "RALT") then

Also, if you want to get this to look right with ClearFont2, go see my post here:

http://forums.worldofwarcraft.com/th...cId=2043948174
Last edited by Krellmax : 09-30-07 at 12:49 PM.
Report comment to moderator  
Reply With Quote
Unread 03-03-07, 03:59 AM  
Rickerecke
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Binding keys to items doesn't work with german client because there is no "Use: " in the german tooltip. Maybe you could change this great addon to support other languages.

"Benutzen: " - german client
"Utiliser : " - french client (space before colon)

Unfortunately I don't know the string in other languages.
Report comment to moderator  
Reply With Quote
Unread 12-23-06, 09:14 PM  
askjosh
A Murloc Raider

Forum posts: 7
File comments: 26
Uploads: 0
Originally posted by quel
Refer to messages regarding this earlier in the thread. If you're using clearfont or any mod that overwrites my formatting definitions, there's not much I can do about it.
Any chance you could have it check for clear font addon and if its installed then have it adjust the way your addon is displayed slightly so that everything lines up?

I have used clearfont for close to a year now and I love it, its the single best addon ever because it makes the game alot easier on my eyes :-)
Report comment to moderator  
Reply With Quote
Unread 12-23-06, 01:40 PM  
quel
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 14
Uploads: 3
Originally posted by cannyar
the buttons aren't lined up exactly with the abilities and spells on my screen.
Refer to messages regarding this earlier in the thread. If you're using clearfont or any mod that overwrites my formatting definitions, there's not much I can do about it.
Report comment to moderator  
Reply With Quote
Unread 12-23-06, 09:06 AM  
cannyar
A Kobold Labourer

Forum posts: 0
File comments: 28
Uploads: 0
like the ui, much better than similiar mods (spellbinder). but the buttons aren't lined up exactly with the abilities and spells on my screen. attack is lined up fine, but 8 items later i'm one position off (the key binding is the item below it). gets worse as i scroll down. maybe my resolution (1600x1200)? not sure, but back to spellbinder i go.
Report comment to moderator  
Reply With Quote
Unread 12-23-06, 03:06 AM  
quel
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 14
Uploads: 3
bunglega - I'll have to look at the mousewheel issue you describe, I expected that to work, but maybe I didn't implement the mousewheel check properly.

As for the line 911 error, I'm still not sure what's causing it as I still can't reproduce it on my end, even with all the tips I've received here and on curse gaming. I'm posting version 1.4 tonight that slightly redesigns the code in that area. It would be great if it solves the problem, but it's more likely that you'll get a different error message that will (hopefully) give me a better clue how to reproduce this on my end.

Thanks for all the info, please let me know what you see with v1.4.

-- edit--
OK, I believe I have found the root cause using one of my alts. It's not just a matter of having duplicated stacks, it's only if the very last item in your inventory is part of duplicated stacks. Try moving any unique item to the very last bag slot, that cleared the problem up on my alt. That should keep you going until I can publish a real fix.

P.S. I have considered adding a second set of binding buttons, like the main binding interface. I want to make sure I've got the bugs squashed from the rest of the code first

Q
Last edited by quel : 12-23-06 at 07:11 AM.
Report comment to moderator  
Reply With Quote
Unread 12-14-06, 08:10 PM  
sonjin
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Hi Q ...

Love the Add-on. It works great on all my characters except my undead mage (I have 8 characters on 3 accounts). I get the Error on Line 911 every time I log in with the Mage.

Error: attempt to index field '?' (a nil value)
File: Interface\AddOns\qUserKey\qUserKey.lua
Line: 911
Count: 3
line ... if (UserKeyBindings_items[i].action == UserKeyBindings_items[j].action) then

I have logged in/out 4 times in a row, as well as disabled all other addons, and I still get the error. If you post some debugging code I'd be glad to try it for you.

Would you ever add additional key bindings like Blizzard does, so that I can bind a single action to multiple buttons? I often bind functions to both keys and mouse button combinations, so this is the only thing I miss over blizzard's binding options.

Thanks, hope this helps.
Sonjin

---------------------------------

Update: I removed all my items and started placing them back into my bag. I can consistently get the errors only when I have 2 bag slots filled with the same consumable items (2 slots with greater mana, 2 slots with conjured water, 2 slots with roasted quail). The number doesn't matter, 2 slots with a single potion each cause the error. I could not repeat the error with non-consumable items (rune of portals, etc..). Also, the error doesn't occur on my non-mage characters.

Hopefully this helps ...
Last edited by sonjin : 12-14-06 at 09:24 PM.
Report comment to moderator  
Reply With Quote
Unread 12-12-06, 07:56 AM  
bunglega
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
No problem...

It never worked ... I unzipped to the AddOn's folder, made sure it was enabled and logged in. I received this message the first time I logged in.

As soon as the servers come back on-line (maintenance day) I will perform the steps you asked for and let you know.

**** UPDATE ****

It appears to be an issue with X-Perl Unit Frames. I tried the suggestions you listed below and the problem continued. I install ag_unitframes today just to check them out and when I logged in, no error message from qUserKey and everything appears to work!

One question though, I can't seem to bind an action to a mouse / key combination. For example, I like to use ALT + MWHEELDOWN to enter stealth. It would not let me do that though so I ended up binding it to BUTTON5. I can work around it, just wasn't sure if it was supposed to be that way.
Last edited by bunglega : 12-12-06 at 07:39 PM.
Report comment to moderator  
Reply With Quote
Unread 12-11-06, 06:12 PM  
quel
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 14
Uploads: 3
Lilithshade - There is no attack logic in qUserKey. It simply builds a list of bindable items, then calls Blizzard's bind functions to map your specified key to the action. If it's overriding the "at war" setting, then it sounds like a bug in blizzard's code. I'll try some experiments and see if I can reproduce the results.

Bunglega - Someone else reported this error on Curse. I need your help debugging this as I can't recreate this error on my system. The 1.3 version on Curse is the same as 1.2. For some reason, curse ate the upload of version 1.2 and wouldn't let me attach another file until I renamed it. Ugh.

Did qUserKey ever work, even just once, on your system? Or has it given the error from the very start?

Next, I'd like you to log into your char, view the error, then log out. repeat this step 3 times in sequence. qUserKey has a mechanism to try and detect data corruption and wipe the internal saved variables after 3 failures.

If that doesn't correct the problem, would you mind turning off all other addons except qUserKey and logging in? That will tell me if this is a conflict with some other addon or not.

If you still get the error with only qUserKey enabled, I'd like you to try deleting the saved variables file for qUserkey in <wow directory>\WTF\<your account>\<your server>\<your character>\SavedVariables\qUserkey.* (don't delete anything else in that directory). You'll should exit the game completely and restart to see if this has any affect.

Thanks,

Q
Report comment to moderator  
Reply With Quote
Unread 12-11-06, 12:33 PM  
bunglega
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Error Messages

I receive this message as soon as I login to my account:

****************

rror occured in: Global
Count: 1
Message: ..\AddOns\qUserKey\qUserKey.lua line 911:
attempt to index field '?' (a nil value)
Debug:
[C]: ?
qUserKey\qUserKey.lua:911: UserKey_OnScanItems()
qUserKey\qUserKey.lua:183: UserKey_ScanData()
qUserKey\qUserKey.lua:160: UserKey_OnEvent()
[string "UserKeyFrame:OnEvent"]:1:
[string "UserKeyFrame:OnEvent"]:1

****************

When I bring up the main menu and click the qUser button, nothing happens. I have tried the version on this site as well as the 1.3b on curse-gaming.com - what am I doing wrong?

Thanks!
Report comment to moderator  
Reply With Quote
Unread 12-04-06, 12:43 PM  
Lilithshade
A Kobold Labourer

Forum posts: 1
File comments: 1
Uploads: 0
bound keys can attack npcs

Hey. I really like this mod. It's exactly what I was looking for. I tested it out today on the PTR and I bound my Arcane Shot directly from the spell book and removed it from the action bar. It works perfectly fine, but there is a bug. When I targetted an NPC in Light's Hope Chapel and fired Arcane Shot, it fired as though I was tagged "At War" with them, even though I am not. None of my other attacks which used the default action bars reacted this way so I am assuming it has something to do with the addon's binding mechanics. Please look into this. It seems a little dangerous for someone who plans on binding everything and accidently presses a button while targetting an npc. Thanks in advance.
Report comment to moderator  
Reply With Quote
Unread 11-30-06, 10:44 PM  
SaberHawke
A Fallenroot Satyr
 
SaberHawke's Avatar

Forum posts: 23
File comments: 93
Uploads: 0
Re: Re: Re: Re: Couple of issues

Originally posted by quel
Hey Sabre,

I believe I found what's going on and will be uploading a fix in a few minutes. Let me know if the new version solves the error message.

Well then, that's really out of my hands. There's not much I can do about formatting if another mod is coming along and changing font sizes after I've done the frame layout. I might be able to change the anchor points to help this, but I'm not going to work on that until after I finish another 2.0 mod I'm writing.

Q
Still can't bind/unbind mouse buttons but it doesn't error out now.

I will just use SpellBinder for now as I can't do without the larger fonts. The default font at 1900x1200 is unreadable without it.
Report comment to moderator  
Reply With Quote
Unread 11-29-06, 09:34 PM  
quel
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 14
Uploads: 3
Re: Re: Re: Couple of issues

Hey Sabre,

The problem seems to be when attempting to bind/unbind mouse buttons.


I believe I found what's going on and will be uploading a fix in a few minutes. Let me know if the new version solves the error message.

The problem with mis-alignment of the buttons to their corresponding text line is due to the addon ClearFont changing the font size slightly.
Well then, that's really out of my hands. There's not much I can do about formatting if another mod is coming along and changing font sizes after I've done the frame layout. I might be able to change the anchor points to help this, but I'm not going to work on that until after I finish another 2.0 mod I'm writing.

Q
Report comment to moderator  
Reply With Quote
Unread 11-28-06, 11:59 PM  
SaberHawke
A Fallenroot Satyr
 
SaberHawke's Avatar

Forum posts: 23
File comments: 93
Uploads: 0
Re: Re: Couple of issues

Originally posted by quel
Looks like I when I renamed a function I missed updating one of the function calls. I'll post a fix for that shortly.

edit: I take it back, I can't reproduce this error message on my system. Can you tell me which ability/item you're binding/unbinding and which key you had bound to that function? What happens if you bind a key to that function, then (without unbinding), bind that same key to a different function?

Q
The problem seems to be when attempting to bind/unbind mouse buttons. I had used another addon to bind mousebutton3 to "Reins of the Black War Tiger". I attempted to use your addon to remove that binding. I used the other addon to remove the binding and attempted to bind it back to mousebutton3 and it doesn't recognize the button press. It dosen't work with any of the mouse buttons (1-5).

The problem with mis-alignment of the buttons to their corresponding text line is due to the addon ClearFont changing the font size slightly.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: