[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1377.0. "XLib Keyboard IO examples" by GIDDAY::OMELEY (Rob O'Meley, CSC Sydney) Wed Sep 06 1989 04:55

    
    Hi,
    	anyone got examples of doing keyboard IO using XLIB only, I have
    looked in most conferences that cover X and DECW but have only found
    CYCLE.C (which isn't quite what I want), and Toolkit examples.
    
    My customer is writing an application in straight XLIB (no toolkit at
    all) and is finding it hard to get text input from the keyboard. All
    the examples we provide with V5.1 use the toolkit.
    
    	Any help/pointers appreciated.
    
    	Thank's
    		Rob

T.RTitleUserPersonal
Name
DateLines
1377.1XLookupStringPRNSYS::LOMICKAJJeff LomickaWed Sep 06 1989 11:5116
The general idea is like this:

	switch( event.type)
	    {
	case KeyPress:
	    l = XLookupString( &event, keybuf, 9, &ks, &cs);
	    for( c=0; c<l; c++)
		    { /* Put each character in key translation */
		    putchar( keybuf[ c]);
		    }
	    return;
	    }

Function keys and other non-graphic keys are handled slightly
differently. 

1377.2ThankyouGIDDAY::OMELEYRob O&#039;Meley, CSC SydneyTue Sep 12 1989 19:488
    Jeff,
    
    	thank's for the info, works great.
    
    	Customer now pointed in the right direction and is happy...
    
    	Rob