Add Pyramid/Box buttons to keybindings (#118)

This commit is contained in:
Lasath Fernando 2019-12-01 13:53:01 -08:00 committed by Florian Märkl
commit be824917b0
2 changed files with 21 additions and 2 deletions

View file

@ -21,7 +21,14 @@ The following features however are yet to be implemented:
* H264 Error Concealment (FEC and active error recovery however are implemented)
* Touchpad support (Triggering the Touchpad Button is currently possible by pressing `T` on the keyboard)
* Rumble
* Configurable Keybindings
* Configurable Keybindings. Though, for the moment you can use the following:
* `⏎` -> Cross
* `⌫` -> Moon
* `\` or `X` -> Box
* `]` or `C` -> Pyramid
* `F` or `[` -> Share
* `⇦⇧⇩⇨` -> D-Pad
* `Esc` -> PS
## Installing

View file

@ -164,6 +164,18 @@ void StreamSession::HandleKeyboardEvent(QKeyEvent *event)
case Qt::Key::Key_Backspace:
button_mask = CHIAKI_CONTROLLER_BUTTON_MOON;
break;
case Qt::Key::Key_Backslash:
case Qt::Key::Key_X:
button_mask = CHIAKI_CONTROLLER_BUTTON_BOX;
break;
case Qt::Key::Key_C:
case Qt::Key::Key_BracketRight:
button_mask = CHIAKI_CONTROLLER_BUTTON_PYRAMID;
break;
case Qt::Key::Key_F:
case Qt::Key::Key_BracketLeft:
button_mask = CHIAKI_CONTROLLER_BUTTON_SHARE;
break;
case Qt::Key::Key_Escape:
button_mask = CHIAKI_CONTROLLER_BUTTON_PS;
break;
@ -384,4 +396,4 @@ static void EventCb(ChiakiEvent *event, void *user)
{
auto session = reinterpret_cast<StreamSession *>(user);
StreamSessionPrivate::Event(session, event);
}
}