Fixed keyPressed issue with Jeff's help