### Function

# WPEPlatform Event keyboard_new

#### Declaration [src]

    WPEEvent*
    wpe_event_keyboard_new (
      WPEEventType type,
      WPEView* view,
      WPEInputSource source,
      guint32 time,
      WPEModifiers modifiers,
      guint keycode,
      guint keyval
    )

#### Description [src]

Create a `WPEEvent` for a keyboard key press or release.

#### Parameters

`type`

  Type: `WPEEventType`

  A `WPEEventType` (`WPE_EVENT_KEYBOARD_KEY_DOWN` or `WPE_EVENT_KEYBOARD_KEY_UP`).

`view`

  Type: `WPEView`

  A `WPEView`.

  The data is owned by the caller of the function.

`source`

  Type: `WPEInputSource`

  A `WPEInputSource`.

`time`

  Type: `guint32`

  The event timestamp.

`modifiers`

  Type: `WPEModifiers`

  A `WPEModifiers`.

`keycode`

  Type: `guint`

  The hardware key code.

`keyval`

  Type: `guint`

  The translated key value.

#### Return value

Type: `WPEEvent`

A new allocated `WPEEvent`.

The caller of the function takes ownership of the data, and is responsible for freeing it.