[Interest] Key_Cancel on Macintosh
John Weeks
john at wavemetrics.com
Tue Mar 20 18:31:46 CET 2012
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.
I expect the Objective C code will be required (groan). I wonder if anyone has already written something already that they would be willing to share. I get confused by having all those brackets in the wrong places :)
-John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120320/c0f873f4/attachment.html>
More information about the Interest
mailing list