Board index FlightGear Development

re-assigning mouse functions

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

re-assigning mouse functions

Postby bob755 » Mon Nov 13, 2017 5:06 pm

Is it possible to change the behaviour of the mouse for certain functions?
For example, one aircraft type uses left click to push the AP heading knob and center click to pull it. Another uses a combination of shift,alt and left click for the same function

I'd like to have le former for both aircraft. I can't find the xml files that define these functions.

Thanks
bob755
 
Posts: 139
Joined: Mon Oct 30, 2017 1:21 pm

Re: re-assigning mouse functions

Postby wkitty42 » Mon Nov 13, 2017 8:16 pm

each craft is different and implementations details like these are up to each crafts' maintainers... while i agree that it would be nice to use the same keys and buttons for the same purposes everywhere, it just doesn't seem to work that way... especially after you get things the way you want them and an update comes along and overwrites your changes...

with that said, the code blocks you are looking for will be in each crafts' installation directory... the file names can be anything so you'll have to actually start in the -set.xml file and follow the flow to find where the keys and buttons are set...
"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: 4630
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: re-assigning mouse functions

Postby bob755 » Tue Nov 14, 2017 2:47 pm

I searched just about all the xml files and couldn't find where these mouse functions were defined. Could they be coded somewhere in the Nasal files?
bob755
 
Posts: 139
Joined: Mon Oct 30, 2017 1:21 pm

Re: re-assigning mouse functions

Postby wkitty42 » Tue Nov 14, 2017 8:02 pm

IIUC, you would see things like
Code: Select all
<button>
  <key>123</key>
    <some-thing-here-that-the-button-does>
</button>

that's off the top of my head without hunting up anything... there may be a "<keyboard>" or possibly a "<mouse>" tag for the section the above would be listed in...
"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: 4630
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: re-assigning mouse functions

Postby Johan G » Sun Nov 26, 2017 5:06 pm

bob755 wrote in Mon Nov 13, 2017 5:06 pm:For example, one aircraft type uses left click to push the AP heading knob and center click to pull it. Another uses a combination of shift,alt and left click for the same function

wkitty42 wrote in Mon Nov 13, 2017 8:16 pm:[...] you'll have to actually start in the -set.xml file and follow the flow to find where the keys and buttons are set...

You will find them as either pick or knob/slider animations in the xml wrapper for the model (often found in a "model(s)" directory as an xml file with the same name as the aircraft). As wkitty42 said they are aircraft specific (though the knob/slider animation is usually more coherent between aircraft).

For more information see the FlightGear wiki articles Howto:Make a clickable panel#Pick (perm) and Knob / slider animation (perm).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5292
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest