I just installed Gedit on my Mac because it's my favorite text editor. After a while (to be exact as I wanted to comment out a line of python code) I noticed that the alt key doesn't work. I started a google search where I found a lot of websites recommending to change X11 settings or copy the Xmodmap around and other things. I tried everything but it didn't help. I still couldn't comment out that line. Another trial of google search brought me to the solution.
Right click in the edit area -> Input Methods -> Multipress
And finally I could comment out that line of code. Thanks to old Nabble.