Board index FlightGear Development New features

New keyboard shortcuts  Topic is solved

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

New keyboard shortcuts

Postby Merik » Thu Mar 03, 2011 5:30 am

Hi

How can I assign keyboard shortcuts for certain dialog boxes, such as GPS settings or Flight Manager?

Thanks in advance,

Merik
I'm using FlightGear Git version on a Win 7 machine with an onboard ATI graphic card and 3 GB of RAM.

These are the link I've found useful: Types of AirspeedE6B emulatorAirspaces explained with examples
Merik
 
Posts: 191
Joined: Thu Jan 21, 2010 12:14 pm

Re: New keyboard shortcuts

Postby Gijs » Thu Mar 03, 2011 4:43 pm

Hi Merik,

do you want to open the dialgo by a shortkey, or do you want to control the dialog by a shortkey (after it's opened)? The first is simple, just create a key binding in keyboard.xml with:
Code: Select all
<binding>
   <command>dialog-show</command>
   <dialog-name>route-manager</dialog-name>
</binding>

You can lookup those bindings in gui/menubar.xml (there are all the menu dialogs defined).

Cheers,
Gijs
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9549
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: New keyboard shortcuts

Postby Merik » Sat Mar 05, 2011 2:12 am

That's just what I wanted to do. And thanks for guiding me to the menubar XML file. :)
I'm using FlightGear Git version on a Win 7 machine with an onboard ATI graphic card and 3 GB of RAM.

These are the link I've found useful: Types of AirspeedE6B emulatorAirspaces explained with examples
Merik
 
Posts: 191
Joined: Thu Jan 21, 2010 12:14 pm

Re: New keyboard shortcuts

Postby Merik » Sat Mar 05, 2011 4:26 am

Can you also explain how I can get the code for each key? So for example, I know the code for F1 is 257. Is there a list of these keycodes? I'm asking because apparently, the extended ASCII codes are not being used.

Another question I have is, where are the default keyboard shortcuts for menu items set? So for example, F12 brings the radio settings dialogue up, but I can't find this defined in the keyboard.xml file.
I'm using FlightGear Git version on a Win 7 machine with an onboard ATI graphic card and 3 GB of RAM.

These are the link I've found useful: Types of AirspeedE6B emulatorAirspaces explained with examples
Merik
 
Posts: 191
Joined: Thu Jan 21, 2010 12:14 pm

Re: New keyboard shortcuts  

Postby Gijs » Sun Mar 06, 2011 11:46 am

Merik wrote in Sat Mar 05, 2011 4:26 am:Can you also explain how I can get the code for each key?

With FlightGear started, open the property browser (/ key) and browse to devices/status/keyboard/event/key that'll you show you the number of the key you currently press; IIRC.
where are the default keyboard shortcuts for menu items set?

In $FG_ROOT/keyboard.xml, all default keyboard items are set there.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9549
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: New keyboard shortcuts

Postby Merik » Sun Mar 06, 2011 4:54 pm

Gijs wrote in Sun Mar 06, 2011 11:46 am:With FlightGear started, open the property browser (/ key) and browse to devices/status/keyboard/event/key that'll you show you the number of the key you currently press; IIRC.

Thank you, it worked.
I'm using FlightGear Git version on a Win 7 machine with an onboard ATI graphic card and 3 GB of RAM.

These are the link I've found useful: Types of AirspeedE6B emulatorAirspaces explained with examples
Merik
 
Posts: 191
Joined: Thu Jan 21, 2010 12:14 pm


Return to New features

Who is online

Users browsing this forum: No registered users and 7 guests

cron