"Ben M." <maresr12t...@gmail.com> writes: > According to > http://doc.trolltech.com/3.3/qkeyevent.html#details > "Key events for multi media keys are ignored by default. You should > call QKeyEvent::accept() if your widget handles those events."
Very good detective work (although you should point to the 4.2 documentation, which is basically the same). > Currently, LyX calls accept() for everything, so multimedia keys are > undesirably blocked: > http://www.lyx.org/trac/ticket/6043 > My patch > http://www.lyx.org/trac/attachment/ticket/6043/multimediakeys.diff > simply changes "void processKeySym" to "bool processKeySym", and > returns false whenever it encounters an "Unknown function". That > return value then determines whether to call accept() or ignore(). What I would like (but I have not understood yet where to do that) is to use reject() only when we have an unknown keysym. We should not reject events because M-C-j is not bound currently, but because a given multimedia key is not handled by LyX (i.e. for example because qkey_to_string returns an empty string). Do you see what I mean? Could you have a go at it? JMarc