[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Alt vs Meta key in Emacs



Thanks to Charlie and Vincent for their responses, I got my keyboard
properly configured. I did, however, do so in a slightly different manner.

The usual method fo swapping Caps Lock and Control keys
does just that, it swaps the keys; so, if you run xmodmap on the
file twice they are back to how they started. That seems silly to me
(though it hasn't been an issue except during testing) so I rewrote
the .Xmodmap file so that it doesn't do that. Following what I currently
have

Joe Riel

! The commands in this file (.Xmodmap) are executed by
!
!   xmodmap .Xmodmap
!
! This should be automatically executed when
! /etc/X11/Xsession.d/40custom_load-xmodmap
! is sourced by /etc/X11/Xsession.
!
! Swap Caps_Lock and Control_L (the left control key)
!
! remove Lock = Caps_Lock
! remove Control = Control_L
! keysym Control_L = Caps_Lock
! keysym Caps_Lock = Control_L
! add Lock = Caps_Lock
! add Control = Control_L
!
! Rather than swap the Caps_Lock and Control keys, assign them directly.
! This prevents successive merges from swapping the keys back.
! Also, change the Alt keys to Meta keys
! and the Window keys to Alt keys.
! It may be better to have the Window keys as Meta keys, 
! however, I'm stuck with that layout on NTemacs.

clear Lock
clear Control
clear mod1
clear mod4

keycode  66 = Control_L
keycode  37 = Caps_Lock
keycode 115 = Alt_L
keycode  64 = Meta_L
keycode 113 = Meta_R
keycode 116 = Alt_R
keycode 109 = Control_R

add Lock = Caps_Lock
add Control = Control_L Control_R
add mod1 = Meta_L Meta_R
add mod4 = Alt_L Alt_R




Reply to: