Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!van-bc!ubc-cs!rlin From: rlin@cs.ubc.ca (Robert Lin) Newsgroups: comp.unix.sysv386 Subject: CRISP 1.9 fixkeys Message-ID: <9555@ubc-cs.UUCP> Date: 13 Sep 90 19:07:23 GMT Sender: news@cs.ubc.ca Organization: Objective Software Engineering Corp. Lines: 58 Yes, CRISP 1.9 is one great editor. If you can live with one or two minor glitches. Here's a program to remap some keys on ISC to make it work better with CRISP. Basically the Ctrl-num keypad needs to generate ESC ? [0-9] instead of their num keypad (no ctrl) esc sequences. Also, you want Alt-A,W,Q,Z,M to generate ESC n . There's more that needs to be done, but they aren't critical. I'd like to hack it to do screen switching via Alt-Fn, instead of Alt-SysRq-Fn. In fact, Paul Fox wrote a program that was supposed to do this, but it doesn't quite work (src/util/kbd.c). I am hoping someone else will post a fix to the Alt-1 bookmark bug that somebody mentioned. ----cut here---- #include #include #include #include keymap_t MyKeys; char IntMap [12] = { '7', '8', '9', '-', '4', '5', '6', '+', '1', '2', '3' }; main () { int i, n; char *cp, StrTable [512]; ioctl (0, GIO_KEYMAP, &MyKeys); for (i = 0; i < 12; i++) { /* 2 is CTRL */ MyKeys.key [i + 71].map [2] = i + 0x58; } MyKeys.key [16].map [4] = 0x7D; /* Alt-Q => esc N q */ MyKeys.key [17].map [4] = 0x7D; /* Alt-W => esc N w */ MyKeys.key [30].map [4] = 0x7D; /* Alt-A => esc N a */ MyKeys.key [44].map [4] = 0x7D; /* Alt-Z => esc N z */ MyKeys.key [50].map [4] = 0x7D; /* Alt-M => esc N m */ MyKeys.key [11].map [4] = 0x7D; /* Alt-0 => esc N 0 */ for (i = 2; i <= 10; i++) { MyKeys.key [i].map [4] = 0x7D; /* Alt-1 to 9, => esc N 1-9 */ } ioctl (0, PIO_KEYMAP, &MyKeys); ioctl (0, GIO_STRMAP, StrTable); cp = StrTable + 244; for (i = 0; i < 12; i++) { *cp++ = 0x1B; *cp++ = '?'; *cp++ = IntMap [i]; *cp++ = '\0'; } *cp = '\0'; ioctl (0, PIO_STRMAP, StrTable); }