Subject: Jornada 720 keyboard setup for X windows
To: NetBSD Mailing List <port-hpcarm@NetBSD.org>
From: Geoffrey Ferrari <geoffrey.ferrari@oriel.oxford.ac.uk>
List: port-hpcarm
Date: 05/14/2005 15:05:58
Hi there,

Here are some basic instructions for beginners (like me!) on how to  
set up the Jornada 720's US/UK keyboard to work properly under Xhpc  
(the HPCARM version of Xwindows).

The basic idea is that you need a file which instructs X how to  
understand your keyboard. For more details on how it works google for  
info on some of the following: xmodmap, xev, keysyms

I've cobbled together my own version of the required file (from bits  
and pieces on this list, plus my own tweaks), and it's included  
below. The easiest way I've found to use the file is to copy the text  
below (yes, just copy it as plain text) into a file called .Xmodmap  
(note the uppercase X) in the directory /usr/X11R6/lib/X11/xinit so  
that you end up with the file /usr/X11R6/lib/X11/xinit/.Xmodmap

In that same directory, you should find the file xinitrc. It's this  
file which will load your .Xmodmap file when you start X.

The benefits of this keyboard map are that all the keys bar one (the  
key for Caps Lock - who cares?) work at their face value. On my  
keyboard, for example, the tilde character ~ is printed in yellow as  
the third character on the key for number 1 and exclamation. This  
indicates that it should be accessed by pressing Function + 1. If you  
use the keymap below, that's the way your keyboard will work. (And  
similarly for the left/right bracket and left/right brace characters,  
the shift keys, the arrow keys, the various symbols on the number  
keys, and so on).

As I say, the only one I haven't worked out how to do is the caps  
lock key. This ought to be accessed by Function + Left Shift. For the  
time being, It is mapped to the windows key. Once you know what  
you're doing, feel free to change this. If I work out how to get  
Function + Left Shift working I'll try to remember to post back the  
updated keymap.

Anyway, enough talk. Here's the text that you need to copy into  
your .Xmodmap file. No doubt it's not perfect, but it's pretty close  
and a good start. It makes using X on your Jornada a much nicer  
experience.

PS I'd like to know if anyone found this file useful. Please post  
back to the mailing list <port-hpcarm@NetBSD.org> if you did.
------------------------------------------------
<Copy and paste the text below in your .Xmodmap file>

keycode   8 =
keycode   9 = Escape
keycode  10 = F1 F11
keycode  11 = F2 F12
keycode  12 = F3 F13
keycode  13 = F4 F14
keycode  14 = F5 F15
keycode  15 = F6 F16
keycode  16 = F7 F17
keycode  17 = F8 F18
keycode  18 = F9 F19
keycode  19 = F10 F20
keycode  20 = F11
keycode  21 =
keycode  22 =
keycode  23 =
keycode  24 =
keycode  25 = 1 exclam asciitilde
keycode  26 = 2 at quoteleft
keycode  27 = 3 numbersign sterling
keycode  28 = 4 dollar
keycode  29 = 5 percent
keycode  30 = 6 asciicircum
keycode  31 = 7 ampersand
keycode  32 = 8 asterisk
keycode  33 = 9 parenleft
keycode  34 = 0 parenright
keycode  35 = minus underscore
keycode  36 = equal plus
keycode  37 =
keycode  38 =
keycode  39 =
keycode  40 =
keycode  41 = q Q
keycode  42 = w W
keycode  43 = e E
keycode  44 = r R
keycode  45 = t T
keycode  46 = y Y
keycode  47 = u U
keycode  48 = i I
keycode  49 = o O
keycode  50 = p P braceleft
keycode  51 = backslash    bar braceright
keycode  52 = BackSpace
keycode  53 =
keycode  54 =
keycode  55 =
keycode  56 =
keycode  57 = a A
keycode  58 = s S
keycode  59 = d D
keycode  60 = f F
keycode  61 = g G
keycode  62 = h H
keycode  63 = j J
keycode  64 = k K
keycode  65 = l L
keycode  66 = semicolon colon bracketleft
keycode  67 =
keycode  68 = backslash
keycode  69 =
keycode  70 =
keycode  71 =
keycode  72 =
keycode  73 = z Z
keycode  74 = x X
keycode  75 = c C
keycode  76 = v V
keycode  77 = b B
keycode  78 = n N
keycode  79 = m M
keycode  80 = comma less
keycode  81 = period greater
keycode  82 = slash question
keycode  83 = apostrophe quotedbl bracketright
keycode  84 = Return
keycode  85 =
keycode  86 =
keycode  87 =
keycode  88 =
keycode  89 = Tab ISO_Left_Tab
keycode  90 =
keycode  91 = Shift_L
keycode  92 =
keycode  93 =
keycode  94 =
keycode  95 =
keycode  96 =
keycode  97 =
keycode  98 = Up
keycode  99 =
keycode 100 = Shift_R
keycode 101 =
keycode 102 =
keycode 103 =
keycode 104 =
keycode 105 =
keycode 106 =
keycode 107 =
keycode 108 =
keycode 109 = Alt_L Meta_L
keycode 110 = Mode_switch
keycode 111 =
keycode 112 =
keycode 113 = Left
keycode 114 = Down
keycode 115 = Right
keycode 116 =
keycode 117 =
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 = Caps_Lock
keycode 122 = Control_L
keycode 123 =
keycode 124 = space
keycode 125 =
keycode 126 =
keycode 127 =
keycode 128 = slash question
keycode 129 = Delete
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
clear shift
clear lock
clear control
clear mod1
clear mod2
clear mod3
clear mod4
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L
add mod1 = Mode_switch