Global shortcuts should not send keyrelease event to app with focus (Re: KStandardAction::rename ?)

René J.V. Bertin rjvbertin at gmail.com
Sun Feb 19 17:23:02 UTC 2017


On Sunday February 19 2017 18:03:05 David Faure wrote:

> Standard actions and shortcuts have nothing to do with global shortcuts, I 
> think you're confusing the two.

Nope :)
> 
> Standard actions and shortcuts are like Ctrl+C, Ctrl+V (and indeed F2 for 
> rename), they are handled in-process by each application who wants to support 
> them. So it's quite logical that you won't find that in kglobalaccel,
> which is about workspace-wide global shortcuts like Alt+F2 (krunner),
> mixer volume up/down, etc.

You can define application-specific shortcuts in kglobalaccel, and its name indicates (to me at least) that this is exactly what that framework + daemon is about. Not sure how, but apparently the kglobalaccel daemon has the possibility to send specific applications specific events in reaction to customisable keystrokes.
KWin shortcuts are defined through the Shortcuts KCM ("Shortcuts and Gestures" in KDE4), not in KWin's own configuration dialogs.

> > Any shortcut for raising or lowering windows would be a good example too.
> 
> This probably has focus-related side effects, making this more complex.

Possible, but in practice focus doesn't change when you raise (duh ;)) or even lower a window with the keyboard, i.e. without generating mouse events.

> The fact that this window does not
> receive a keypress but receives a keyrelease for that key seems very
> inconsistent and unexpected to me.

To me too. If it's supposed to receive a keyrelease it should also receive the corresponding keypress, I'd say. I can only see focus changes as a justification for receiving a keyrelease without keypress or vice-versa.

R


More information about the Kde-frameworks-devel mailing list