Type a special character or letter with an accent

Press and hold a letter key on the keyboard and, on the trackpad, slide your finger left or right until the special character or the letter with an accent appears.