Worked on the arrow key functions in editGain()