fixed keyboard and mouse hook events