How to swap joystick logical button with hat switch

Moderator: AdminGroup

Orion
Posts: 2
Joined: Fri Jun 16, 2023 4:08

How to swap joystick logical button with hat switch

Postby Orion » Fri Jun 16, 2023 4:14

I am attempting to use a hat switch on my joystick to modify the logical output of the joystick. I want to press the hat switch to the left to activate one mode, and the right for another. Is there a way to do this? I have tried using Booleans and toggles, but can't figure it out.

User avatar
Victorus
Posts: 1677
Joined: Wed Sep 21, 2011 13:25
Has thanked: 374 times
Been thanked: 257 times

Re: How to swap joystick logical button with hat switch

Postby Victorus » Fri Jun 16, 2023 9:32

Try to use Shift function.
And explain your idea more completely.
Руководство пользователя по контроллерам VKB (VKB controllers User Guide) Ru&En
https://disk.yandex.ru/d/LlqiYtIrIetBOQ

Orion
Posts: 2
Joined: Fri Jun 16, 2023 4:08

Re: How to swap joystick logical button with hat switch

Postby Orion » Sat Jun 17, 2023 1:26

The idea is to use a hat switch to modify the output of the trigger. For example, I can press the hat switch to the right to set the trigger to act as one button, or to the left to act as another button. I don't want to have to hold the hat switch, just toggle the state of the trigger. In terms of pure buttons, I want physical button 1 to act as logical button 1 if physical button 2 was last pressed, but to act as logical button 2 if physical button 3 was last pressed. The reason I cant use shift is because I don't want to have to hold down the hat switch. The use of this system would be to toggle that weapon the trigger fires. Then I can bind the logical buttons to the fire key bind and control what weapon is fired.

Ron61
Posts: 3277
Joined: Tue Jan 15, 2013 23:56
Location: г.Минск
Has thanked: 44 times
Been thanked: 637 times

Re: How to swap joystick logical button with hat switch

Postby Ron61 » Sat Jun 17, 2023 7:41

Use radiobuttons, look this example.


Return to “Manuals and Howtos”

Who is online

Users browsing this forum: Google [Bot] and 65 guests