How to separate alt and meta keys from emacs

I would like to map the PgUp key on my keyboard to the Alt modifier to create an A- key sequence in Emacs so that I can map it to a whole set of key bindings.

I was looking at the mappigs keyboard and currently my left Alt key works like Meta_L and Alt_L . This is the corresponding output of xmodmap -pke :

 keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L 

I'm not sure how to get emacs to fully handle Alt and Meta ,

I looked at x-alt-keysym and it is nil

 Which keys Emacs uses for the alt modifier. This should be one of the symbols `alt', `hyper', `meta', `super'. For example, `alt' means use the Alt_L and Alt_R keysyms. The default is nil, which is the same as `alt'. 

The same goes for x-meta-keysym as well as nil :

 Which keys Emacs uses for the meta modifier. This should be one of the symbols `alt', `hyper', `meta', `super'. For example, `meta' means use the Meta_L and Meta_R keysyms. The default is nil, which is the same as `meta'. 

It follows that Alt_L should fire alt , however, it always launches meta , as shown in M- in the minibar

+2
source share
1 answer

Emacs distinguishes between Alt and Meta .

In your case, your current combined Alt / Meta is either displayed as Alt or as Meta . If there is no Meta key, Emacs automatically treats the Alt key as Meta . This way your combined Alt / Meta will behave like Meta in Emacs.

But if you install your modifiers with separate keys for Alt and Meta , Emacs will easily distinguish between them.

0
source

All Articles