nomad@verdix.com (Lee Damon) (12/07/88)
Has anyone successfully compiled the twm that comes in uc1.tar with the x11r3 distribution on a Sun 4 under SunOS 4.0? When I run it, everything works but the keybaord. No matter where the cursor is, or where focus is set, nothing that is typed is shown on the screen. Hints? Please! nomad --------------------- Lee Damon UUCP: verdix!------- UUCP: verdix!nomad \ \ Internet: nomad@verdix.com {tektronix,hp-pcd}!orstcs!castle!nomad FidoNet: 105/302 - The Castle BBS - 503-629-5841 / agora! "Say what you like, the bicycle has a great past ahead of it!"
foote@p.cs.uiuc.edu (12/13/88)
I've got the same problem with twm X11R3 under SunOS 4.0 on a Sun 3/50...
nomad@verdix.com (Lee Damon) (12/15/88)
In article <91600004@p.cs.uiuc.edu> foote@p.cs.uiuc.edu writes: >I've got the same problem with twm X11R3 under SunOS 4.0 on a Sun 3/50... Since I'm the one who asked the original question, I guess I should now post the results of my posting. This one says it all (though about 10 people sent me the information... thanks guys!) nomad )From: davep@apple.com )Subject: Re: twm on Sun 4 under SunOS4.0 )Date: Wed, 07 Dec 88 11:12:53 -0800 ) )Try this patch, which I've previously posted. Note that your twm )version number may be 1.2 instead of 4.0 or 5.0, since it uses )the RCS version number and was checked in at MIT as 1.1, then 1.2. ) )It's a problem with grabbing keys. It's still a )problem in twm 5.0 (which is included on the R3 tape). ) )In twm 4.0, Tom added the ability to bind functions to keys on the )keyboard. The .twmrc file you're using probably references a key for )which your server does not have a keycode. In the .twmrc file, you )specify a key string name; this gets converted into a keysym, of )which there are many, and gives an error if the keysym doesn't exist. )The keysym then gets converted to an actual keycode, of which a much )smaller number generally exist. There is no error checking here; )if there is no corresponding keycode, a 0 is returned. This value is )passed as the keycode to XGrabKey, but 0 means AnyKey to XGrabKey, so )it grabs all keys. ) )Here's a patch for this problem. The line numbers match twm 5.0, but )it succeeds in patching twm 4.0 also. ) (Since the patch was already posted, I have deleted it from here. If someone wants it send me e-mail and I'll ship it to you.) )- - -- )Dave Payne Apple Computer, A/UX Engineering Group )davep@apple.com (408) 974-5545 nomad --------------------- Lee Damon UUCP: verdix!------- UUCP: verdix!nomad \ \ Internet: nomad@verdix.com {tektronix,hp-pcd}!orstcs!castle!nomad FidoNet: 105/302 - The Castle BBS - 503-629-5841 / agora! "Say what you like, the bicycle has a great past ahead of it!"
obrooks@nswc-wo.arpa.arpa (12/16/88)
Please send me the patches for twm concerning the keyboard problem. obrooksAs related in net message. obrooks@nswc-wo.arpa
nomad@verdix.COM (Lee Damon) (12/16/88)
Return-Path: uunet!ginsu.apple.com!davep To: nomad@verdix.com Subject: Re: twm on Sun 4 under SunOS4.0 In-Reply-To: Your message of 06 Dec 88 22:14:45 +0000. <139@verdix.verdix.com> Date: Wed, 07 Dec 88 11:12:53 -0800 Try this patch, which I've previously posted. Note that your twm version number may be 1.2 instead of 4.0 or 5.0, since it uses the RCS version number and was checked in at MIT as 1.1, then 1.2. It's a problem with grabbing keys. It's still a problem in twm 5.0 (which is included on the R3 tape). In twm 4.0, Tom added the ability to bind functions to keys on the keyboard. The .twmrc file you're using probably references a key for which your server does not have a keycode. In the .twmrc file, you specify a key string name; this gets converted into a keysym, of which there are many, and gives an error if the keysym doesn't exist. The keysym then gets converted to an actual keycode, of which a much smaller number generally exist. There is no error checking here; if there is no corresponding keycode, a 0 is returned. This value is passed as the keycode to XGrabKey, but 0 means AnyKey to XGrabKey, so it grabs all keys. Here's a patch for this problem. The line numbers match twm 5.0, but it succeeds in patching twm 4.0 also. *** /tmp/,RCSt1a00790 Wed Nov 9 01:20:05 1988 - - --- menus.c Wed Nov 9 01:20:11 1988 *************** *** 137,144 **** { FuncKey *tmp; KeySym keysym; ! if ((keysym = XStringToKeysym(name)) == NoSymbol) { fprintf(stderr, "twm: unknown key name \"%s\"\n", name); return; - - --- 137,150 ---- { FuncKey *tmp; KeySym keysym; + KeyCode keycode; ! /* ! * Don't let a 0 keycode go through, since that means AnyKey to the ! * XGrabKey call in GrabKeys(). ! */ ! if ((keysym = XStringToKeysym(name)) == NoSymbol || ! (keycode = XKeysymToKeycode(dpy, keysym)) == 0) { fprintf(stderr, "twm: unknown key name \"%s\"\n", name); return; *************** *** 162,168 **** tmp->name = name; tmp->keysym = keysym; ! tmp->keycode = XKeysymToKeycode(dpy, keysym); tmp->cont = cont; tmp->mods = mods; tmp->func = func; - - --- 168,174 ---- tmp->name = name; tmp->keysym = keysym; ! tmp->keycode = keycode; tmp->cont = cont; tmp->mods = mods; tmp->func = func; - - -- Dave Payne Apple Computer, A/UX Engineering Group davep@apple.com (408) 974-5545 --------------------- Lee Damon UUCP: verdix!------- UUCP: verdix!nomad \ \ Internet: nomad@verdix.com {tektronix,hp-pcd}!orstcs!castle!nomad FidoNet: 105/302 - The Castle BBS - 503-629-5841 / agora! "Say what you like, the bicycle has a great past ahead of it!"
nomad@verdix.com (Lee Damon) (12/16/88)
In article <8812151954.AA22262@symmetry.verdix.com> nomad@verdix.COM (Lee Damon) writes: >Return-Path: uunet!ginsu.apple.com!davep >To: nomad@verdix.com >Subject: Re: twm on Sun 4 under SunOS4.0 >In-Reply-To: Your message of 06 Dec 88 22:14:45 +0000. > <139@verdix.verdix.com> >Date: Wed, 07 Dec 88 11:12:53 -0800 > >Try this patch, which I've previously posted. Note that your twm >version number may be 1.2 instead of 4.0 or 5.0, since it uses and so on and so on. I'm sorry about that folks, that is what I get for not checking the Cc: line on mail that I am replying to. That patch was not supposed to get posted again! Darn, teach me not to look! nomad (the blushing) --------------------- Lee Damon UUCP: verdix!------- UUCP: verdix!nomad \ \ Internet: nomad@verdix.com {tektronix,hp-pcd}!orstcs!castle!nomad FidoNet: 105/302 - The Castle BBS - 503-629-5841 / agora! "Say what you like, the bicycle has a great past ahead of it!"