Board index FlightGear Support Flying

How to bind a keyboard command (key) to a joystick button?

Controlling your aircraft, using the autopilot etc.

How to bind a keyboard command (key) to a joystick button?

Postby omnibus1 » Tue Mar 23, 2021 7:51 pm

Hallo,

I've tried and searched the whole day and found a lot of information about changing joystick and keyboard bindings and so on. But I could not find any information how I can bind important keyboard commands to my joystick, since there are many buttons left unused and I like to keep my hands on it and not scan over the keyboard in critical situations.

Thnx for help
omnibus1
omnibus1
 
Posts: 24
Joined: Thu May 14, 2020 10:17 pm

Re: How to bind a keyboard command (key) to a joystick butto

Postby zakalawe » Wed Mar 24, 2021 1:10 pm

This is currently tricky unfortunately, I have a medium-term plan to improve it. For now you need to duplicate the keyboard binding (from keyboard.xml) into the joystick config (in its own XML file)
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: How to bind a keyboard command (key) to a joystick butto

Postby V12 » Wed Mar 24, 2021 4:26 pm

It is very simply - check AntiMicro tool.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: How to bind a keyboard command (key) to a joystick butto

Postby doctor_rockter » Wed Mar 24, 2021 10:38 pm

As V12 says - search for Antimicro. I use it to assign ALT-J (map) to a joystick button and reverse thrust (. key) to a button on the throttle. When I get more advanced flying, I'll probably assign more buttons.
Once downloaded and set up, just run Antimicro, then hide (minimise to tray). then run Flightgear.

Note: When I first tried Antimicro I was very frustrated. It was a handy little application, but it never saved my settings. Then I realised you have to save a profile for the throttle and for the joystick separately. Once I'd figured that out, it worked perfectly.

You can use FG's joystick setup for all the controls covered in FG and use Antimicro for all the extra stuff which can't be set up in FG.

There aren't too many instructions in Antimicro that I can find, but if you spend a bit of time figuring it out it's very useful.

Thanks to V12 for recommending Antimicro in past forum posts.

Cheers ..Tony
doctor_rockter
 
Posts: 39
Joined: Fri Jan 08, 2021 11:15 pm
Location: Lancashire, England
Callsign: DR-6
Version: 2020.3.19
OS: Windows 10

Re: How to bind a keyboard command (key) to a joystick butto

Postby V12 » Thu Mar 25, 2021 6:46 am

I used Linux AntiMicro with FG all time, mapped reversers (DEL), reheat (CTRL+F), autothrottle (CTRL+A) and autopilot disengage (CTRL+D) to the joystick buttons. Worked perfectly for these Concorde specific functions.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: How to bind a keyboard command (key) to a joystick butto

Postby omnibus1 » Thu Mar 25, 2021 8:26 pm

[quote="...For now you need to duplicate the keyboard binding (from keyboard.xml) into the joystick config (in its own XML file)[/quote]

And how is this done exactly?

thnx
omnibus1
omnibus1
 
Posts: 24
Joined: Thu May 14, 2020 10:17 pm

Re: How to bind a keyboard command (key) to a joystick butto

Postby omnibus1 » Thu Mar 25, 2021 11:44 pm

So, how do I program lowercase in AntiMIcro. It seems do know only upper case. But many functions in Flightgear simply differ in being lower/upper case.

Cheers
omnibus1
omnibus1
 
Posts: 24
Joined: Thu May 14, 2020 10:17 pm

Re: How to bind a keyboard command (key) to a joystick butto

Postby V12 » Fri Mar 26, 2021 6:36 am

Try key combination SHIFT and desired key. I will try to find my config file somewhere in backup, I do not use FG anymore.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: How to bind a keyboard command (key) to a joystick butto

Postby doctor_rockter » Fri Mar 26, 2021 10:52 pm

I've got 'q' and 'e' keys set up on the throttle paddle (nosewheel steering). These are shown as capitals in Antimicro, but work perfectly for steering (on an ATR 72-500).
When assigning a joystick button, there is an 'advanced' button in Antimicro. If you press this, you can assign several keys. For my map button, CTRL and J is assigned.
doctor_rockter
 
Posts: 39
Joined: Fri Jan 08, 2021 11:15 pm
Location: Lancashire, England
Callsign: DR-6
Version: 2020.3.19
OS: Windows 10

Re: How to bind a keyboard command (key) to a joystick butto

Postby V12 » Sat Mar 27, 2021 9:04 am

I tested it and works perfectly, I made assignement without SHIFT, in AntiMicro uppercase, in the text editor lowercase. When I defined assignement via Advanced and used SHIFT and key, in the editor was uppercase.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: How to bind a keyboard command (key) to a joystick butto

Postby omnibus1 » Sat Mar 27, 2021 1:31 pm

V12 wrote in Sat Mar 27, 2021 9:04 am:I tested it and works perfectly, I made assignement without SHIFT, in AntiMicro uppercase, in the text editor lowercase. When I defined assignement via Advanced and used SHIFT and key, in the editor was uppercase.


O.k., I've found the advanced settings where I can bind multiple keys, e.g. SHIFT+letter to a button. But what editor you are talking about? Do you mean the dialogue box that opens by clicking "Advanced" and then "text entry"?

Cheers
omnibus1
omnibus1
 
Posts: 24
Joined: Thu May 14, 2020 10:17 pm

Re: How to bind a keyboard command (key) to a joystick butto

Postby omnibus1 » Sat Mar 27, 2021 1:33 pm

V12 wrote in Fri Mar 26, 2021 6:36 am:Try key combination SHIFT and desired key. I will try to find my config file somewhere in backup, I do not use FG anymore.


So you do not fly anymore or have changed to another, maybe better program?

Cheers omnibus1
omnibus1
 
Posts: 24
Joined: Thu May 14, 2020 10:17 pm

Re: How to bind a keyboard command (key) to a joystick butto

Postby V12 » Sun Mar 28, 2021 11:41 am

omnibus :
With editor I mean for example windows notepad for test button assign.
And yes, I moved to commercial sim.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: How to bind a keyboard command (key) to a joystick butto

Postby omnibus1 » Sun Mar 28, 2021 9:39 pm

V12 wrote in Sun Mar 28, 2021 11:41 am:omnibus :
With editor I mean for example windows notepad for test button assign.
And yes, I moved to commercial sim.


Which is? Sorry, just curious.

Cheers
omnibus1
omnibus1
 
Posts: 24
Joined: Thu May 14, 2020 10:17 pm

Re: How to bind a keyboard command (key) to a joystick butto

Postby V12 » Sun Mar 28, 2021 10:10 pm

P3Dv4.5+ActiveSky
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12


Return to Flying

Who is online

Users browsing this forum: No registered users and 4 guests