OSX上でのxtermが、日本語キーボードを誤認する問題の対処方法



**既存のkeymapを出力します**

```
xmodmap -pke > ~/.Xmodmap
```

**~/.Xmodmapを下記のように書き換えます**
全部、上書きでもOK


```~/.Xmodmap

keycode   8 = a A aring Aring
keycode   9 = s S ssharp Iacute
keycode  10 = d D partialderivative Icircumflex
keycode  11 = f F function Idiaeresis
keycode  12 = h H abovedot Oacute
keycode  13 = g G copyright doubleacute
keycode  14 = z Z Greek_OMEGA cedilla
keycode  15 = x X approxeq ogonek
keycode  16 = c C ccedilla Ccedilla
keycode  17 = v V radical U25CA
keycode  18 = section plusminus section plusminus
keycode  19 = b B integral idotless
keycode  20 = q Q oe OE
keycode  21 = w W U2211 doublelowquotemark
keycode  22 = e E dead_acute acute
keycode  23 = r R registered U2030
keycode  24 = y Y yen Aacute
keycode  25 = t T dagger caron
keycode  26 = 1 exclam exclamdown U2044
keycode 27 = 2 quotedbl trademark EuroSign
keycode  28 = 3 numbersign sterling U2039
keycode  29 = 4 dollar cent U203A
keycode 30 = 6 ampersand section UFB02
keycode  31 = 5 percent infinity UFB01
keycode 32 = asciicircum asciitilde notequal plusminus
keycode 33 = 9 parenright ordfeminine periodcentered
keycode 34 = 7 apostrophe paragraph doubledagger
keycode 35 = minus equal endash emdash
keycode 36 = 8 parenleft enfilledcircbullet degree
keycode 37 = 0 NoSymbol masculine singlelowquotemark
keycode 38 = bracketleft braceleft leftsinglequotemark 
keycode  39 = o O oslash Oslash
keycode  40 = u U dead_diaeresis diaeresis
keycode 41 = at grave leftdoublequotemark 
keycode  42 = i I dead_circumflex U02C6
keycode  43 = p P Greek_pi U220F
keycode  44 = Return NoSymbol Return
keycode  45 = l L notsign Ograve
keycode  46 = j J U2206 Ocircumflex
keycode 47 = colon asterisk ae AE
keycode  48 = k K U02DA UF8FF
keycode 49 = semicolon plus ellipsis Uacute
keycode 50 = bracketright braceright guillemotleft 
keycode  51 = comma less lessthanequal macron
keycode  52 = slash question division questiondown
keycode  53 = n N dead_tilde U02DC
keycode  54 = m M mu Acircumflex
keycode  55 = period greater greaterthanequal breve
keycode  56 = Tab NoSymbol Tab
keycode  57 = space NoSymbol nobreakspace
keycode  58 = grave asciitilde dead_grave grave
keycode  59 = BackSpace NoSymbol BackSpace
keycode  60 = 0x1000003 NoSymbol 0x1000003
keycode  61 = Escape NoSymbol Escape
keycode  62 =
keycode  63 = Meta_L NoSymbol Meta_L
keycode  64 = Shift_L NoSymbol Shift_L
keycode  65 = Caps_Lock NoSymbol Caps_Lock
keycode  66 = Mode_switch NoSymbol Mode_switch
keycode  67 = Control_L NoSymbol Control_L
keycode  68 = Shift_R NoSymbol Shift_R
keycode  69 = Mode_switch NoSymbol Mode_switch
keycode  70 = Control_R NoSymbol Control_R
keycode  71 = Meta_R NoSymbol Meta_R
keycode  72 =
keycode  73 = KP_Decimal NoSymbol KP_Decimal
keycode  74 =
keycode  75 = KP_Multiply NoSymbol KP_Multiply
keycode  76 =
keycode  77 = KP_Add NoSymbol KP_Add
keycode  78 =
keycode  79 = Escape NoSymbol Escape
keycode  80 =
keycode  81 =
keycode  82 =
keycode  83 = KP_Divide NoSymbol KP_Divide
keycode  84 = KP_Enter NoSymbol KP_Enter
keycode  85 =
keycode  86 = KP_Subtract NoSymbol KP_Subtract
keycode  87 =
keycode  88 =
keycode  89 = KP_Equal NoSymbol KP_Equal
keycode  90 = KP_0 NoSymbol KP_0
keycode  91 = KP_1 NoSymbol KP_1
keycode  92 = KP_2 NoSymbol KP_2
keycode  93 = KP_3 NoSymbol KP_3
keycode  94 = KP_4 NoSymbol KP_4
keycode  95 = KP_5 NoSymbol KP_5
keycode  96 = KP_6 NoSymbol KP_6
keycode  97 = KP_7 NoSymbol KP_7
keycode  98 =
keycode  99 = KP_8 NoSymbol KP_8
keycode 100 = KP_9 NoSymbol KP_9
keycode 101 = backslash bar
keycode 102 = backslash underscore
keycode 103 =
keycode 104 = F5 NoSymbol F5
keycode 105 = F6 NoSymbol F6
keycode 106 = F7 NoSymbol F7
keycode 107 = F3 NoSymbol F3
keycode 108 = F8 NoSymbol F8
keycode 109 = F9 NoSymbol F9
keycode 110 =
keycode 111 = F11 NoSymbol F11
keycode 112 =
keycode 113 = F13 NoSymbol F13
keycode 114 =
keycode 115 = F14 NoSymbol F14
keycode 116 =
keycode 117 = F10 NoSymbol F10
keycode 118 =
keycode 119 = F12 NoSymbol F12
keycode 120 =
keycode 121 = F15 NoSymbol F15
keycode 122 = Help NoSymbol Help
keycode 123 = Home NoSymbol Home
keycode 124 = Prior NoSymbol Prior
keycode 125 = Delete NoSymbol Delete
keycode 126 = F4 NoSymbol F4
keycode 127 = End NoSymbol End
keycode 128 = F2 NoSymbol F2
keycode 129 = Next NoSymbol Next
keycode 130 = F1 NoSymbol F1
keycode 131 = Left NoSymbol Left
keycode 132 = Right NoSymbol Right
keycode 133 = Down NoSymbol Down
keycode 134 = Up NoSymbol Up
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 =
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 =
keycode 215 =
keycode 216 =
keycode 217 =
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =
```


**最後に X11 を再起動**
X11を再起動しないと、keymap変更が反映されません。