Fixing ø is undefined in xterm

· [Daniel Baker]

Today I had one of the most annoying bugs running emacs in tmux. First off was that fact that backspace was always opening the help dialog in emacs. Next was everytime I hit ALT + x I was getting ø is undefined. Googling around I was searching for things like MOD x not working in emacs and coming up way short. Nothing seemed like it was even related to what I wanted to do. Besides, most of the solutions that came up were already settings in my .tmux.conf or I didn’t want to start sprinklink ke modifiers in my emacs conf.

At a loss I stumbled upon one comment that triggered a new train of thought. What if it wasn’t tmux and emacs acting up, but the actual terminal. Within minutes I was on the Arch linux wiki reading through the Xterm docs and what do you know, there it was. Make 'Alt' key behave as on other terminal emulators. From here on out the solution was simple. Simply update my .Xresources with 3 lines and everything worked as it should.

If you’re facing the same issue all you need is these 3 lines in your .Xresoures file:

*.vt100.metaSendsEscape: true
*.vt100.backarrowKey: false
*.ttyModes: erase ^?

Hope this helps!