To replicate disabling modifyOtherKeys:
1) put the following into $HOME/test-dir/init.el
------
;; Dirty hack to not use xterm modifyOtherKeys feature
(defun my-disable-xterm--init-modify-other-keys (orig-fun &rest args))
(advice-add #'xterm--init-modify-other-keys :around
#'my-disable-xterm--init-modify-other-keys)
------
2) run: xterm -e emacs -nw --init-dir=$HOME/test-dir
3) in say *scratch* check whether M-SPC works or whether it inserts ~32
(for me it works correctly)
This seems to demonstrate the out of the box behaviour being broken, but
I don't understand enough about terminals etc to know whether there is
some other factor at play.
Relevant link where this was discussed:
https://github.com/CyberShadow/term-keys/issues/14Len.