home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
199.lha
/
GimmeLib
/
keyboard.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-12-27
|
855b
|
36 lines
/*
* FILE: keyboard.c
* Support routines for "cooking" raw input.
*
* Public Domain, but keep my name in it as the original author.
* 31-Aug-88 Jan Sven Trabandt first release version
*/
#include "gimmelib/gimmefuncs.h"
SHORT deadKeyConvert( imsg, buf, bufsize, keymap )
struct IntuiMessage *imsg;
UBYTE *buf;
USHORT bufsize;
struct KeyMap *keymap;
{
struct InputEvent ievent;
#ifdef GIMME_WIMPY
if( !imsg || !buf || bufsize < 0 ) {
return( -3 );
}
#endif
if( imsg->Class != RAWKEY ) {
return( -2 );
}
ievent.ie_NextEvent = NULL;
ievent.ie_Class = IECLASS_RAWKEY;
ievent.ie_Code = imsg->Code;
ievent.ie_Qualifier = imsg->Qualifier;
ievent.ie_position.ie_addr = *((APTR *)imsg->IAddress);
return( RawKeyConvert(&ievent, buf, (ULONG)bufsize, keymap) );
} /* deadKeyConvert */