InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
KeyStates.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Lonnie Millett
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __KeyStates_h__
25 #define __KeyStates_h__
26 
27 #include "VirtualKey.h"
28 
29 
30 // Helper functions for keys used as modifiers.
31  bool16 IsShiftKeyPressed();
32  bool16 IsCommandKeyPressed();
33  bool16 IsOptionAltKeyPressed();
34  bool16 IsMacControlKeyPressed();
35  bool16 IsSpaceKeyPressed();
36 
37 // Helper function to return state of all the keys in one int16.
38 // See KBSCModifierDefs.h for information on how to decipher the return value.
39  int16 GetKBSCModifierKeys();
40 
41 // Check for a specific key. Should be used in response
42 // to a key event, or else result may be stale (Windows only).
43  bool16 IsVirtualKeyPressed(const VirtualKey& theKey);
44 
45 
46 #endif