I'm not sure if this is possible, but I currently use Grid with mouseover macros. I would love to have the option, however, of a Clique-like mod that would allow me to bind keys to mouseover healing over *certain* frames.. say, Grid, while allowing you to default back to Blizzard keybindings when not mouseovering Grid. so I could set W to Binding Heal mouseover over Grid frames, but also set it to casting Devouring Plague otherwise.
Clique allows you to assign click actions that interact with certain frames separately from the Blizzard click functions, so I was wondering if it's possible to do that with keys. It would be especially helpful for saving keybinds when dpsing and having to throw an emergency heal (I dislike clique for this because i prefer not having to fiddle with modifier-clicks, and otherwise, there aren't very many "click"s that you can do..) or while shadow pvp arena when you have to be versatile and keybinds are at a premium.
Since you can't modify bindings while in combat, and there are no macro conditionals to identify whether your cursor is over a unit or a unit frame, what you're asking for is not possible.
When you bind, say, button4 on your mouse to Binding Heal in Clique, you're not actually binding "cast Flash Heal on my mouseover target" to button4. You're adding a secure attribute to your unit frames that tells WoW to "cast Binding Heal on this frame's unit" when you click on the frame with button4. It's the same way that the default "target this frame's unit" is assigned to button1 (left click). While "this frame's unit" may be the same unit as "my mouseover target" at the moment you're clicking button4 on a frame, they aren't actually the same thing, and WoW handles them in very different ways.
Unit frames can be told to perform specific actions on different types of clicks, but they do not support non-mouse buttons, since pressing "W" while the cursor is over the frame isn't actually handled by the frame. Even if you could make a unit frame respond to non-mouse keypresses, it would effectively prevent you from using your keyboard, just as while the chat input box is keyboard-enabled (eg. focused) none of your keybinds do anything. There's also no way to have multiple frames keyboard-enabled at the same time.
Having said all that, though, there's no reason you couldn't set button4 to Binding Heal in Clique, and also bind button4 to Devouring Plague through some other means; then, if the cursor is over a unit frame when you click button4, the unit frame will intercept the click and cast Binding Heal on its unit, but otherwise the click will go to the standard keybind system and you'll cast Devouring Plague.
Actually Phanx, I think we could use SecureHandlers to override bindings on mouse hovering.
Something along this:
local handler = CreateFrame("Frame", nil, UIParent, "SecureHandlerBaseTemplate")
keys = table.new()
-- Define the keys you want to override
local frame = ...
for i, key in pairs(keys) do
-- Translates "pressing key" to "using key button on frame"
self:SetBindingClick(true, key, frame, key)
handler:SetAttribute("ClearBindings", [[ self:ClearBindings() ]])
for unitFrame in pairs(framesToHook) do
handler:WrapScript(unitFrame, "OnEnter", [[ control:RunAttribute("SetBindings", self) ]])
handler:WrapScript(unitFrame, "OnLeave", [[ control:RunAttribute("ClearBidings") ]])
The hard part is then to let Clique handle the key buttons.
And IIRC, Click2cast also defines funny keyboard bindings, but I'm not sure how they works.
Clique can also bind the same key/mouse combo at least twice: once for friendly unit frames, and once for hostile using its pulldown menu. For example, you could have button4 cast Binding Heal on a friendly, and button4 could also cast Devouring Plague on a hostile.