<p>After creating a translucent window (<a href="http://stormsilver.net/itunescheck/browser/tags/0.91/TransparentWindow.m?rev=25" rel="noreferrer">based on example code by Matt Gemmell</a>) I want to get keyboard events in this window.  It seems that there are only keyboard events when my application is the active application while I want keyboard events even when my application isn't active but the window is visible.</p>

<p>Basically I want behavior like that provided by the Quicksilver application (by blacktree).</p>

<p>Does anybody have any hints on how to do this?</p>

There are two options:
Use
```
GetEventMonitorTarget()
```
with a tacked-on Carbon run loop to grab keyboard events. Sample code is available on
this page
at CocoaDev.
Register an event trap with
```
CGEventTapCreate
```
. Sample code can be found in
this thread
from the Apple developer mailing list.
Edit:
Note that these methods only work if you check off “Enable access for assistive devices” in the Universal Access preference pane.