Comment 56 for bug 950160

Revision history for this message
Hsin-Yi, Chen (hychen) (ossug-hychen) wrote : Re: Unity blocks other programs from binding globally to Super+* or Alt+* (* = any key)

for detailed the term Unity in Summary section means unityshell
component in unity.

1. BIOS/HW sends Super+P scan code when user press function key in
laptop and then convert to X key event
    by kernel and X server to the Compiz.
2. unityshell is a Compiz plugin and defines a lot of action callbacks
for specified keys.
    so Compiz will pass the X key event to all plugins for trigger the
key event handling (
    PrivateScreen::handleActionEvent ->
PrivateScreen::triggerKeyPressBindings in $compiz_src/src/event.cpp)
3. if the keycode and modifier defines in the Action is as the same as
the keycode and modifier in X event, the Action callback will be
executed, then Compiz thinks this X event is handled. for example,
action callback for Super key is to show Unity Launcher.
4. if Compiz thinks this X event is handled it will stop to handling X
event if private screen does not grab any devices. if this X event is
not handled , Compiz then thinks it maight be Focus-In, Focus-Out, etc,
and continue trigger the related handling function.

so far, there is an question comes up in my mind, why the action callback of Super key which is defined in unitshell
will be triggered when user press Super+p and this symptom should not be happened. (the return value is True of PrivateScreen::triggerKeyPressBindings or PrivateScreen::triggerKeyReleaseBindings in $compiz_src/event.cpp)