Optimize the calls to updateGL() when adding multiple keys at once.