1
0
forked from Clones/Controlify

joystick support

This commit is contained in:
isXander
2023-02-16 12:25:55 +00:00
parent 1b5c9daf94
commit 5a1504df76
134 changed files with 2296 additions and 820 deletions

View File

@ -1,6 +1,9 @@
// THIS FILE IS PARSED BY LENIENT GSON PARSER AND IS NOT JSON5 COMPLIANT!
{
"xbox_one": {
[
{
"name": "Xbox One Controller",
"identifier": "xbox_one",
"vendor": 1118, // 0x45e
"product": [
767, // 0x2ff
@ -17,7 +20,10 @@
648 // 0x288
]
},
"dualshock4": {
{
"name": "Dualshock 4 Controller",
"identifier": "dualshock4",
"vendor": 1356, // 0x54c
"product": [
1476, // 0x5c4
@ -25,10 +31,13 @@
2976 // 0xba0
]
},
"steam_deck": {
{
"name": "Steam Deck",
"identifier": "steam_deck",
"vendor": 10462, // 0x28de
"product": [
4613 // 0x1205
]
}
}
]

View File

@ -34,6 +34,8 @@
"controlify.gui.left_stick_deadzone.tooltip": "How far the left joystick needs to be pushed before registering input.",
"controlify.gui.right_stick_deadzone": "Right Stick Deadzone",
"controlify.gui.right_stick_deadzone.tooltip": "How far the right joystick needs to be pushed before registering input.",
"controlify.gui.joystick_axis_deadzone": "%s Deadzone",
"controlify.gui.joystick_axis_deadzone.tooltip": "How far '%s' axis needs to be pushed before registering input.",
"controlify.gui.stickdrift_warning": "Warning: Setting this too low will cause stickdrift! This is where the internals of your controller become mis-calibrated and register small amounts of input when there shouldn't be.",
"controlify.gui.auto_calibration": "Automatic Deadzone Calibration",
"controlify.gui.auto_calibration.tooltip": "Automatically calibrate the deadzone of your controller.",
@ -73,6 +75,10 @@
"controlify.binding.controlify.walk_backward": "Walk Backward",
"controlify.binding.controlify.strafe_left": "Strafe Left",
"controlify.binding.controlify.strafe_right": "Strafe Right",
"controlify.binding.controlify.look_up": "Look Up",
"controlify.binding.controlify.look_down": "Look Down",
"controlify.binding.controlify.look_left": "Look Left",
"controlify.binding.controlify.look_right": "Look Right",
"controlify.binding.controlify.jump": "Jump",
"controlify.binding.controlify.sneak": "Sneak",
"controlify.binding.controlify.attack": "Attack",
@ -93,6 +99,10 @@
"controlify.binding.controlify.pick_block": "Pick Block",
"controlify.binding.controlify.toggle_hud_visibility": "Toggle HUD Visibility",
"controlify.binding.controlify.show_player_list": "Show Player List",
"controlify.binding.controlify.vmouse_move_up": "VMouse Move Up",
"controlify.binding.controlify.vmouse_move_down": "VMouse Move Down",
"controlify.binding.controlify.vmouse_move_left": "VMouse Move Left",
"controlify.binding.controlify.vmouse_move_right": "VMouse Move Right",
"controlify.binding.controlify.vmouse_lclick": "VMouse LClick",
"controlify.binding.controlify.vmouse_rclick": "VMouse RClick",
"controlify.binding.controlify.vmouse_shift_click": "VMouse Shift Click",
@ -101,6 +111,12 @@
"controlify.binding.controlify.vmouse_escape": "VMouse Key Escape",
"controlify.binding.controlify.vmouse_shift": "VMouse Key Shift",
"controlify.binding.controlify.vmouse_toggle": "Toggle Virtual Mouse",
"controlify.binding.controlify.gui_navi_down": "GUI Navi Down",
"controlify.binding.controlify.gui_navi_up": "GUI Navi Up",
"controlify.binding.controlify.gui_navi_left": "GUI Navi Left",
"controlify.binding.controlify.gui_navi_right": "GUI Navi Right",
"controlify.binding.controlify.yacl_cycle_opt_forward": "YACL Cycle Option Forward",
"controlify.binding.controlify.yacl_cycle_opt_backward": "YACL Cycle Option Backward",
"controlify.guide.inventory": "Open Inventory",
"controlify.guide.swim_up": "Swim Up",
@ -124,6 +140,42 @@
"controlify.guide.interact": "Interact",
"controlify.guide.pick_block": "Pick Block",
"controlify.joystick_mapping.unmapped.axis": "Axis #%s",
"controlify.joystick_mapping.unmapped.button": "Button #%s",
"controlify.joystick_mapping.unmapped.hat": "Hat #%s",
"controlify.joystick_mapping.unmapped.axis_direction.negative": "(Negative)",
"controlify.joystick_mapping.unmapped.axis_direction.positive": "(Positive)",
"controlify.joystick_mapping.xbox_one.axis.left_stick": "Left Stick",
"controlify.joystick_mapping.xbox_one.axis.left_stick.left": "Left",
"controlify.joystick_mapping.xbox_one.axis.left_stick.right": "Right",
"controlify.joystick_mapping.xbox_one.axis.left_stick.up": "Up",
"controlify.joystick_mapping.xbox_one.axis.left_stick.down": "Down",
"controlify.joystick_mapping.xbox_one.axis.right_stick": "Right Stick",
"controlify.joystick_mapping.xbox_one.axis.right_stick.left": "Left",
"controlify.joystick_mapping.xbox_one.axis.right_stick.right": "Right",
"controlify.joystick_mapping.xbox_one.axis.right_stick.up": "Up",
"controlify.joystick_mapping.xbox_one.axis.right_stick.down": "Down",
"controlify.joystick_mapping.xbox_one.axis.left_trigger": "Left Trigger",
"controlify.joystick_mapping.xbox_one.axis.left_trigger.up": "Up",
"controlify.joystick_mapping.xbox_one.axis.left_trigger.down": "Down",
"controlify.joystick_mapping.xbox_one.axis.right_trigger": "Right Trigger",
"controlify.joystick_mapping.xbox_one.axis.right_trigger.up": "Up",
"controlify.joystick_mapping.xbox_one.axis.right_trigger.down": "Down",
"controlify.joystick_mapping.xbox_one.button.a": "A",
"controlify.joystick_mapping.xbox_one.button.b": "B",
"controlify.joystick_mapping.xbox_one.button.x": "X",
"controlify.joystick_mapping.xbox_one.button.y": "Y",
"controlify.joystick_mapping.xbox_one.button.left_bumper": "Left Bumper",
"controlify.joystick_mapping.xbox_one.button.right_bumper": "Right Bumper",
"controlify.joystick_mapping.xbox_one.button.left_stick": "Left Stick Press",
"controlify.joystick_mapping.xbox_one.button.right_stick": "Right Stick Press",
"controlify.joystick_mapping.xbox_one.button.back": "Back",
"controlify.joystick_mapping.xbox_one.button.start": "Start",
"controlify.joystick_mapping.xbox_one.button.guide": "Guide",
"controlify.joystick_mapping.xbox_one.hat.dpad": "D-Pad",
"controlify.calibration.title": "Controller Calibration for '%s'",
"controlify.calibration.info": "This process will optimize settings for your controller to prevent stick drift. Stick drift happens in your controller thumbsticks and outputs slightly wrong values when you aren't touching them at all. Deadzones are used to prevent this.\n\nThis will only take a few seconds.",
"controlify.calibration.wait": "Please do not touch your controller thumbsticks until the progress bar is complete. This process will only take a few seconds.",
@ -138,5 +190,10 @@
"controlify.beta.button": "Open Issue Tracker...",
"controlify.error.hid": "Controller Detection Disabled",
"controlify.error.hid.desc": "Controlify could not start the controller detection system used to identify and distinguish between multiple controllers. This means controller config will not be able to be saved between play sessions. This is likely due to a system fault and you should check logs for further information."
"controlify.error.hid.desc": "Controlify could not start the controller detection system used to identify and distinguish between multiple controllers. This means controller config will not be able to be saved between play sessions. This is likely due to a system fault and you should check logs for further information.",
"controlify.hat_state.up": "Up",
"controlify.hat_state.down": "Down",
"controlify.hat_state.left": "Left",
"controlify.hat_state.right": "Right"
}

View File

@ -0,0 +1,92 @@
{
"axes": [
{
"ids": [0, 1],
"identifier": "left_stick",
"deadzone": true,
"rest": 0.0,
"axis_names": [
["right", "left"],
["down", "up"]
]
},
{
"ids": [2, 3],
"identifier": "right_stick",
"deadzone": true,
"axis_names": [
["right", "left"],
["down", "up"]
],
"rest": 0.0
},
{
"ids": [4],
"identifier": "left_trigger",
"deadzone": false,
"rest": 0.0,
"range": [0.0, 1.0],
"axis_names": [
["down", "up"]
]
},
{
"ids": [5],
"identifier": "right_trigger",
"deadzone": false,
"rest": 0.0,
"range": [0.0, 1.0],
"axis_names": [
["down", "up"]
]
}
],
"buttons": [
{
"button": 0,
"name": "a"
},
{
"button": 1,
"name": "b"
},
{
"button": 2,
"name": "x"
},
{
"button": 3,
"name": "y"
},
{
"button": 4,
"name": "left_bumper"
},
{
"button": 5,
"name": "right_bumper"
},
{
"button": 6,
"name": "back"
},
{
"button": 7,
"name": "start"
},
{
"button": 8,
"name": "left_stick"
},
{
"button": 9,
"name": "right_stick"
}
],
"hats": [
{
"hat": 0,
"name": "dpad"
}
]
}

View File

@ -4,6 +4,7 @@
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"mixins": [
"core.GLXMixin"
],
"client": [
"core.ClientPacketListenerMixin",