Index

Package: Keyboard

Description

package Keyboard is

Types

Modifiers_Type

type Modifiers_Type is (ALT, CTRL, SHIFT);
Represents special keys used to modify key presses or mouse clicks

Modifiers_Array

type Modifiers_Array is array (Modifiers_Type) of Boolean;

Trillian

type Trillian is (Yes, No, Either);
Represents a trinary logic value, where the third value is undefined.

Modifiers_Pattern

type Modifiers_Pattern is array (Modifiers_Type) of Trillian;
An array of trinary modifier states- on, off, either. A Modifiers_Pattern value is used to match a Modifiers_Array by setting definite values for the modifiers you want to match, and using the Either value to match anything else.

Constants & Global variables

MODIFIERS_NONE (Modifiers_Array)

MODIFIERS_NONE : constant Modifiers_Array := Modifiers_Array'(others=>False);
A Modifiers_Array value with no modifiers set

MODIFIERS_ANY (Modifiers_Pattern)

MODIFIERS_ANY : constant Modifiers_Pattern := Modifiers_Pattern'(others=>Either);
All modifiers with a value of Either: this will match any Modifiers_Array.

Subprograms & Entries

=

function "="
( l, r: Modifiers_Array ) return Boolean;
Returns True if all modifiers in 'l' and 'r' match exactly.

None

function None
( mods: Modifiers_Array ) return Boolean;
Returns True if no modifiers are set.

Only_Alt

function Only_Alt
( mods: Modifiers_Array ) return Boolean;
Returns True if only the Alt modifier is set.

Only_Ctrl

function Only_Ctrl
( mods: Modifiers_Array ) return Boolean;
Returns True if only the Ctrl modifier is set.

Only_Shift

function Only_Shift
( mods: Modifiers_Array ) return Boolean;
Returns True if only the Shift modifier is set.

=

function "="
( l: Boolean;
r: Trillian ) return Boolean;
Returns True if 'l' and 'r' match or if 'r' is Either.

=

function "="
( l: Trillian;
r: Boolean ) return Boolean;
Returns True if 'l' and 'r' match or if 'l' is Either.

=

function "="
( l: Modifiers_Array;
r: Modifiers_Pattern ) return Boolean;
Returns True if the pattern in 'r' matches the definite state in 'l'.

=

function "="
( l: Modifiers_Pattern;
r: Modifiers_Array ) return Boolean;
Returns True if the pattern in 'l' matches the definite state in 'r'.