Added keyboard and mouse message support