The future of KAction

Daniel Teske teske at squorn.de
Tue Nov 15 02:45:38 GMT 2005


My memory is a little bit fuzzy, but I was involved in the implementation of the MMB and keyboard modifier support. So to add my 2cents.

> > This allows to detect RMB, Shift+LMB, Ctrl+LMB, Shift+LMB on MenuItem 
> I have considered this further: as long as the receiver is in the same thread, 
> QApplication::keyboardModifiers() and QApplication::mouseButtons() should 
> return the same values as when the action is activated, since no further 
> event processing will have been done (correct me if I'm wrong).  

If the activation was by code (and not by the user.), the keyboardModiefiers() and mouseButtons() shouldn't be relevant.
And activations by shortcuts should probably treated as having no modifier, even if one was pressed. So the action should probably emit a signal which has that information tacked on.

> As for the activation reason, the only place I can find that it is actually 
> used is:
konq needs to distinguish various combinations of MMB, Ctrl, Shift on various things (bookmarks toolbar/menu, back, forward, home). (Bonus points to anyone who can tell me how many different key/mouse combinations are distinguished.)

daniel




More information about the kde-core-devel mailing list