Skip to main content

Posts

Showing posts with the label Game Linux FlightGear

FlightGear Keyboard Shortcut Reference

I just wanted to have a list of keys can be used in FlightGear but found only the short Reference. I realized that key shortcuts is an xml file so easy to change and not good to publish a static one on the net while anybody can change it anytime easily. So here is a command to get it under linux anytime on your own machine. First please change directory to the one contains keyboard.xml. Gutsy have it under /usr/share/games/FlightGear $ awk 'BEGIN {name="";desc="";spec="";} \ /.*<\/name>/{ name=$0; spec="";desc="";} \ /.*<\/desc>/ { desc=$0 ; line=spec " " name " = " desc; print gensub("<[^>]*>([^<>]*)<\/[^>]*>","\\1","g",gensub("\ \ +","\ ","g", line)) ;} \ /<mod-.*>/ { spec=gensub("<mod-(.*)>","\\1 + ","g",$0); } \ ' keyboard.xml Output is something like: Ctrl-A = Toggle...