Board index FlightGear Support

c172p how to reassign keys - keyboard

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

Please report any bugs not specific to an aircraft on the issue tracker.
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

c172p how to reassign keys - keyboard

Postby lisak.petrik » Mon Feb 11, 2019 3:19 pm

I'm trying to reassign rudder control for c172p.
I created custom keyboard.xml, also I modified the package file: /usr/share/games/flightgear/keyboard.xml.

As the aircraft may rewrite the keys I tried to modify also:
/usr/share/games/flightgear/Aircraft/c172p/c172p-keyboard.xml

I'm trying to add:


<key n="97">
<name>a</name>
<desc>Move rudder left</desc>
<repeatable type="bool">true</repeatable>
<binding>
<command>property-adjust</command>
<property>/controls/flight/rudder</property>
<step type="double">-0.05</step>
</binding>
</key>

<key n="100">
<name>d</name>
<desc>Move rudder right</desc>
<repeatable type="bool">true</repeatable>
<binding>
<command>property-adjust</command>
<property>/controls/flight/rudder</property>
<step type="double">0.05</step>
</binding>
</key>


The above works well for other airplanes, but not for c172p. Even the above keys are not in collision with c172p build-in keys, my mapping gets overwritten by airplane itself...

Any ideas how to change binding for c172p?

I'm on latest flightgear 2018. I went through lot of forums already, but they seems to be outdated.
lisak.petrik
 
Posts: 2
Joined: Mon Feb 11, 2019 3:06 pm

Re: c172p how to reassign keys - keyboard

Postby wkitty42 » Mon Feb 11, 2019 5:27 pm

can you not change those in the craft's file where they are set? if you set them there as you indicate you attempt to do, then they should be OK unless they are assigned somewhere else... is it possible that your assignments won't work with other craft that employ the walker character avatar for the pilot? i thin kthe WASD keys are used to move the walker around...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: c172p how to reassign keys - keyboard

Postby lisak.petrik » Tue Feb 12, 2019 1:03 pm

Ok I tried to move the key mapping to "q" and "e" and it works well...so you are right, it seems that WASD is not free to be used. Thanks a lot!
lisak.petrik
 
Posts: 2
Joined: Mon Feb 11, 2019 3:06 pm

Re: c172p how to reassign keys - keyboard

Postby wkitty42 » Tue Feb 12, 2019 6:23 pm

yes, you'd have to check the walker code to see what keys it uses... any aircraft that uses the walker will also have this problem... some craft use the default walker code while others have copied it to the craft directory in an attempt to clean it up and make it better...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: c172p how to reassign keys - keyboard

Postby wlbragg » Tue Feb 12, 2019 6:52 pm

I don't think it would be impossible to use nasal in the bindings and be selective as to what is bound based on if /walker = true is valid.
In other words change the bindings on the fly depending if walker is visible.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070


Return to Support

Who is online

Users browsing this forum: No registered users and 7 guests