QWaylandKeyboard Class

The QWaylandKeyboard class represents a keyboard device. More...

Header: #include <QWaylandKeyboard>
qmake: QT += waylandcompositor
Since: Qt 5.8
Inherits: QWaylandObject

Properties

  • 1 property inherited from QObject

Public Functions

QWaylandKeyboard(QWaylandSeat *seat, QObject *parent = nullptr)
QWaylandCompositor *compositor() const
QWaylandSurface *focus() const
QWaylandClient *focusClient() const
uint keyToScanCode(int qtKey) const
quint32 repeatDelay() const
quint32 repeatRate() const
QWaylandSeat *seat() const
virtual void sendKeyModifiers(QWaylandClient *client, uint32_t serial)
virtual void sendKeyPressEvent(uint code)
virtual void sendKeyReleaseEvent(uint code)
virtual void setFocus(QWaylandSurface *surface)
void setRepeatDelay(quint32 delay)
void setRepeatRate(quint32 rate)
  • 31 public functions inherited from QObject

Signals

void focusChanged(QWaylandSurface *surface)
void repeatDelayChanged(quint32 repeatDelay)
void repeatRateChanged(quint32 repeatRate)

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QWaylandKeyboard class represents a keyboard device.

This class provides access to the keyboard device in a QWaylandSeat. It corresponds to the Wayland interface wl_keyboard.

Property Documentation

repeatDelay : quint32

Access functions:

quint32 repeatDelay() const
void setRepeatDelay(quint32 delay)

Notifier signal:

void repeatDelayChanged(quint32 repeatDelay)

repeatRate : quint32

Access functions:

quint32 repeatRate() const
void setRepeatRate(quint32 rate)

Notifier signal:

void repeatRateChanged(quint32 repeatRate)

Member Function Documentation

QWaylandKeyboard::QWaylandKeyboard(QWaylandSeat *seat, QObject *parent = nullptr)

Constructs a QWaylandKeyboard for the given seat and with the given parent.

QWaylandCompositor *QWaylandKeyboard::compositor() const

Returns the compositor for this QWaylandKeyboard.

QWaylandSurface *QWaylandKeyboard::focus() const

Returns the currently focused surface.

See also setFocus().

[signal] void QWaylandKeyboard::focusChanged(QWaylandSurface *surface)

QWaylandClient *QWaylandKeyboard::focusClient() const

Returns the client that currently has keyboard focus.

uint QWaylandKeyboard::keyToScanCode(int qtKey) const

quint32 QWaylandKeyboard::repeatDelay() const

Returns the current repeat delay.

Note: Getter function for property repeatDelay.

See also setRepeatDelay().

quint32 QWaylandKeyboard::repeatRate() const

Returns the current repeat rate.

Note: Getter function for property repeatRate.

See also setRepeatRate().

QWaylandSeat *QWaylandKeyboard::seat() const

Returns the seat for this QWaylandKeyboard.

[virtual] void QWaylandKeyboard::sendKeyModifiers(QWaylandClient *client, uint32_t serial)

[virtual] void QWaylandKeyboard::sendKeyPressEvent(uint code)

Sends a key press event with the key code to the current keyboard focus.

[virtual] void QWaylandKeyboard::sendKeyReleaseEvent(uint code)

Sends a key release event with the key code to the current keyboard focus.

[virtual] void QWaylandKeyboard::setFocus(QWaylandSurface *surface)

Sets the current focus to surface.

See also focus().

void QWaylandKeyboard::setRepeatDelay(quint32 delay)

Sets the repeat delay to delay.

Note: Setter function for property repeatDelay.

See also repeatDelay().

void QWaylandKeyboard::setRepeatRate(quint32 rate)

Sets the repeat rate to rate.

Note: Setter function for property repeatRate.

See also repeatRate().

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.