I would like to set Alt_L + j to 'backward-char, and set Alt_R + j to 'windmove-left. Following OSX Emacs: unbind just the right alt?, I tried the following configurations. But it does not work.
(setq ns-right-alternate-modifier nil)
(global-set-key (kbd "M-j") 'backward-char) ;; it works
(global-set-key (kbd "Alt_R-j") 'windmove-left) ;; it does not work
(global-set-key (kbd "M_R-j") 'windmove-left) ;; it does not work
(global-set-key (kbd "Meta_R-j") 'windmove-left) ;; it does not work
When opening my emacs, there are errors such as error: Key sequence A l t _ R - j starts with non-prefix key A. It seems Alt_R, M_R, Meta_R are illegal. I have no idea what it should be. Any suggestion is appreciated.
My .emacs has no content except the above statements. Here is the version. GNU Emacs 23.1.1(i486-pc-linux-gnu, GTK + Version 2.20.1) of 2012-05-18 on roseapple, modified by Debian.