From: ewerlid@ida.docs.uu.se (Ove Ewerlid)
Newsgroups: comp.os.linux
Subject: A swedish Xmodmap
Date: 7 Jan 93 03:19:36 GMT
Organization: University of Uppsala, Sweden
NNTP-Posting-Host: ida.csd.uu.se


Here is an Xmodmap for Swedish keyboards.
Check out the extra customizations at the end
and comment out those that you don't want.
(This is a modification of Xmodmap.no.)

To use it issue the command:

	xmodmap Xmodmap.sw

You'll need an 8-bit-clean editor to see the
8-bit characters (I'm using epoch (epoch42.taz), it's neat.).
(Haven't found any 8-bit patched plain GNU emacs binary.)

If you are using LaTeX you'll need to \input a file
that rebinds the 8-bit characters properly.

If you want to see the full iso-latin-1 font you can
issue the command:

	xfd -fn 9x15

when you are running X11 (provided you have the font.).

Beware of putting 8-bit chars in filenames unless you have
8-bit clean file utilities.

	------ + ------

! Xmodmap.sw: Swedish keyboard setup for IBM PC

! AltGr selects the modifier map 1 (mod1)
! Alt   prepends an ESC to each pressed key (two characters sent)

clear mod1
keysym Alt_R = Mode_switch
add mod1 = Alt_L
add mod5 = Mode_switch

! Keysyms suitable for a swedish keyboard

keycode   8 =
keycode   9 = Escape
keycode  10 = 1			exclam
keycode  11 = 2			quotedbl	at
keycode  12 = 3			numbersign	sterling
keycode  13 = 4			dollar		dollar
keycode  14 = 5			percent
keycode  15 = 6			ampersand
keycode  16 = 7			slash		braceleft
keycode  17 = 8			parenleft	bracketleft
keycode  18 = 9			parenright	bracketright
keycode  19 = 0			equal		braceright
keycode  20 = plus		question	backslash
keycode  21 = apostrophe	grave
keycode  22 = BackSpace
keycode  23 = Tab
keycode  24 = Q
keycode  25 = W
keycode  26 = E
keycode  27 = R
keycode  28 = T
keycode  29 = Y
keycode  30 = U
keycode  31 = I
keycode  32 = O
keycode  33 = P
keycode  34 = aring		Aring
keycode  35 = asciitilde	asciicircum	asciitilde
keycode  36 = Return
keycode  37 = Control_L
keycode  38 = A
keycode  39 = S
keycode  40 = D
keycode  41 = F
keycode  42 = G
keycode  43 = H
keycode  44 = J
keycode  45 = K
keycode  46 = L
keycode  47 = odiaeresis	Odiaeresis
keycode  48 = adiaeresis	Adiaeresis
keycode  49 = section		onehalf
keycode  50 = Shift_L
keycode  51 = apostrophe	asterisk
keycode  52 = Z
keycode  53 = X
keycode  54 = C
keycode  55 = V
keycode  56 = B
keycode  57 = N
keycode  58 = M
keycode  59 = comma		semicolon
keycode  60 = period		colon
keycode  61 = minus		underscore
keycode  62 = Shift_R
keycode  63 = KP_Multiply
keycode  64 = Alt_L
keycode  65 = space
keycode  66 = Caps_Lock
keycode  67 = F1
keycode  68 = F2
keycode  69 = F3
keycode  70 = F4
keycode  71 = F5
keycode  72 = F6
keycode  73 = F7
keycode  74 = F8
keycode  75 = F9
keycode  76 = F10
keycode  77 = Num_Lock
keycode  78 = Scroll_Lock
keycode  79 = Home	KP_7	KP_7	Home
keycode  80 = Up	KP_8	KP_8	Up
keycode  81 = Prior	KP_9	KP_9	Prior
keycode  82 = KP_Subtract
keycode  83 = Left	KP_4	KP_4	Left
keycode  84 = Begin	KP_5	KP_5	Begin
keycode  85 = Right	KP_6	KP_6	Right
keycode  86 = KP_Add
keycode  87 = End	KP_1	KP_1	End
keycode  88 = Down	KP_2	KP_2	Down
keycode  89 = Next	KP_3	KP_3	Next
keycode  90 = Insert	KP_0	KP_0	Insert
keycode  91 = Delete	KP_Decimal KP_Decimal Delete
keycode  92 = 0x1007ff00
keycode  93 =
keycode  94 = less	greater	bar
keycode  95 = F11
keycode  96 = F12
keycode  97 = Home
keycode  98 = Up
keycode  99 = Prior
keycode 100 = Left
keycode 101 = Begin
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = KP_Enter
keycode 109 = Control_R
keycode 110 = Pause
keycode 111 = Print
keycode 112 = KP_Divide
keycode 113 = Alt_R	Mode_switch
keycode 114 = Break

! Override some of the above settings to make the
! "feel" of the keyboard more comfortable (IMHO)

! Set Control_L to Caps_Lock
! Set Caps_Lock to Control_L

keycode 37 = Caps_Lock
keycode 66 = Control_L
clear Lock
clear Control
add Lock = Caps_Lock
add Control = Control_L Control_R

! Set backspace (left arrow) to delete
! (Backspace is still available via C-h.)

keycode 22 = Delete

! Move Escape "closer" to the left hand

keycode 9 = section onehalf
keycode 49 = Escape