[Interest] Key_Cancel on Macintosh

Nikos Chantziaras realnc at gmail.com
Tue Mar 20 18:53:17 CET 2012


On 20/03/12 19:31, John Weeks wrote:
>
> On 20-Mar-2012, at 10:24 AM, Konstantin Tokarev wrote:
>
>>> On Windows, I can filter keypress events looking for Qt::Key_Cancel,
>>> which is generated by pressing Ctrl+Break.The Macintosh equivalent is
>>> Cmd-period. As far as I can make out, the Cocoa system catches that
>>> key combination and sends some sort of cancel event instead of a key
>>> event.
>>> My question: is there a way to catch this in Qt on Macintosh?
>>
>> Try to catch it with event filter. If it fails you probably will need
>> to write custom ObjC code.
>
> That was fast! Thanks!
>
> In fact, my first attempt was an event filter. But on Macintosh, I get
> no key event when I press cmd-period.

Maybe this is relevant:

http://qt-project.org/doc/qt-4.8/qapplication.html#macEventFilter




More information about the Interest mailing list