From: raveling@kestrel.unify.com (Paul Raveling) Subject: Re: kbd mapping Date: Mon, 1 Jul 91 10:49:02 PDT Janet Cahn (cahn@media-lab.media.mit.edu) wrote... > > what is the non-qwerty arrangement of your keyboard? Here's the keyboard layout; if you like I can forward and file to feed to xmodmap, currently set up for a Sun 4 keyboard. The layout of special characters on the keyboard below matches an HP 9000 series workstation. ------------------------------------------------------------ | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | Back | | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |space | ------------------------------------------------------------ | | | | | | | | | | | : | { | } | | | | Tab | Z | W | D | T | F | U | O | I | Y | ; | [ | ] | \ | ------------------------------------------------------------ | | | | | | | | | | | | . | " | | |Caps|Ctl| X | G | R | S | L | B | E | A | H | , | ' |Retrn| ------------------------------------------------------------ |DEL| | | | | | | | | | > | ? | | |ESC|Shift | Q | V | C | P | J | N | M | K | < | / | Shift | ------------------------------------------------------------ | | | | |Meta| (Space) |Meta| ------------------------------------------- > what kinds of stress is it supposed to reduce? I won't claim to have an ultimate answer because I'm not an expert in biomechanics, but the bottom line in intent is that it cuts down on total finger motion. I suspect that the important aspect of this motion is flexion -- how much of an angle does the finger have to move through at various joints. A hypothesis consistent with my own experience is that the types of motion most likely to cause the stress that leads to these problems is increased significantly when the fingers have to move to a different row or column on the keyboard. In this view... -- Minimum stress is for typing a character with the fingers in home position. This involves the shortest possible stroke and involves virtually no flexing at the finger's two joints. Nearly all motion comes from the joint where the finger attaches to the hand. (Guess I'd better learn the names of these joints.) -- Next comes typing a character one row above or below home position. This is a diagonal motion but requires essentially no hand movement. It requires the 2 joints in the fingers to flex over some angle that's not too radical, but it's large in comparison with flexion over home position. Actually, using the little fingers at home position is about a tie for this. Flexion angles increase as finger length decreases. -- It's possible that typing characters to the left or right of home position is roughly a tie with the preceding motion for stress. However, the motion is different; this requires a lateral movement of the fingers. -- Most stressful is a long reach, such as two rows up to the numerics. The worst case includes a lateral reach, such as across to a distant return, control, backspace, or delete key. The worst such moves require straightening the little finger (going from roughly a 90 degree flex to a 0 degree flex), moving the hand and arm slightly, flexing at only one joint to depress the key, then repeating these motions in reverse. It seems natural that there's some level of cumulative stress that could be measured as a function of finger motion and frequency of that motion. A first order guess would be something like stress_per_keystroke = C1 * flexion_angle + C2 * translation_distance where C1 & C2 are bilogically meaningful constants, though perhaps the whole thing could be broken down into C1 * flexion_angle by treating the latter as a vector ___ \ cumulative_stress = * number_of_keystrokes * stress_per_keystroke /__ for each key/finger combination. That crude graphic is a sigma. To be particularly accurate it would probably be necessary to break down motion further for each joint and each muscle. The bottom line though is that I tried to minimize (at least roughly) frequency_of_keystrokes * stress_per_keystroke according to the principles above. When time allows I'll try working up some numbers for comparison; I once took measurements from an HP 9000 series keyboard and could derive approximate flexion angles based on my own finger measurements, then compare how each layout would fare with these stress measures if I typed various existing files. BTW, I'll save a copy of this posting. Might be worth editing it a bit for a followup to the newsgroup. -- Paul From: raveling@kestrel.unify.com (Paul Raveling) Subject: Re: your remapped keyboard Date: Wed, 15 Jan 92 9:25:37 PST I'll forward some files in separate messages. The first will be the xmodmap file to shift to my keymap; I keep it (and other configuration files in ~/config, with a symbolic link from my home directory for choosing the default keymap. This one is name (in ~/config) keymap.raveling. It turns out to be convenient to have a similar file for switching back to QWERTY; I usually do this switch when someone else is visiting and needs to use my workstation for something, such as doing an rlogin to their own machine & killing a process that's permanently grabbed their mouse and keyboard. This one is called keymap.qwerty. To assist in doing this switch, my .cshrc defines these four aliases: alias dkxjgins 'xmodmap ~/config/keymap.raveling' alias qwerty 'xmodmap ~/config/keymap.qwerty' alias raveling 'xmodmap ~/config/keymap.raveling' alias zwdtfu 'xmodmap ~/config/keymap.qwerty' This allows typing "raveling" or "qwerty" in either keyboard layout in order to select the one you want. I do use emacs, but am using a modified version of 18.55. The mods concern mouse & key mapping and involve code changes, mainly in modules x11term.c and x11fns.c, plus a fair-sized elisp file that lives in the lisp/term subdirectory. These changes provide full access to anything that generates an X11 keysym, including function keys that can't be accessed by plain vanilla emacs. They also work in combination with the xmodmap files to resolve problems such as the F11 & F12 keys generating different keysyms in different display servers. I'll forward two text files that describe the mouse and keyboard mappings that my standard elisp file for Sun Type 4 keyboards produces. If you'd like to get the full set of files I can probably round them up without too much trouble. I still haven't ported them into 18.57, but probably should do that sometime. Too bad RWS didn't adopt these mods back when I distribute them for 18.53... Oh well. Anyway, stand by for... config/xmodmap.raveling config/xmodmap.qwerty emacs-18.55/etc/sun_type_4_mouse.text emacs-18.55/etc/sun_type_4_keys.text -- Paul From: raveling@kestrel.unify.com (Paul Raveling) Subject: config/keymap.raveling Date: Wed, 15 Jan 92 9:27:04 PST ! Map for sparcstation 1, Raveling's keyboard layout ! ! clear Lock keycode 0x1c = Caps_Lock add Lock = Caps_Lock ! ! keycode 0x10 = F11 X11R4 ! keycode 0x10 = SunF36 X11/News keycode 0x10 = KP_F1 ! keycode 0x12 = F12 X11R4 ! keycode 0x10 = SunF36 X11/News keycode 0x12 = KP_F2 ! keycode 0x14 = 0 X11R4 ! keycode 0x14 = Mode_switch X11/News keycode 0x14 = Mode_switch ! keycode 0x31 = grave asciitilde keycode 0x31 = Return ! keycode 0x3c = Tab keycode 0x3c = Return ! keycode 0x3d = q Q keycode 0x3d = z Z ! keycode 0x3e = w W keycode 0x3e = w W ! keycode 0x3f = e E keycode 0x3f = d D ! keycode 0x40 = r R keycode 0x40 = t T ! keycode 0x41 = t T keycode 0x41 = f F ! keycode 0x42 = y Y keycode 0x42 = u U ! keycode 0x43 = u U keycode 0x43 = o O ! keycode 0x44 = i I keycode 0x44 = i I ! keycode 0x45 = o O keycode 0x45 = y Y ! keycode 0x46 = p P keycode 0x46 = semicolon colon ! keycode 0x49 = Delete keycode 0x49 = Undo ! keycode 0x54 = a A keycode 0x54 = x X ! keycode 0x55 = s S keycode 0x55 = g G ! keycode 0x56 = d D keycode 0x56 = r R ! keycode 0x57 = f F keycode 0x57 = s S ! keycode 0x58 = g G keycode 0x58 = l L ! keycode 0x59 = h H keycode 0x59 = b B ! keycode 0x5a = j J keycode 0x5a = e E ! keycode 0x5b = k K keycode 0x5b = a A ! keycode 0x5c = l L keycode 0x5c = h H ! keycode 0x5d = semicolon colon keycode 0x5d = comma period ! keycode 0x6b = z Z keycode 0x6b = q Q ! keycode 0x6c = x X keycode 0x6c = v V ! keycode 0x6d = c C keycode 0x6d = c C ! keycode 0x6e = v V keycode 0x6e = p P ! keycode 0x6f = b B keycode 0x6f = j J ! keycode 0x70 = n N keycode 0x70 = n N ! keycode 0x71 = m M keycode 0x71 = m M ! keycode 0x72 = comma less keycode 0x72 = k K ! keycode 0x73 = period greater keycode 0x73 = less greater ! keycode 0x76 = linefeed keycode 0x76 = grave asciitilde From: raveling@kestrel.unify.com (Paul Raveling) Subject: File config/keymap.qwerty Date: Wed, 15 Jan 92 9:27:48 PST ! Map for sparcstation 1, to restore QWERTY layout ! ! clear Lock keycode 0x1c = Caps_Lock add Lock = Caps_Lock ! ! keycode 0x10 = F11 X11R4 ! keycode 0x10 = SunF36 X11/News ! keycode 0x10 = KP_F1 ! keycode 0x12 = F12 X11R4 ! keycode 0x10 = SunF36 X11/News ! keycode 0x12 = KP_F2 ! keycode 0x14 = 0 X11R4 keycode 0x14 = Mode_switch ! keycode 0x14 = Mode_switch keycode 0x31 = grave asciitilde ! keycode 0x31 = Return keycode 0x3c = Tab ! keycode 0x3c = Return keycode 0x3d = q Q ! keycode 0x3d = z Z keycode 0x3e = w W ! keycode 0x3e = w W keycode 0x3f = e E ! keycode 0x3f = d D keycode 0x40 = r R ! keycode 0x40 = t T keycode 0x41 = t T ! keycode 0x41 = f F keycode 0x42 = y Y ! keycode 0x42 = u U keycode 0x43 = u U ! keycode 0x43 = o O keycode 0x44 = i I ! keycode 0x44 = i I keycode 0x45 = o O ! keycode 0x45 = y Y keycode 0x46 = p P ! keycode 0x46 = semicolon colon keycode 0x49 = Delete ! keycode 0x49 = Undo keycode 0x54 = a A ! keycode 0x54 = x X keycode 0x55 = s S ! keycode 0x55 = g G keycode 0x56 = d D ! keycode 0x56 = r R keycode 0x57 = f F ! keycode 0x57 = s S keycode 0x58 = g G ! keycode 0x58 = l L keycode 0x59 = h H ! keycode 0x59 = b B keycode 0x5a = j J ! keycode 0x5a = e E keycode 0x5b = k K ! keycode 0x5b = a A keycode 0x5c = l L ! keycode 0x5c = h H keycode 0x5d = semicolon colon ! keycode 0x5d = comma period keycode 0x6b = z Z ! keycode 0x6b = q Q keycode 0x6c = x X ! keycode 0x6c = v V keycode 0x6d = c C ! keycode 0x6d = c C keycode 0x6e = v V ! keycode 0x6e = p P keycode 0x6f = b B ! keycode 0x6f = j J keycode 0x70 = n N ! keycode 0x70 = n N keycode 0x71 = m M ! keycode 0x71 = m M keycode 0x72 = comma less ! keycode 0x72 = k K keycode 0x73 = period greater ! keycode 0x73 = less greater keycode 0x76 = Linefeed ! keycode 0x76 = grave asciitilde From: raveling@kestrel.unify.com (Paul Raveling) Subject: File emacs-18.55/etc/sun_type_4_keys.text Date: Wed, 15 Jan 92 9:29:16 PST Default Function Key Usage for Xemacs 18.55 on Sun Workstations with Type 4 Keyboards [A few of these assignments depend on xmodmap settings... see xmodmap notes at end] Function keys at left: Buffer and file operations -------------------------------------------------- Stop L1 Exit emacs. Again L2 Switch to previous buffer (swap top 2 on buffer list) Props L3 Display and edit buffer list Undo L4 Revert (reload buffer from its file) Front L5 Display only current buffer (quit displaying others) Copy L6 Switch to next buffer (rotate through buffer list) Open L7 Edit another file (asks for filename) Paste L8 Insert contents of a file (asks for filename) Find L9 Display and edit directory (dired) Cut L10 Write buffer into other file (asks for filename) Help Save (Write buffer contents to its file) Special Keys above and in main key cluster ------------------------------------------ Tab Start/Stop saving keystrokes as keyboard macro [Use control-I for ascii tab characters] F1 Execute last keyboard macro defined (saved keystrokes) F2 - F9 First time: Stop saving keystrokes as keyboard macro, bind this key to that macro Thereafter: Execute macro bound to this key F10 Replace all ocurrences of a text string F11 Search backward for a text string F12 Search forward for a text string Delete Undo BackSpace Abort current command (^G) Compose Help (emacs help) Alt Graph Go back to marked location (swap Point and Mark) (Esc and Tab operate as usual, the rhombus is Meta) Keys in right keypad, large keys -------------------------------- Enter Go to line (asks for line number) + Report current line number Ins Switch between insert & overwrite editing modes Keys in right keypad, small keys -------------------------------- R11 Set mark at current character Pause R1 Save region between marked and current characters PrSc R2 Save & delete region between marked & current chars Break R3 Insert saved revion Num Lock Unused = R4 Apropos: Look for information about something / R5 Describe function of a key * R6 List ALL key definitions - Describe an emacs function or variable Home R7 Go to beginning of buffer End R13 Go to end of buffer PgUp R9 Go back to previous "page" PgDn R15 Go forward to next "page" Del Delete current character Arrow keys (R8, R10, R10, R14) move in indicated direction Special X (xmodmap) key mappings -------------------------------- Text below represents xmodmap input, with original mappings commented out by "!". ! Keys with non-uniform and/or troublesome mappings ! in different display servers: ! keycode 0x10 = F11 X11R4 ! keycode 0x10 = SunF36 X11/News keycode 0x10 = KP_F1 ! keycode 0x12 = F12 X11R4 ! keycode 0x10 = SunF36 X11/News keycode 0x12 = KP_F2 ! keycode 0x14 = 0 X11R4 ! keycode 0x14 = Mode_switch X11/News keycode 0x14 = Mode_switch ! Undo: Use a large key. ! With the large Delete key mapped to Undo, the small ! keypad Del key continues to generate the Delete keysym. ! keycode 0x49 = Delete keycode 0x49 = Undo ! Irrelevant but recommended: ! To eliminate Return/` typos because of the foolish shaping ! and placement of the Return key on the Sun Type 4 keyboard: ! keycode 0x31 = grave asciitilde keycode 0x31 = Return ! keycode 0x76 = linefeed keycode 0x76 = grave asciitilde ! Also recommended: Abandon the QWERTY layout in favor ! of one that makes typing easier. Contact Raveling@unify.com ! for a recommendation based on >10 years of use. From: raveling@kestrel.unify.com (Paul Raveling) Subject: File emacs-18.55/etc/sun_type_4_mouse.text Date: Wed, 15 Jan 92 9:30:09 PST Default Mouse Button Functions for Xemacs 18.55 on Sun or HP Workstations All mouse keys move the gemacs character cursor to the character marked by the X11 cursor when the mouse key is released. Button Function ------ -------- Left Click: Mark X11 cursor location, Drag: Mark region, copy to cut buffer Middle Insert from cut buffer @ X11 cursor Right Click: Mark X11 cursor location & center it Drag: Delete region, save in cut buffer Unshifted mouse keys operate on the editor's private cut buffer; Shifted mouse keys operate on X11's (public) cut buffer "Editor's private cut buffer" is actually an X'ish name for the emacs kill ring; another way to retrieve this text is with the ^Y key, or "yank" command.