---
title: windowNumber
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsevent/windownumber
---

# windowNumber

The identifier for the window device associated with the event.

## Declaration

```swift
var windowNumber: Int { get }
```

## Discussion

Discussion Periodic events do not have a window. The result of accessing this property on a periodic event is undefined.

## See Also

### Getting general event information

- [locationInWindow](appkit/nsevent/locationinwindow.md)
- [timestamp](appkit/nsevent/timestamp.md)
- [window](appkit/nsevent/window.md)
- [eventRef](appkit/nsevent/eventref.md)
- [cgEvent](appkit/nsevent/cgevent.md)
- [foreverDuration](appkit/nsevent/foreverduration.md)
