PCL
Keyboard Utilities

Namespaces

 pcl::KeyboardModifier
 Defines PCL keyboard modifiers.
 
 pcl::KeyCode
 Defines PCL key codes.
 

Classes

class  KeyboardModifiers
 A combination of keyboard modifier codes. More...
 

Functions

KeyboardModifiers pcl::CurrentKeyboardModifiers ()
 
bool pcl::IsAltPressed ()
 
bool pcl::IsControlOrCmdPressed ()
 
bool pcl::IsControlPressed ()
 
bool pcl::IsMetaPressed ()
 
bool pcl::IsShiftPressed ()
 
bool pcl::IsSpaceBarPressed ()
 

Detailed Description

Function Documentation

◆ CurrentKeyboardModifiers()

KeyboardModifiers pcl::CurrentKeyboardModifiers ( )

Returns the current state of all supported keyboard modifiers.

Referenced by pcl::IsAltPressed(), pcl::IsControlPressed(), pcl::IsMetaPressed(), pcl::IsNoKeyboardModifierPressed(), pcl::IsShiftPressed(), and pcl::IsSpaceBarPressed().

◆ IsAltPressed()

bool pcl::IsAltPressed ( )
inline

Returns true iff an Alt key (also known as Option key on macOS) is currently pressed.

Definition at line 428 of file KeyCodes.h.

References pcl::CurrentKeyboardModifiers(), and pcl::Flags< E >::IsFlagSet().

◆ IsControlOrCmdPressed()

bool pcl::IsControlOrCmdPressed ( )
inline

On UNIX, Linux and Windows platforms, returns true iff a Control key is currently pressed. On macOS, returns true iff the Command key is currently pressed.

Definition at line 468 of file KeyCodes.h.

References pcl::IsControlPressed().

◆ IsControlPressed()

bool pcl::IsControlPressed ( )
inline

Returns true iff a Control key (also known as Meta key on macOS) is currently pressed.

Definition at line 409 of file KeyCodes.h.

References pcl::CurrentKeyboardModifiers(), and pcl::Flags< E >::IsFlagSet().

Referenced by pcl::IsControlOrCmdPressed().

◆ IsMetaPressed()

bool pcl::IsMetaPressed ( )
inline

Returns true iff the Meta key is currently pressed.

This function is equivalent to IsControlPressed() on macOS. On Windows (and also on modern Linux desktops) this function returns true if the Windows key is pressed.

Definition at line 456 of file KeyCodes.h.

References pcl::CurrentKeyboardModifiers(), and pcl::Flags< E >::IsFlagSet().

◆ IsShiftPressed()

bool pcl::IsShiftPressed ( )
inline

Returns true iff a Shift key is currently pressed.

Definition at line 418 of file KeyCodes.h.

References pcl::CurrentKeyboardModifiers(), and pcl::Flags< E >::IsFlagSet().

◆ IsSpaceBarPressed()

bool pcl::IsSpaceBarPressed ( )
inline

Returns true iff the Space Bar key is currently pressed.

Definition at line 399 of file KeyCodes.h.

References pcl::CurrentKeyboardModifiers(), and pcl::Flags< E >::IsFlagSet().