---
name: "CL_InputBuffer"
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_InputBuffer"
---

# CL\_InputBuffer(3)

Input buffer interface.

## NAME

CL\_InputBuffer - Input buffer interface.

## DESCRIPTION

Use this class to read buffered keys from the keyboard (or any other device).

Inherited from CL\_Event\_ButtonPress, CL\_Event\_ButtonRelease

## CLASS MEMBERS

- **CL\_InputBuffer**()

  - **CL\_InputBuffer**(

  ```
  CL_InputDevice *device)
  ```

- virtual **~CL\_InputBuffer**()

  - CL\_Key **peek\_key**()

  - CL\_Key **get\_key**()

  - int **keys\_left**()

  - void **clear**()

  ## MEMBERS WITH DESCRIPTIONS

- **CL\_InputBuffer**()

  ```
  Description:
  ```

  Constructs an input buffer that attaches itself to the first keyboard.

- **CL\_InputBuffer**(

  ```
  CL_InputDevice *device)
  ```

  ```
  Description:
  ```

  Constructs an input buffer that attaches itself to the specified device.

- virtual **~CL\_InputBuffer**()

  ```
  Description:
  ```

- CL\_Key **peek\_key**()

  ```
  Description:
  ```

  Returns the next key in the buffer, but unlike get\_key() it does not pop it from the input buffer.

- CL\_Key **get\_key**()

  ```
  Description:
  ```

  Pops the next key in the buffer and returns it.

- int **keys\_left**()

  ```
  Description:
  ```

  Returns number of keys still available in the buffer.

  ```
  Return value:
  ```

  Number of key values lefts in buffer.

- void **clear**()

  ```
  Description:
  ```

  Clears the buffer. After this, the buffer will not contain any keys. implementation:

## 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.
