Keyboard And Documentation update (#469)

* changed action names

* updated settings for new action key

* updated keyboard input guide

* updated readme top

* updated appveyor link

* fixed qml issue and some formatting

* updated screenshots

* updated documentation portion of readme

* fix qml issues
This commit is contained in:
ykeara
2020-06-06 14:18:21 -05:00
committed by GitHub
parent 3857c2ac2f
commit 88a1c002c4
20 changed files with 194 additions and 93 deletions
+6 -6
View File
@@ -138,8 +138,8 @@ SteamIVRInput::SteamIVRInput()
m_keyboardOne( action_keys::keyboardOne ),
m_keyboardTwo( action_keys::keyboardTwo ),
m_keyboardThree( action_keys::keyboardThree ),
m_keyboardPressOne( action_keys::keyboardPressOne ),
m_keyboardPressTwo( action_keys::keyboardPressTwo ),
m_keyPressMisc( action_keys::keyPressMisc ),
m_keyPressSystem( action_keys::keyPressSystem ),
m_chaperoneToggle( action_keys::chaperoneToggle ),
m_pushToTalk( action_keys::pushToTalk ),
m_leftHaptic( action_keys::hapticsLeft ),
@@ -351,13 +351,13 @@ bool SteamIVRInput::keyboardThree()
{
return isDigitalActionActivatedOnce( m_keyboardThree );
}
bool SteamIVRInput::keyboardPressOne()
bool SteamIVRInput::keyPressMisc()
{
return isDigitalActionActivatedConstant( m_keyboardPressOne );
return isDigitalActionActivatedConstant( m_keyPressMisc );
}
bool SteamIVRInput::keyboardPressTwo()
bool SteamIVRInput::keyPressSystem()
{
return isDigitalActionActivatedConstant( m_keyboardPressTwo );
return isDigitalActionActivatedConstant( m_keyPressSystem );
}
/*!
+6 -6
View File
@@ -55,8 +55,8 @@ namespace action_keys
constexpr auto keyboardOne = "/actions/misc/in/KeyboardOne";
constexpr auto keyboardTwo = "/actions/misc/in/KeyboardTwo";
constexpr auto keyboardThree = "/actions/misc/in/KeyboardThree";
constexpr auto keyboardPressOne = "/actions/misc/in/KeyboardPressOne";
constexpr auto keyboardPressTwo = "/actions/misc/in/KeyboardPressTwo";
constexpr auto keyPressMisc = "/actions/misc/in/KeyPressMisc";
constexpr auto keyPressSystem = "/actions/system/in/KeyPressSystem";
constexpr auto hapticsLeft = "/actions/haptic/out/HapticsLeft";
constexpr auto hapticsRight = "/actions/haptic/out/HapticsRight";
@@ -160,8 +160,8 @@ public:
bool keyboardOne();
bool keyboardTwo();
bool keyboardThree();
bool keyboardPressOne();
bool keyboardPressTwo();
bool keyPressMisc();
bool keyPressSystem();
vr::VRActionHandle_t leftHapticActionHandle();
vr::VRActionHandle_t rightHapticActionHandle();
@@ -229,8 +229,8 @@ private:
DigitalAction m_keyboardOne;
DigitalAction m_keyboardTwo;
DigitalAction m_keyboardThree;
DigitalAction m_keyboardPressOne;
DigitalAction m_keyboardPressTwo;
DigitalAction m_keyPressMisc;
DigitalAction m_keyPressSystem;
// Misc Bindings
DigitalAction m_chaperoneToggle;
+8 -8
View File
@@ -704,33 +704,33 @@ void OverlayController::processKeyboardBindings()
sendStringAsInput( commands );
}
// Press Key One
if ( m_actions.keyboardPressOne() && !m_keyPressOneState )
if ( m_actions.keyPressMisc() && !m_keyPressOneState )
{
const auto commands = settings::getSetting(
settings::StringSetting::KEYBOARDSHORTCUT_keyboardPressOne );
settings::StringSetting::KEYBOARDSHORTCUT_keyPressMisc );
sendFirstCharAsInput( commands, KeyStatus::Down );
m_keyPressOneState = true;
}
if ( m_keyPressOneState && !m_actions.keyboardPressOne() )
if ( m_keyPressOneState && !m_actions.keyPressMisc() )
{
const auto commands = settings::getSetting(
settings::StringSetting::KEYBOARDSHORTCUT_keyboardPressOne );
settings::StringSetting::KEYBOARDSHORTCUT_keyPressMisc );
sendFirstCharAsInput( commands, KeyStatus::Up );
m_keyPressOneState = false;
}
// Press Key Two
if ( m_actions.keyboardPressTwo() && !m_keyPressTwoState )
if ( m_actions.keyPressSystem() && !m_keyPressTwoState )
{
const auto commands = settings::getSetting(
settings::StringSetting::KEYBOARDSHORTCUT_keyboardPressTwo );
settings::StringSetting::KEYBOARDSHORTCUT_keyPressSystem );
sendFirstCharAsInput( commands, KeyStatus::Down );
m_keyPressTwoState = true;
}
if ( m_keyPressTwoState && !m_actions.keyboardPressTwo() )
if ( m_keyPressTwoState && !m_actions.keyPressSystem() )
{
const auto commands = settings::getSetting(
settings::StringSetting::KEYBOARDSHORTCUT_keyboardPressTwo );
settings::StringSetting::KEYBOARDSHORTCUT_keyPressSystem );
sendFirstCharAsInput( commands, KeyStatus::Up );
m_keyPressTwoState = false;
}
+4 -4
View File
@@ -206,12 +206,12 @@
"type": "boolean"
},
{
"name": "/actions/misc/in/KeyboardPressOne",
"name": "/actions/misc/in/KeyPressMisc",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/misc/in/KeyboardPressTwo",
"name": "/actions/system/in/KeyPressSystem",
"requirement": "optional",
"type": "boolean"
}
@@ -289,8 +289,8 @@
"/actions/misc/in/KeyboardOne" : "Keyboard Shortcut One",
"/actions/misc/in/KeyboardTwo" : "Keyboard Shortcut Two",
"/actions/misc/in/KeyboardThree" : "Keyboard Shortcut Three",
"/actions/misc/in/KeyboardPressOne": "Keyboard Press One",
"/actions/misc/in/KeyboardPressTwo": "Keyboard Press Two"
"/actions/misc/in/KeyPressMisc": "Key Press Misc",
"/actions/system/in/KeyPressSystem": "Key Press System"
}
]
}
+1 -2
View File
@@ -4,8 +4,7 @@ import QtQuick.Layouts 1.3
import ovras.advsettings 1.0
MyComboBox {
textRole: "text"
valueRole: "value"
model: [
{ value: 0, text: "00" },
{ value: 1, text: "01" },
+1 -2
View File
@@ -4,8 +4,7 @@ import QtQuick.Layouts 1.3
import ovras.advsettings 1.0
MyComboBox {
textRole: "text"
valueRole: "value"
model: [
{ value: 0, text: "00" },
{ value: 1, text: "01" },
-1
View File
@@ -6,7 +6,6 @@ import "." // QTBUG-34418, singletons require explicit import to load qmldir fil
ComboBox {
id: myComboBox
hoverEnabled: true
background: Rectangle {
color: parent.pressed ? "#406288" : (parent.activeFocus ? "#365473" : "#2c435d")
}
+6
View File
@@ -8,6 +8,7 @@ RowLayout {
HourComboBox {
id: hourBox
Layout.preferredWidth: 60
onActivated: {
parent.timeChanged(hourBox.currentIndex,
minuteBox.currentIndex,
@@ -20,6 +21,7 @@ RowLayout {
MinuteSecondComboBox {
id: minuteBox
Layout.preferredWidth: 60
onActivated: {
parent.timeChanged(hourBox.currentIndex,
minuteBox.currentIndex,
@@ -32,6 +34,7 @@ RowLayout {
MinuteSecondComboBox {
id: secondBox
Layout.preferredWidth: 60
onActivated: {
parent.timeChanged(hourBox.currentIndex,
minuteBox.currentIndex,
@@ -45,5 +48,8 @@ RowLayout {
hourBox.currentIndex = hour
minuteBox.currentIndex = minute
secondBox.currentIndex = second
hourBox.displayText = hour
minuteBox.displayText = minute
secondBox.displayText = second
}
}
@@ -10,7 +10,7 @@ GroupBox {
label: MyText {
leftPadding: 10
text: "Clock"
text: "Alarm Clock"
bottomPadding: -10
}
background: Rectangle {
@@ -78,14 +78,14 @@ GroupBox {
MyPushButton2 {
text: "+5 Min"
Layout.preferredWidth: 120
Layout.preferredWidth: 110
onClicked: {
VrAlarm.modAlarmTime(0, 5, 0)
}
}
MyPushButton2 {
Layout.preferredWidth: 120
Layout.preferredWidth: 110
text: "-5 Min"
onClicked: {
VrAlarm.modAlarmTime(0, -5, 0)
+7 -7
View File
@@ -481,7 +481,7 @@ private:
constexpr static auto stringSettingsSize
= static_cast<int>( StringSetting::LAST_ENUMERATOR ) + 1;
constexpr static auto discordDefaultMuteKeybinding = "^>m";
constexpr static auto pressDefaultOne = "F9";
constexpr static auto pressDefault = "F9";
std::array<StringSettingValue, stringSettingsSize> m_stringSettings{
StringSettingValue{ StringSetting::KEYBOARDSHORTCUT_keyboardOne,
SettingCategory::KeyboardShortcut,
@@ -495,14 +495,14 @@ private:
SettingCategory::KeyboardShortcut,
QtInfo{ "keyboardThree" },
discordDefaultMuteKeybinding },
StringSettingValue{ StringSetting::KEYBOARDSHORTCUT_keyboardPressOne,
StringSettingValue{ StringSetting::KEYBOARDSHORTCUT_keyPressMisc,
SettingCategory::KeyboardShortcut,
QtInfo{ "keyboardPressOne" },
pressDefaultOne },
StringSettingValue{ StringSetting::KEYBOARDSHORTCUT_keyboardPressTwo,
QtInfo{ "keyPressmisc" },
pressDefault },
StringSettingValue{ StringSetting::KEYBOARDSHORTCUT_keyPressSystem,
SettingCategory::KeyboardShortcut,
QtInfo{ "keyboardPressTwo" },
pressDefaultOne },
QtInfo{ "keyPressSystem" },
pressDefault },
};
constexpr static auto intSettingsSize
+3 -3
View File
@@ -90,10 +90,10 @@ enum class StringSetting
KEYBOARDSHORTCUT_keyboardOne,
KEYBOARDSHORTCUT_keyboardTwo,
KEYBOARDSHORTCUT_keyboardThree,
KEYBOARDSHORTCUT_keyboardPressOne,
KEYBOARDSHORTCUT_keyboardPressTwo,
KEYBOARDSHORTCUT_keyPressMisc,
KEYBOARDSHORTCUT_keyPressSystem,
// LAST_ENUMERATOR must always be set to the last value
LAST_ENUMERATOR = KEYBOARDSHORTCUT_keyboardPressTwo,
LAST_ENUMERATOR = KEYBOARDSHORTCUT_keyPressSystem,
};
enum class IntSetting
@@ -27,7 +27,6 @@ private:
OverlayController* parent;
bool m_autoStartEnabled = false;
bool m_nativeChaperoneToggle = false;
public:
void initStage1();