Exemple #1
0
Fichier : ugView.c Projet : rolk/ug
static void DoKey (EventRecord *theEvent)
{
  long theChar;

  theChar = BitAnd(theEvent->message,charCodeMask);
  if (BitAnd(theEvent->modifiers,cmdKey)!=0)
    DoCommand(MenuKey(theChar));
}
void DoKeyUp(EventRecord *event)
{ 
	int		myCharCode;
	int		myKeyCode;
	
	myCharCode	= BitAnd(event->message,charCodeMask);
	myKeyCode = ( event->message & keyCodeMask ) >> 8;

	Sys_QueEvent( Sys_MsecForMacEvent(), SE_KEY, vkeyToQuakeKey[ myKeyCode ], 0, 0, NULL );
}