---
name: "CL_EventChain_ButtonPress"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_EventChain_ButtonPress"
---

# CL\_EventChain\_ButtonPress(3)

Event sending interface for button presses.

## NAME

CL\_EventChain\_ButtonPress - Event sending interface for button presses.

## DESCRIPTION

Event chains are used to route an event to an event listener. The toplevel event chain for button presses, located in CL\_Input, is called by ClanLib, but you can also send false events by calling on\_button\_press() yourself. Note that CL\_EventChain\_ButtonPress is inheriated from CL\_EventButtonPress, so you can add a chain to the toplevel chain. This is useful, if you want to do more advanced routing of events.

Inherited from public CL\_EventChain\<CL\_Event\_ButtonPress\*\>, public CL\_Event\_ButtonPress

## CLASS MEMBERS

- virtual bool **on\_button\_press**(

  ```
   CL_InputDevice *device,
  const CL_Key &key)
  ```

## MEMBERS WITH DESCRIPTIONS

- virtual bool **on\_button\_press**(

  ```
   CL_InputDevice *device,
  const CL_Key &key)
  ```

  ```
  Parameters:
  device - Input device that triggered the event.
  key - Key/button that triggered the event.
  ```

  ```
  Description:
  ```

  Call this function to send a button press event down through the event chain.

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
