@Override
        public void run() 
        {
            while(true)
            {
                try 
                {
                    Thread.sleep(33);
                    if (!parent.keysPressed.isEmpty())
                    {
                        //This is to prevent the form from concurrently modifying
                        //the list while iterating through it.
                        parent.protectKeyList.acquire();
                        parent.controller.keyPressed(parent.keysPressed.iterator());
                        parent.protectKeyList.release();
                    }
                } 
                catch (InterruptedException ex) 
                {
                    Logger.getLogger(CS355Frame.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }