I'm using a computer running Ubuntu and I'm connected through ssh to a RedHat machine where I use Matlab in command line mode (matlab -nodesktop). Matlab version is
My problem occurs when I type any key which produces "special characters", such as ñ, á, etc...
I managed to solve this, by setting this alias to matlab:
alias mat 'xmodmap -e "keycode 47 = Escape" -e "keycode 34 = Escape"; matlab -nodesktop; setxkbmap;'
...but this solution makes these changes globally, and I cannot type those characters (as long as matlab is running) in any other application including terminals, browsers, etc.
I read that this is a problem for this version of Matlab, but in that case, a new question arises: if I use xmodmap in a terminal (xterm) connected to other machine, why are those changes spread globally to my session?