The open source OpenXR runtime

a/bindings: Add MNDX_oculus_remote extension

This adds an extension for the Oculus Rift Remote, a small 9 button, 0dof remote that shipped with early Oculus Rift CV1 units.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2487>

authored by

Beyley Cardellio and committed by
Marge Bot
c5726d59 006ab687

+156 -3
+1
scripts/generate_oxr_ext_support.py
··· 96 96 ['XR_HTC_vive_cosmos_controller_interaction', 'XRT_FEATURE_OPENXR_INTERACTION_VIVE_COSMOS'], 97 97 ['XR_HTC_vive_focus3_controller_interaction', 'XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3'], 98 98 ['XR_MNDX_ball_on_a_stick_controller', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'], 99 + ['XR_MNDX_oculus_remote', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'], 99 100 ['XR_MNDX_egl_enable', 'XR_USE_PLATFORM_EGL', 'XR_USE_GRAPHICS_API_OPENGL'], 100 101 ['XR_MNDX_force_feedback_curl', 'XRT_FEATURE_OPENXR_FORCE_FEEDBACK_CURL'], 101 102 ['XR_MNDX_hydra', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'],
+26
src/external/openxr_includes/openxr/XR_MNDX_oculus_remote.h
··· 1 + // Copyright 2025, Beyley Cardellio 2 + // SPDX-License-Identifier: BSL-1.0 3 + /*! 4 + * @file 5 + * @brief Preview header for XR_MNDX_oculus_remote extension 6 + * @author Beyley Cardellio <ep1cm1n10n123@gmail.com> 7 + * @ingroup external_openxr 8 + */ 9 + #ifndef XR_MNDX_OCULUS_REMOTE_H 10 + #define XR_MNDX_OCULUS_REMOTE_H 1 11 + 12 + #include <openxr/openxr.h> 13 + 14 + #ifdef __cplusplus 15 + extern "C" { 16 + #endif 17 + 18 + #define XR_MNDX_oculus_remote 1 19 + #define XR_MNDX_oculus_remote_SPEC_VERSION 1 20 + #define XR_MNDX_OCULUS_REMOTE_EXTENSION_NAME "XR_MNDX_oculus_remote" 21 + 22 + #ifdef __cplusplus 23 + } 24 + #endif 25 + 26 + #endif
+104 -2
src/xrt/auxiliary/bindings/bindings.json
··· 3637 3637 } 3638 3638 } 3639 3639 } 3640 - } 3640 + }, 3641 3641 3642 - 3642 + "/interaction_profiles/mndx/oculus_remote": { 3643 + "title": "Oculus Rift Remote", 3644 + "type": "untracked_controller", 3645 + "steamvr_controllertype": "gamepad", 3646 + "extension": "MNDX_oculus_remote", 3647 + "monado_device": "XRT_DEVICE_RIFT_REMOTE", 3648 + "extended_by": [], 3649 + "subaction_paths": [ 3650 + "/user/gamepad" 3651 + ], 3652 + "subpaths": { 3653 + "/input/select": { 3654 + "type": "button", 3655 + "localized_name": "Select", 3656 + "components": [ 3657 + "click" 3658 + ], 3659 + "monado_bindings": { 3660 + "click": "XRT_INPUT_RIFT_REMOTE_SELECT_CLICK" 3661 + } 3662 + }, 3663 + "/input/back": { 3664 + "type": "button", 3665 + "localized_name": "Back", 3666 + "components": [ 3667 + "click" 3668 + ], 3669 + "monado_bindings": { 3670 + "click": "XRT_INPUT_RIFT_REMOTE_BACK_CLICK" 3671 + } 3672 + }, 3673 + "/input/volume_up": { 3674 + "type": "button", 3675 + "localized_name": "Volume up", 3676 + "components": [ 3677 + "click" 3678 + ], 3679 + "monado_bindings": { 3680 + "click": "XRT_INPUT_RIFT_REMOTE_VOLUME_UP_CLICK" 3681 + } 3682 + }, 3683 + "/input/volume_down": { 3684 + "type": "button", 3685 + "localized_name": "Volume down", 3686 + "components": [ 3687 + "click" 3688 + ], 3689 + "monado_bindings": { 3690 + "click": "XRT_INPUT_RIFT_REMOTE_VOLUME_DOWN_CLICK" 3691 + } 3692 + }, 3693 + "/input/system": { 3694 + "type": "button", 3695 + "localized_name": "Oculus", 3696 + "components": [ 3697 + "click" 3698 + ], 3699 + "monado_bindings": { 3700 + "click": "XRT_INPUT_RIFT_REMOTE_OCULUS_CLICK" 3701 + } 3702 + }, 3703 + "/input/dpad_down": { 3704 + "type": "button", 3705 + "localized_name": "Navigation down", 3706 + "components": [ 3707 + "click" 3708 + ], 3709 + "monado_bindings": { 3710 + "click": "XRT_INPUT_RIFT_REMOTE_DPAD_DOWN_CLICK" 3711 + } 3712 + }, 3713 + "/input/dpad_right": { 3714 + "type": "button", 3715 + "localized_name": "Navigation right", 3716 + "components": [ 3717 + "click" 3718 + ], 3719 + "monado_bindings": { 3720 + "click": "XRT_INPUT_RIFT_REMOTE_DPAD_RIGHT_CLICK" 3721 + } 3722 + }, 3723 + "/input/dpad_up": { 3724 + "type": "button", 3725 + "localized_name": "Navigation up", 3726 + "components": [ 3727 + "click" 3728 + ], 3729 + "monado_bindings": { 3730 + "click": "XRT_INPUT_RIFT_REMOTE_DPAD_UP_CLICK" 3731 + } 3732 + }, 3733 + "/input/dpad_left": { 3734 + "type": "button", 3735 + "localized_name": "Navigation left", 3736 + "components": [ 3737 + "click" 3738 + ], 3739 + "monado_bindings": { 3740 + "click": "XRT_INPUT_RIFT_REMOTE_DPAD_LEFT_CLICK" 3741 + } 3742 + } 3743 + } 3744 + } 3643 3745 3644 3746 } 3645 3747 }
+12 -1
src/xrt/include/xrt/xrt_defines.h
··· 746 746 XRT_DEVICE_PSMV, 747 747 XRT_DEVICE_PSSENSE, 748 748 XRT_DEVICE_HYDRA, 749 + XRT_DEVICE_RIFT_REMOTE, 749 750 750 751 // Other misc stuff. 751 752 XRT_DEVICE_HAND_TRACKER, ··· 1290 1291 _(XRT_INPUT_TOUCH_PLUS_AIM_POSE , XRT_INPUT_NAME(0x0E14, POSE)) \ 1291 1292 _(XRT_INPUT_TOUCH_PLUS_THUMB_PROXIMITY , XRT_INPUT_NAME(0x0E15, BOOLEAN)) \ 1292 1293 _(XRT_INPUT_TOUCH_PLUS_TRIGGER_CURL , XRT_INPUT_NAME(0x0E16, VEC1_ZERO_TO_ONE)) \ 1293 - _(XRT_INPUT_TOUCH_PLUS_TRIGGER_SLIDE , XRT_INPUT_NAME(0x0E17, VEC1_ZERO_TO_ONE)) 1294 + _(XRT_INPUT_TOUCH_PLUS_TRIGGER_SLIDE , XRT_INPUT_NAME(0x0E17, VEC1_ZERO_TO_ONE)) \ 1295 + \ 1296 + _(XRT_INPUT_RIFT_REMOTE_SELECT_CLICK , XRT_INPUT_NAME(0x0F00, BOOLEAN)) \ 1297 + _(XRT_INPUT_RIFT_REMOTE_BACK_CLICK , XRT_INPUT_NAME(0x0F01, BOOLEAN)) \ 1298 + _(XRT_INPUT_RIFT_REMOTE_VOLUME_UP_CLICK , XRT_INPUT_NAME(0x0F02, BOOLEAN)) \ 1299 + _(XRT_INPUT_RIFT_REMOTE_VOLUME_DOWN_CLICK , XRT_INPUT_NAME(0x0F03, BOOLEAN)) \ 1300 + _(XRT_INPUT_RIFT_REMOTE_OCULUS_CLICK , XRT_INPUT_NAME(0x0F04, BOOLEAN)) \ 1301 + _(XRT_INPUT_RIFT_REMOTE_DPAD_DOWN_CLICK , XRT_INPUT_NAME(0x0F05, BOOLEAN)) \ 1302 + _(XRT_INPUT_RIFT_REMOTE_DPAD_RIGHT_CLICK , XRT_INPUT_NAME(0x0F06, BOOLEAN)) \ 1303 + _(XRT_INPUT_RIFT_REMOTE_DPAD_UP_CLICK , XRT_INPUT_NAME(0x0F07, BOOLEAN)) \ 1304 + _(XRT_INPUT_RIFT_REMOTE_DPAD_LEFT_CLICK , XRT_INPUT_NAME(0x0F08, BOOLEAN)) 1294 1305 1295 1306 // clang-format on 1296 1307
+1
src/xrt/include/xrt/xrt_openxr_includes.h
··· 68 68 #include "openxr/XR_MNDX_xdev_space.h" 69 69 #include "openxr/XR_MNDX_system_buttons.h" 70 70 #include "openxr/XR_MNDX_ball_on_a_stick_controller.h" 71 + #include "openxr/XR_MNDX_oculus_remote.h"
+12
src/xrt/state_trackers/oxr/oxr_extension_support.h
··· 740 740 741 741 742 742 /* 743 + * XR_MNDX_oculus_remote 744 + */ 745 + #if defined(XR_MNDX_oculus_remote) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX) 746 + #define OXR_HAVE_MNDX_oculus_remote 747 + #define OXR_EXTENSION_SUPPORT_MNDX_oculus_remote(_) _(MNDX_oculus_remote, MNDX_OCULUS_REMOTE) 748 + #else 749 + #define OXR_EXTENSION_SUPPORT_MNDX_oculus_remote(_) 750 + #endif 751 + 752 + 753 + /* 743 754 * XR_MNDX_egl_enable 744 755 */ 745 756 #if defined(XR_MNDX_egl_enable) && defined(XR_USE_PLATFORM_EGL) && defined(XR_USE_GRAPHICS_API_OPENGL) ··· 880 891 OXR_EXTENSION_SUPPORT_HTC_vive_cosmos_controller_interaction(_) \ 881 892 OXR_EXTENSION_SUPPORT_HTC_vive_focus3_controller_interaction(_) \ 882 893 OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \ 894 + OXR_EXTENSION_SUPPORT_MNDX_oculus_remote(_) \ 883 895 OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) \ 884 896 OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) \ 885 897 OXR_EXTENSION_SUPPORT_MNDX_hydra(_) \