Error correction for enterPressed and escapePressed in MButton.