Update the event manager class: add capture event filters, fix timing issues and remove blocking loops.
Updated the event manager class, adding capture filters and fixing some issues.
Also removed some loops that waited for all keys to be released (which could cause consoles with broken or stuck buttons to get into an infinite loop).