Property Key Handler

From FlightGear wiki
Jump to navigation Jump to search

The Property Key Handler is an extension mainly targeted at developers it is designed to make debugging properties much easier. It can be used to quickly open the property browser or to help find matching properties; or quickly assign new values to properties.

To use this feature open the Menu->Debug->Configure Development Extensions dialog and ensure that the Enable '/'-key property handler (see $FG_ROOT/Nasal/prop_key_handler.nas) is ticked.

When active you can simply press the / key and then type a property path (using the Tab key to complete property path elements if possible), or a search string


Enter Action Result
Valid property path = new value Enter Set property to value
Valid property path Enter Print property and value to screen and terminal
Valid property path * Print property and all children to terminal
Valid property path ! Add property to display list
Valid property path /! Remove property from display list
Valid property path : Open property browser in this property's directory
Match string ? Print all properties whose path or value contains the match string
Path or partial path # Add listener for property and all child properties (cancel all listeners with /#)
Path or partial path /# Cancel matching listeners

Key bindings

Key Action
Enter Confirm certain operations
Tab Complete property path element (if possible), or cycle through available elements
Shift+Tab Same as <TAB> but backwards
Previous element in the history
Next element in the history
Escape Cancel the operation
← Backspace Delete last character typed
Shift+← Backspace Remove the current path element (to the previous /)


Color Meaning
White Syntactically correct path to not yet existing property
Green Path to existing property
Red Bad syntax in path syntax (e.g. in /foo*bar the * ist allowed)
Yellow While typing in value for a valid property path
Magenta While typing search string (except when first character is '/')

Example usage

  1. Type / sim / moTab and the display will show /sim/mode. Then type : to open the property browser at this point.
  2. Type / flols/cut ? and on the console will be printed all matching properties

Related content

Wiki articles

Source code