My keyboard does not have an escape key, and remapping it through my computer/keyboard settings is turning out to be much harder than I previously thought. Also, Ctrl+[ does not work for me.

Therefore, I'm wondering if it's possible to change the definition of the key to enter special characters could be mapped to a different key. Is this possible?

I checked Edit->Preferences but I couldn't find anything useful.

  • $\begingroup$ Also, in some Apple Macbook Pro models, there is no escape key. $\endgroup$ – QuantumDot Jun 14 '18 at 22:29
  • $\begingroup$ @QuantumDot As well as this prototype... $\endgroup$ – Henrik Schumacher Jun 14 '18 at 22:47

Quit Mathematica. Look up the file KeyEventTranslations.tr in your installation directory. Open it in any editor (but better not in the Mathematica editor). Find the line

Item[KeyEvent["Escape"], "ShortNameDelimiter"]

and change KeyEvent["Escape"] to whatever you want, e.g. to KeyEvent["a", Modifiers -> {Shift, Control}] for a+Shift+Ctrl. Changes take effect when you start Mathematica FrontEnd the next time.

Search also for "KeyEventTranslations.tr" on this site for many other useful ideas.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.