---
title: currentEvent
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsapplication/currentevent
---

# currentEvent

The last event object that the app retrieved from the event queue.

## Declaration

```swift
var currentEvent: NSEvent? { get }
```

## Discussion

Discussion The shared app object receives events and forwards them to the affected NSWindow objects, which then distribute them to the objects in its view hierarchy. Use this property to get the event that was last handled by the app.

## See Also

### Managing the event loop

- [nextEvent(matching:until:inMode:dequeue:)](appkit/nsapplication/nextevent(matching:until:inmode:dequeue:).md)
- [discardEvents(matching:before:)](appkit/nsapplication/discardevents(matching:before:).md)
- [isRunning](appkit/nsapplication/isrunning.md)
- [run()](appkit/nsapplication/run().md)
- [finishLaunching()](appkit/nsapplication/finishlaunching().md)
- [stop(_:)](appkit/nsapplication/stop(_:).md)
- [sendEvent(_:)](appkit/nsapplication/sendevent(_:).md)
- [postEvent(_:atStart:)](appkit/nsapplication/postevent(_:atstart:).md)
