I am using emacs in Ubuntu. How can I remap META to the ALT key?
Way back when, it did seem that the META key was difficult to map to the ALT. At that time I had to use xmodmap, and these were the things I had to put in my .xmodmap file. Some variation of the following always worked (it depended on the system). My .xinitrc file would have xmodmap
read in the file.
!! Note the `!` are comment characters.
!! suggested to make Emacs work under VNC
keysym Alt_L = Meta_L
keysym Alt_R = Meta_R
!! xmodmap -e 'keysym Alt_L = Meta_L' -e 'keysym Alt_R = Meta_R'
!!
!! some environments still can't handle alt key properly
!! add this:
!!
clear Mod1
add Mod1 = Meta_L Meta_R
!! or
!! xmodmap -e "clear Mod1" -e "add Mod1 = Meta_L Meta_R"