vj@cxa.daresbury.ac.uk (Dave Hines) (02/28/91)
I have just installed Alan Bleasby's excellent port of GNU EMACS on my ST Minix system. When trying to use it, I discovered some bugs in the keyboard support for the ST. i) The ALTERNATE key, used as a `meta' key, to set the top bit in an eight bit character code, fails to set the top bit if the CONTROL key is also pressed. The fix is to change the mask used to clear bits in a character when CONTROL is pressed from 0x1F to 0x9F. This appears on line 307 of kernal/stkbd.c: 305 if (control) { 306 if (c == 0xFF) reboot(); /* CTRL-ALT-DEL */ 307 c &= 0x1F; <--- Change to 0x9F 308 } ii) When using the UK keyboard mapping, the overbar character (on the key just to the left of backspace, shift backquote) is translated to 0xFF. Hitting this causes the machine to reboot like CTRL-ALT-DEL, see line 306 above. I fixed it by changing my keymap.h (from keymap.uk.h) to map the key as a second underscore key, as the keycap looks similar to the unserscore character. (That's why I hit it in the first place... CTRL-underscore is `undo' in EMACS). This is on line 29 of keymap.h, the mapping for character code 0x29 inkeyshft[], changed from 0xFF to '_', though changing it to 0x00 would also be safe if you don't want a second underscore. While editing this file, I noticed thst the pound sterling key, shift 3, was translated to an at '@' sign. Most keyboards produce a hash '#' for this key, so I changed this as well. (line 24, code 0x04 of keyshft[], changed from '@' to '#'). P.S. It you want to use the ALT ket as meta in EMACS, remember to (setq meta-flag t) to enable it. Dave Hines. JANET: D.Hines@uk.ac.daresbury EARN/BITNET: D.Hines%daresbury.ac.uk@UKACRL UUCP: D.Hines%daresbury.ac.uk@ukc.uucp Ean: D.Hines%daresbury.ac.uk@ean-relay.ac.uk Internet: D.Hines%daresbury.ac.uk or D.Hines%daresbury@nsfnet-relay.ac.uk