##### Views

- Page
- Discussion
- View source
- History

# love.event.poll

Returns an iterator for messages in the event queue.

## Function

### Synopsis

i = love.event.poll( )

### Arguments

None.

### Returns

`function i`
  Iterator function usable in a for loop.

## Examples

### Checking for events in 0.8.0

for e, a, b, c, d in love.event.poll() do
if e == "quit" then
-- Quit!
end
end

### Checking for events in 0.7.2

for e, a, b, c in love.event.poll() do
if e == "q" then
-- Quit!
end
end

## See Also

- love.event
- love.event.wait

## Other Languages

Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – Tiếng Việt – 한국어
More info

Retrieved from "https://www.love2d.org/wiki/love.event.poll"
Categories: Templates | Functions

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties