QtCraft API C++ classes QML types Handbook

QcKeyLabels Class

Texts the UI shows for keys and actions, in the UI language. More...

Header: #include <clientcore/settings/QcKeyLabels.h>

Static Public Members

QString action(QcKeyBindings::Action action)
QString key(int key)

Detailed Description

Key names follow the platform: on macOS Qt::Key_Control is the Cmd key and Qt::Key_Meta the Control key.

Member Function Documentation

[static] QString QcKeyLabels::action(QcKeyBindings::Action action)

Returns the text of action: "Camera view", "Hotbar slot 3", ...

[static] QString QcKeyLabels::key(int key)

Returns the text of key (a Qt::Key): "V", "F5", "Space", "Cmd", ...; "–" for no key.