Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcdc!hpfcdq!toml From: toml@hpfcdq.HP.COM (Tom LaStrange) Newsgroups: comp.windows.x Subject: Re: Keyboardless twm Message-ID: <890035@hpfcdq.HP.COM> Date: 1 Apr 89 13:16:50 GMT References: <732@key.COM> Organization: Hewlett-Packard - Fort Collins, CO Lines: 61 >>When using twm, I am not able to get a response from keyboard input >>Mouse input works fine and windows raise/lower/iconify/etc. as expected; >>however, when I type something, the raised window fails to recognize it. > >This bug was dissected and a patch posted to this news group some >months ago. Here it is again. -- Tom LaStrange Hewlett Packard Co. ARPA: toml%hpfcla@hplabs.hp.com Graphics Technology Division UUCP: hplabs!hpfcla!toml Fort Collins, CO ------------------------------------------------- *** /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;