Added keyboard and mouse input functionality