nyorain / swa

[WIP] Simple window abstraction
6 stars 2 forks source link

How to get key release input event? #6

Closed Unesty closed 2 years ago

Unesty commented 2 years ago

I am trying to get input from another process and calling swa_display_key_pressed periodically seem like worse solution than changing value on press and release in key callback.

nyorain commented 2 years ago

Set swa_window_settings.listener to an object with the swa_window_listener.key callback set to a function of yours when you create the window. The function will be called on key release.