![]() | InDesign SDK 20.5 |
#include <VirtualKey.h>
Public Types | |
| typedef base_type | data_type |
Public Member Functions | |
| VirtualKey () | |
| VirtualKey (SysChar character) | |
| VirtualKey (uint32 keyCode) | |
| VirtualKey (const VirtualKey &other) | |
| void | ReadWrite (IPMStream *s) |
| VirtualKey & | operator= (const VirtualKey ©) |
| bool16 | operator< (const VirtualKey &other) const |
| bool16 | operator== (const VirtualKey &s) const |
| bool16 | operator!= (const VirtualKey &s) const |
| SysChar | GetChar () const |
| bool16 | IsPlainChar () const |
| bool16 | IsPressed () const |
| uint32 | GetDVKeyCode () const |
This class encapsulates a platform independant way to handle 'virtual keys'. This allows us to do smart matching of keys that generate a plain character, as well as the tricker keys which generate extended characters or no characters. This is mostly used in our keyboard shortcut handling code. Usually code that needs a virtual key either gets it passed in, or they get one by calling IEvent::
| typedef base_type VirtualKey::data_type |
This type is a base type. It has no special copy semantics.
| inline |
Various constructors. Just record the passed in keycode and character code.
| inline |
Get the character for this object. Return value is 0 if IsPlainChar is false.
| inline |
Get the drover key code for this object
| bool16 VirtualKey::IsPlainChar | ( | ) | const |
Check if this virtual key represents a plain printable character.
| bool16 VirtualKey::IsPressed | ( | ) | const |
Check if this virtual key is pressed down
| inline |
Inequality operator. Does intelligent matching on both mac and windows
| s | the object to compare to. |
| inline |
Less than operator. Implemented so that sorting of this object will work.
| other | the object to compare to. |
| inline |
Assignment
| copy | the object to copy into this one. |
| bool16 VirtualKey::operator== | ( | const VirtualKey & | s | ) | const |
Equality operator. Does intelligent matching on both mac and windows
| s | the object to compare to. |
| void VirtualKey::ReadWrite | ( | IPMStream * | s | ) |
Read or write this object from/to a stream
| s | the stream to read/write from/to |