Xref: utzoo gnu.emacs.sources:287 comp.unix.aix:4778 Newsgroups: gnu.emacs.sources,comp.unix.aix Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!merrick From: merrick@magnus.acs.ohio-state.edu (Tom Merrick) Subject: Keyboard fix for emacs on risc/6000 Message-ID: <1991Apr26.143926.15368@magnus.acs.ohio-state.edu> Originator: merrick@top.magnus.acs.ohio-state.edu Sender: news@magnus.acs.ohio-state.edu Nntp-Posting-Host: top.magnus.acs.ohio-state.edu Organization: The Ohio State University Date: Fri, 26 Apr 1991 14:39:26 GMT Lines: 84 This section of code will correct the cursor arrow keys, page up, page down and backspace keys in emacs 18.57 for risc/6000s. It is a listing of the KeyPress area in x11term.c and basically includes a splitting of the #ifndef AIX area so it will process the select code for the risc boxes also. Additionally the page up, page down, and backspace keys have been added to the select loop. ===================================================================== KeyPress: nbytes = XLookupString (&event.xkey, mapping_buf, 20, &keysym, 0); #ifndef AIX /* Someday this will be unnecessary as we will be able to use XRebindKeysym so XLookupString will have already given us the string we want. */ if (IsFunctionKey(keysym) || IsMiscFunctionKey(keysym)) { strcpy(mapping_buf,"["); strcat(mapping_buf,stringFuncVal(keysym)); #ifdef sun strcat(mapping_buf,"z"); #else strcat(mapping_buf,"~"); #endif /* sun */ nbytes = strlen(mapping_buf); } else { #endif /* AIX */ switch (keysym) { case XK_Left: strcpy(mapping_buf,"\002"); nbytes = 1; break; case XK_Right: strcpy(mapping_buf,"\006"); nbytes = 1; break; case XK_Up: strcpy(mapping_buf,"\020"); nbytes = 1; break; case XK_Down: strcpy(mapping_buf,"\016"); nbytes = 1; break; case XK_Prior: strcpy(mapping_buf,"\326"); nbytes = 1; break; case XK_Next: strcpy(mapping_buf,"\026"); nbytes = 1; break; case XK_BackSpace: strcpy(mapping_buf,"\177"); nbytes = 1; break; } #ifndef AIX } #endif /* not AIX */ if (nbytes) { if ((nbytes == 1) && (event.xkey.state & Mod1Mask)) *mapping_buf |= METABIT; if ((nbytes == 1) && (event.xkey.state & ControlMask)) *mapping_buf &= 0x9F; /* mask off bits 1 and 2 */ if (numchars-nbytes > 0) { bcopy (mapping_buf, bufp, nbytes); bufp += nbytes; count += nbytes; numchars -= nbytes; } } break; ==================================================================== The next problem that I am looking into is that the mouse does not mark the text properly. Has anybody else noticed this or have a fix for it? Tom Merrick Ohio State University