addon to use space as a modifier?

87 Human Warlock
5900
Is there an addon that can allow you to use the spacebar as a modifier like shift alt or ctrl? I wanna use space + a key to cast spells, it'd be convenient since my left thumb is just sitting there already.. I've heard of a way to remap your keyboard, but I don't wanna go that far.
Reply Quote
90 Night Elf Druid
11915
You'd have to remap the keyboard to change the functionality of the spacebar. It would then cease to be the spacebar. It would function as whatever you set it to, Ctrl, Alt or Shift, for all actions in the game, not just for activating a macro.
Reply Quote
87 Human Warlock
5900
So there aren't any addons that can do this? or is it completely impossible for an addon to do that?
Reply Quote
90 Gnome Warrior
12005
It is completely impossible for an in-game addon to make the spacebar act as a modifier for macros.

It is possible for an addon to set override bindings via secure handlers to mimic using the spacebar as a modifier for key binding purposes, but it is still impossible for an in-game addon to make the spacebar recognized in a [mod] condition in a macro.
Edited by Ro on 4/18/2013 5:13 PM PDT
Reply Quote
87 Human Warlock
5900
This isn't for a macro, but for key binding. So an addon can do it for key bindings ? I'm kind of lost.
Reply Quote
90 Gnome Warrior
12005
I don't think an addon has been written to do it yet. I wrote a proof of concept a long time ago. I'll see if I get time this weekend to flesh something out to post, but no promises. The biggest hurdle beyond the technical bits is that you can't use the standard key binding interface to define these keys. The addon would have to make one on its own. The UI would be, by far, the biggest part of the project.

If anyone else reading wants to take a crack at releasing what could be the first addon of its kind, here's the basic approach to the technical bits: you would set up a SecureHandlerClickTemplate bound to the special modifier key (like "SPACE"). In the handler's click snippet, if down flag is set it does a handler:SetBinding for keys assigned to their configured action. If down flag is clear it does a handler:CearBinding. So the upshot is that holding the bound key will set a mass of override bindings for as long as the key is down and restore them when released.

The tricky bit is setting up a configuration that can work in the secure environment and having undefined keys use their old value. One approach is an initial handler:Execute snippet that defines a table of keys that can be modified. Can do CTRL- ALT- SHIFT- combos if you really want too since the binding isn't run until a non-modifier is hit. Then the configuration UI can assign attributes like handler:SetAttribute("bindingS","JUMP"). Then the click handler can do go down the table to see if any bindings are defined: if self:GetAttribute("binding"..key)) then handler:SetBinding(false,key,self:GetAttribute("binding"..key)) end. So it will leave unmodified keys alone. Maybe numeric attributes or frame references instead of attributes to minimize string concatenation.
Reply Quote
90 Orc Monk
10385
I wonder if with the current issues with Secure Handlers if this would get broken occaisionally like Raid Frames etc...
Reply Quote
90 Gnome Warrior
12005
I threw something together but since it's over 200 lines I tossed it on wowinterface:
http://www.wowinterface.com/downloads/info22266-ModifiedModifierModMod.html

Two important things to note that I forgot to mention earlier in the thread:
- If you turn space into a modifier, you can't continue to use it to jump. (but you can bind space+tab to jump or whatever)
- If your bar addon doesn't use the default key binding interface, the author of that bar addon would need to implement their own custom modifier.

I wonder if with the current issues with Secure Handlers if this would get broken occaisionally like Raid Frames etc...

Actually, stuff inside an addon's secure environment is very taint-resistant. It will never create a single byte of taint.log. It's when stuff outside the secure environment touches stuff inappropriately and things get tainted. In this addon's case, the binding override bit is taint-proof. The default key binding frame was touched by this addon so it itself is tainted but since you never bind keys in combat, it "shouldn't" be an issue.
Edited by Ro on 4/20/2013 9:13 PM PDT
Reply Quote
90 Draenei Shaman
13455
It's when stuff outside the secure environment touches stuff inappropriately and things get tainted.


Sounds ... naughty.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]