delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/28/19:12:54

Mime-Version: 1.0
To: djgpp AT delorie DOT com
From: admcs AT megsinet DOT net (Paul Schmidt)
Subject: Allegro Question
Date: Fri, 28 Mar 1997 18:00:32 -0600
Message-ID: <19970329000031723.AAA166@ns1.megsinet.net>

How do you use the following?
Do you bitwise AND 2 constants together to see if they are both pressed?
Like if (KB_SHIFT_FLAG & KB_CTRL_FLAG)
printf("Shift and CTRL Pressed\n");
?

extern volatile int key_shifts;
   Bitmask containing the current shift/ctrl/alt state. This can contain any 
   of the flags:

      KB_SHIFT_FLAG
      KB_CTRL_FLAG
      KB_ALT_FLAG
      KB_SCROLOCK_FLAG
      KB_NUMLOCK_FLAG
      KB_CAPSLOCK_FLAG
      KB_INALTSEQ_FLAG

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019