Solaris X11 and Dvorak simplified keyboard layout

I’ve recently been playing with OpenSolaris and Solaris Express DE running in VirtualBox. They’re fine so far (except audio isn’t working) but I stumbled on a usability issue that was nearly a show-stopper: dratted QWERTY layouts! The GNOME GUI for switching to Dvorak doesn’t work, and setxkbmap(1) can’t find the rules file for dvorak either (they don’t seem to be installed where the man page indicates)…

Well, after some searching around I discovered that for Solaris X11, need to use xmodmap(1). The xmodmap key maps for Solaris are located in /usr/share/xmodmap so you can switch between Dvorak and QWERTY thus:

  • xmodmap /usr/share/xmodmap/xmodmap.dvorak
  • xmodmap /usr/share/xmodmap/xmodmap.us

Making a pair of shell aliases for these verbose commands would be handy too:

alias asdf "xmodmap /usr/share/xmodmap/xmodmap.dvorak"
alias aoeu "xmodmap /usr/share/xmodmap/xmodmap.us"

with these, just type the first four keys of the home row and press enter to flip to the other layout. Xmodmap only affects X11 (global for all running and new X clients).

Advertisements

5 thoughts on “Solaris X11 and Dvorak simplified keyboard layout

  1. Pingback: number 9 » Blog Archive » Dvorak on Solaris

  2. this was very helpful! thanks much. you could have made it easier by saying type “xmodmap *blah blah*” in terminal, though. still, good article.

  3. You could put the xmodmap command into an ~/.xinitrc file to setup a default keymap at each login.

    On OpenSolaris 2009.06 you can set a user specific keymap in Gnome, via “System->Preferences->Input Methods->Keyboard”, the uncheck “Autodetect”, then select “US/Dvorak”

    Or you can set a system-wide dvorak layout by adding the following to your /etc/X11/xorg.conf file (needs to be generated using Xorg -configure);

    Section “InputDevice”
    Identifier “Keyboard0”
    Driver “kbd”

    Option “XkbModel” “pc104”
    Option “XkbLayout” “dvorak”
    EndSection

  4. xorg.conf doesn’t exist on sparc models, and some versions of solaris don’t have xmodmap.dvorak in /usr/share/xmodmap. to make things even more strange, i’m using a standard pc usb keyboard on my sun sparc machine. if anyone else is in my situation, you can solve the problem by dumping the current xmodmap to a file, and then changing the keys around to create an xmodmap.dvorak. here’s my attempt which seems to work, though i’ve only been using it for a couple of minutes, so i may have screwed something up:

    keycode 8 =
    keycode 9 =
    keycode 10 =
    keycode 11 = A
    keycode 12 = X
    keycode 13 = J
    keycode 14 = e E EuroSign
    keycode 15 = period greater
    keycode 16 = U
    keycode 17 = I
    keycode 18 = D
    keycode 19 = C
    keycode 20 = H
    keycode 21 = T
    keycode 22 = N
    keycode 23 = M
    keycode 24 = B
    keycode 25 = R
    keycode 26 = L
    keycode 27 = apostrophe quotedbl
    keycode 28 = P
    keycode 29 = O
    keycode 30 = Y
    keycode 31 = G
    keycode 32 = K
    keycode 33 = comma less
    keycode 34 = Q
    keycode 35 = F
    keycode 36 = semicolon colon
    keycode 37 = 1 exclam
    keycode 38 = 2 at
    keycode 39 = 3 numbersign
    keycode 40 = 4 dollar EuroSign
    keycode 41 = 5 percent EuroSign
    keycode 42 = 6 asciicircum
    keycode 43 = 7 ampersand
    keycode 44 = 8 asterisk
    keycode 45 = 9 parenleft
    keycode 46 = 0 parenright
    keycode 47 = Return
    keycode 48 = Escape
    keycode 49 = BackSpace
    keycode 50 = Tab
    keycode 51 = space
    keycode 52 = bracketleft braceleft
    keycode 53 = bracketright braceright
    keycode 54 = slash question
    keycode 55 = equal plus
    keycode 56 = backslash bar brokenbar
    keycode 57 = backslash bar brokenbar
    keycode 58 = S
    keycode 59 = minus underscore
    keycode 60 = grave asciitilde
    keycode 61 = W
    keycode 62 = V
    keycode 63 = Z
    keycode 64 = Caps_Lock
    keycode 65 = F1
    keycode 66 = F2
    keycode 67 = F3
    keycode 68 = F4
    keycode 69 = F5
    keycode 70 = F6
    keycode 71 = F7
    keycode 72 = F8
    keycode 73 = F9
    keycode 74 = F10
    keycode 75 = SunF36
    keycode 76 = SunF37
    keycode 77 = F22 F22 Print SunSys_Req
    keycode 78 = F23 F23 Scroll_Lock
    keycode 79 = F21 F21 Pause Break
    keycode 80 = Insert
    keycode 81 = Home
    keycode 82 = Prior
    keycode 83 = Delete
    keycode 84 = End
    keycode 85 = Next
    keycode 86 = Right
    keycode 87 = Left
    keycode 88 = Down
    keycode 89 = Up
    keycode 90 = Num_Lock
    keycode 91 = F25 F25 KP_Divide
    keycode 92 = F26 F26 KP_Multiply
    keycode 93 = F24 F24 KP_Subtract
    keycode 94 = KP_Add
    keycode 95 = KP_Enter
    keycode 96 = F33 F33 KP_1 End
    keycode 97 = Down F34 KP_2
    keycode 98 = F35 F35 KP_3 Next
    keycode 99 = Left F30 KP_4
    keycode 100 = F31 F31 KP_5
    keycode 101 = Right F32 KP_6
    keycode 102 = F27 F27 KP_7 Home
    keycode 103 = Up F28 KP_8
    keycode 104 = F29 F29 KP_9 Prior
    keycode 105 = KP_Insert KP_Insert KP_0
    keycode 106 = Delete Delete KP_Decimal
    keycode 107 =
    keycode 108 = Multi_key
    keycode 109 = SunPowerSwitch SunPowerSwitchShift
    keycode 110 =
    keycode 111 =
    keycode 112 =
    keycode 113 =
    keycode 114 =
    keycode 115 =
    keycode 116 =
    keycode 117 =
    keycode 118 =
    keycode 119 =
    keycode 120 =
    keycode 121 =
    keycode 122 =
    keycode 123 = F17 F17 SunOpen
    keycode 124 = Help
    keycode 125 = F13 F13 SunProps
    keycode 126 = F15 F15 SunFront
    keycode 127 = F11 F11 Cancel
    keycode 128 = F12 F12 Redo
    keycode 129 = F14 F14 Undo
    keycode 130 = F20 F20 SunCut
    keycode 131 = F16 F16 SunCopy
    keycode 132 = F18 F18 SunPaste
    keycode 133 = F19 F19 Find
    keycode 134 = SunAudioMute SunVideoDegauss
    keycode 135 = SunAudioRaiseVolume SunVideoRaiseBrightness
    keycode 136 = SunAudioLowerVolume SunVideoLowerBrightness
    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 = Control_L
    keycode 232 = Shift_L
    keycode 233 = Alt_L
    keycode 234 = Meta_L
    keycode 235 = Control_R
    keycode 236 = Shift_R
    keycode 237 = Mode_switch
    keycode 238 = Meta_R
    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 =

Comments are closed.