Esc key tainted by addons...
I've noticed that some of the addons I use disable my ability to use the ESC key to perform normal blizzard actions. (ie: clear target, bring up game menu)
Now my own addon is doing it and I'd like to know why. A search on the forum for 'esc key', 'escape key' and 'esc' brought up a total of 3 posts, none of which address this issue. Anyone know wtf this is all about? WB |
To start diagnosing taint issues, turn taint logging on.
/console taintLog 1 This will persist relogs/exits until you turn it off again. When you have a taint.log in World of Warcraft/Logs we'll have more data to reach a conclusion. |
Well, firstly, I am receiving no indication error for a taint, so I doubted I would get any results. This must not be a 'taint' as is defined by blizz, so perhaps i shouldve titled the post: 'Esc key broken by addons...'
Being a sport, I turned on logging anyway. Nothing logged. After this clarification, any new support would be greatly appreciated. |
Try disabling your addons by halvsies to see which is causing it?
|
All are off cept mine.
Mine is a culprit, though certainly not the only one. I want to make it stop. lol. |
It probably has something to do with my displayed frame...??
I'm not able to get the following code to work: Code:
gaFrame:SetScript("OnEscapePressed", function(self) self:Hide() end) do I need to do something obvious to get this to work right? |
Only EditBoxes have an OnEscapePressed-method.
If you want to hide your frame with ESC you have to name it (in the global namespace) and then insert into the UISpecialFrames-table. |
Take a look on these pages;
1. What script is supported by what objects: http://wowprogramming.com/docs/scripts 2. Hierarchy diagram: http://wowprogramming.com/docs/widgets_hierarchy 3. General documentation (index): http://wowprogramming.com/docs |
Code:
table.insert(UISpecialFrames, yourframehere) |
Quote:
|
Quote:
Code:
frame:EnableKeyboard(1); |
Just as enabling the mouse on a frame will cause that frame to intercept all mouse clicks (eg. you can't have a frame that only responds to the right mouse button but lets left-clicks through to whatever's behind it), enabling the keyboard on a frame will cause that frame to intercept all keyboard input. That's why pressing non-character keys like Tab has no effect when the chat edit box is open.
|
Should be able to be fixed with a call to frame:SetPropagateKeyboardInput(1) or setting the propagateKeyboardInput boolean attribute in XML. I'm not sure if it just propagates only through its parents or through all frames. I'll have to do some testing with it.
Edit1: This does indeed let keyboard events propagate into non-parent frames too. Edit2: There seems to be some restrictions, when key events are propagated, only OnKeyDown fires and only for non-modifier keys. |
Hey buddy, I had this very same issue, and on my end it seemed to be a few addons that CAUSE the issue to START, however, I was able to leave my addons alone, and solve the problem, simply by opening my spellbook, and using escape to close it, and that seemed to restore functionality to my escape key, as far as being able to open my menu, clear targets, etc etc. I am a complete idiot as far as addons go, I can tell you, I read over this post, trying to find help as far as a simple fix to my issue, and was completely frustrated that the only responses that were given, were guys who had way more experience with coding and things than I do...the responses made very little sense to me, although I could grasp as much as the idea of binding a key to have a certain action which would clear a window, which was not my problem. I don't know if the actions that helped me have the effect of, I guess, re-familiarizing the interface with what is supposed to happen when esc is pressed, or even if that is possible for an interface to "re-learn" it's core functions, but I can tell you without a doubt, I still have the issue periodically when zoning, and I solve it every time by hitting "p" to open my book, then hit escape to close it, and that restores the function of my escape key. Hope this helps you :) /shrug.
-Five |
All times are GMT -6. The time now is 06:24 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI