class key_event


class key_event
    : public event

Description

A key event is an event which describes a key press or a key release. You call get_key to get the key that was pressed or released.

Public Member Functions

key_event (
    key_event_type initial_key_event_type,
    key initial_key
)
noexcept

Constructs a key event with the given key event type and key.

Parameters:
  • initial_key_event_type:

    The kind of the key event.

  • initial_key:

    The key associated with the key event.

key_event (
    const key_event& other
)

Copy-constructs a key_event from an existing one.

Parameters:
  • other:

    The key_event to copy from.

key_event&
operator = (
    const key_event& other
)

Copy-assigns a key_event into this one.

Parameters:
  • other:

    The key_event to copy from.

key_event (
    key_event&& other
)
noexcept

Move-constructs a key_event from an existing one.

Parameters:
  • other:

    The key_event to move from.

key_event&
operator = (
    key_event&& other
)
noexcept

Move-assigns a key_event into this one.

Parameters:
  • other:

    The key_event to move from.

key_event_type
get_key_event_type ()
const noexcept

Returns the key event type of this key_event.

key
get_key ()
const noexcept

Returns the key that was pressed or released.



Copyright © 2022-2025 Daniel T. McGinnis

CCL was first published in 2022, and is still actively maintained.

This website was first published in 2022, and is still actively maintained.

This specific web page was first published in 2023.