@@ -206,8 +206,8 @@ int KeyNameToKeyCode(std::string KeyName) {
206
206
else if (KeyName == " I" ) return ' I' ;
207
207
else if (KeyName == " O" ) return ' O' ;
208
208
else if (KeyName == " P" ) return ' P' ;
209
- else if (KeyName == " [" ) return ' [ ' ;
210
- else if (KeyName == " ]" ) return ' ] ' ;
209
+ else if (KeyName == " [" ) return 219 ;
210
+ else if (KeyName == " ]" ) return 221 ;
211
211
else if (KeyName == " A" ) return ' A' ;
212
212
else if (KeyName == " S" ) return ' S' ;
213
213
else if (KeyName == " D" ) return ' D' ;
@@ -217,8 +217,8 @@ int KeyNameToKeyCode(std::string KeyName) {
217
217
else if (KeyName == " J" ) return ' J' ;
218
218
else if (KeyName == " K" ) return ' K' ;
219
219
else if (KeyName == " L" ) return ' L' ;
220
- else if (KeyName == " ; " ) return 186 ;
221
- else if (KeyName == " ' " ) return 222 ;
220
+ else if (KeyName == " : " ) return 186 ;
221
+ else if (KeyName == " APOSTROPHE " ) return 222 ;
222
222
else if (KeyName == " \\ " ) return 220 ;
223
223
else if (KeyName == " Z" ) return ' Z' ;
224
224
else if (KeyName == " X" ) return ' X' ;
@@ -329,6 +329,24 @@ class CSampleDeviceDriver : public vr::ITrackedDeviceServerDriver, public vr::IV
329
329
330
330
vr::VRProperties ()->SetStringProperty ( m_ulPropertyContainer, Prop_ModelNumber_String, m_sModelNumber.c_str () );
331
331
vr::VRProperties ()->SetStringProperty ( m_ulPropertyContainer, Prop_RenderModelName_String, m_sModelNumber.c_str () );
332
+
333
+ vr::VRProperties ()->SetStringProperty (m_ulPropertyContainer, Prop_SerialNumber_String, m_sSerialNumber.c_str ());
334
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, Prop_WillDriftInYaw_Bool, false );
335
+ vr::VRProperties ()->SetStringProperty (m_ulPropertyContainer, Prop_ManufacturerName_String, " OpenVR-OpenTrack" );
336
+ vr::VRProperties ()->SetStringProperty (m_ulPropertyContainer, Prop_TrackingFirmwareVersion_String, " 1.0" );
337
+ vr::VRProperties ()->SetStringProperty (m_ulPropertyContainer, Prop_HardwareRevision_String, " 1.0" );
338
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, Prop_DeviceIsWireless_Bool, false );
339
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, Prop_DeviceIsCharging_Bool, false );
340
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, Prop_CanUnifyCoordinateSystemWithHmd_Bool, true );
341
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, Prop_ContainsProximitySensor_Bool, false );
342
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, Prop_DeviceCanPowerOff_Bool, false );
343
+ vr::VRProperties ()->SetInt32Property (m_ulPropertyContainer, vr::Prop_DeviceClass_Int32, vr::TrackedDeviceClass_HMD);
344
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, vr::Prop_HasCamera_Bool, false );
345
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, vr::Prop_Firmware_ForceUpdateRequired_Bool, false );
346
+ vr::VRProperties ()->SetStringProperty (m_ulPropertyContainer, vr::Prop_RegisteredDeviceType_String, " HMD" );
347
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, vr::Prop_NeverTracked_Bool, false );
348
+ vr::VRProperties ()->SetBoolProperty (m_ulPropertyContainer, vr::Prop_Identifiable_Bool, false );
349
+
332
350
vr::VRProperties ()->SetFloatProperty ( m_ulPropertyContainer, Prop_UserIpdMeters_Float, m_flIPD );
333
351
vr::VRProperties ()->SetFloatProperty ( m_ulPropertyContainer, Prop_UserHeadToEyeDepthMeters_Float, 0 .f );
334
352
vr::VRProperties ()->SetFloatProperty ( m_ulPropertyContainer, Prop_DisplayFrequency_Float, m_flDisplayFrequency );
@@ -511,6 +529,9 @@ class CSampleDeviceDriver : public vr::ITrackedDeviceServerDriver, public vr::IV
511
529
512
530
pose.qWorldFromDriverRotation = HmdQuaternion_Init (1 , 0 , 0 , 0 );
513
531
pose.qDriverFromHeadRotation = HmdQuaternion_Init (1 , 0 , 0 , 0 );
532
+ pose.shouldApplyHeadModel = true ;
533
+ pose.poseTimeOffset = 0 ;
534
+ pose.willDriftInYaw = false ;
514
535
515
536
// Set head tracking rotation
516
537
pose.qRotation = EulerAngleToQuaternion (Roll, -Yaw, Pitch);
0 commit comments