Remove unsupported buttons on the SpaceMouse enterprise joystick

* GLFW cannot detect the buttons for the enterprise version of the
  SpaceMouse
This commit is contained in:
Malin E
2022-04-27 11:21:56 +02:00
parent 7912141099
commit 55278574e9
2 changed files with 4 additions and 32 deletions

View File

@@ -29,8 +29,8 @@ local SpaceMouse = {
Twist = {5}, -- left/right
Tilt = {4, 3}, -- left/right, back/forth
LeftButton = 0,
RightButton = 1
-- Buttons on the Enterprise version of the SpaceMouse is not detectable, use regular
-- keybindings instead, for more information see our wiki page.
}
asset.onInitialize(function()
@@ -51,18 +51,4 @@ asset.onInitialize(function()
openspace.navigation.bindJoystickAxis(name, controller.Tilt[2], "Pan Y");
openspace.navigation.bindJoystickAxis(name, controller.Push[3], "Zoom");
openspace.navigation.bindJoystickAxis(name, controller.Tilt[1], "LocalRoll X");
openspace.navigation.bindJoystickButton(
name,
controller.LeftButton,
joystickHelper.permaBindLocalRoll(name, controller.Tilt[1]),
"Switch to local roll mode"
)
openspace.navigation.bindJoystickButton(
name,
controller.RightButton,
joystickHelper.permaBindGlobalRoll(name, controller.Tilt[1]),
"Switch to global roll mode"
)
end)

View File

@@ -29,8 +29,8 @@ local SpaceMouse = {
Twist = {5}, -- left/right
Tilt = {4, 3}, -- left/right, back/forth
LeftButton = 0,
RightButton = 1
-- Buttons on the Enterprise version of the SpaceMouse is not detectable, use regular
-- keybindings instead, for more information see our wiki page.
}
asset.onInitialize(function()
@@ -51,18 +51,4 @@ asset.onInitialize(function()
openspace.navigation.bindJoystickAxis(name, controller.Tilt[2], "Pan Y");
openspace.navigation.bindJoystickAxis(name, controller.Push[3], "Zoom");
openspace.navigation.bindJoystickAxis(name, controller.Tilt[1], "LocalRoll X");
openspace.navigation.bindJoystickButton(
name,
controller.LeftButton,
joystickHelper.permaBindLocalRoll(name, controller.Tilt[1]),
"Switch to local roll mode"
)
openspace.navigation.bindJoystickButton(
name,
controller.RightButton,
joystickHelper.permaBindGlobalRoll(name, controller.Tilt[1]),
"Switch to global roll mode"
)
end)