🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24889

get text strings from keyboard

#24889
From: Xiaoyi Wu
Date: Thu, 22 Feb 1996 16:55
20 lines
1080 bytes
Hi, I am a newbie in X programming (X lib right now, no motif) and need 
some help on this:

I need to get a few numbers from the user in a window, is there a 
function available for that purpose? what i am doing now is use KeyPress 
mask to detect keyboard inputs, and i think i must be missing somehting 
here since although XLookupString claims to fill a string buffer i am 
only getting ONE character at a time.

the portion of code looks like this:

	    case KeyPress: 
	      res = XLookupString(&myevent,text,100,&mykey,0); 
	      printf("res=%d, text=%s\n",res,text); 
	      break; 


thanks for any help.

Xiaoyi
Technical Details
Message-ID: <Pine.SGI.3.91.960222115042.25886A-100000@mozart.bme.ohio-state.edu>
Path: arc1-ca.pugleaf.net!magnus.acs.ohio-state.edu!mail-news-gateway

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!magnus.acs.ohio-state.edu!mail-news-gateway
From: xiaoyi@mozart.bme.ohio-state.edu (Xiaoyi Wu)
Newsgroups: comp.windows.x,comp.lang.c
Subject: get text strings from keyboard
Date: 22 Feb 1996 11:55:38 -0500
Organization: The Ohio State University
Sender: root@magnus.acs.ohio-state.edu
Message-ID: <Pine.SGI.3.91.960222115042.25886A-100000@mozart.bme.ohio-state.edu>
NNTP-Posting-Host: charm.magnus.acs.ohio-state.edu