Board index FlightGear Development Aircraft

Set view out of sequence

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Set view out of sequence

Postby Octal450 » Tue Jul 04, 2017 9:35 pm

Hi,
I am trying to make a way to use number keys 1-4 for various different views, how can I which view to use, out of sequence?

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Set view out of sequence

Postby stuart » Tue Jul 04, 2017 10:30 pm

Try assigning /sim/current-view/view-number to the index of the view you want to use. Haven't tested it, but it should work.

Here's the XML fragment for Ctrl-V which resets the view to view 0:

Code: Select all
 <key n="22">
  <name>Ctrl-V</name>
  <desc>Select initial view (view 0)</desc>
  <binding>
   <command>property-assign</command>
   <property>/sim/current-view/view-number</property>
   <value>0</value>
  </binding>
 </key>


-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1469
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: Set view out of sequence

Postby Octal450 » Tue Jul 04, 2017 11:47 pm

I will try it out! Thanks!

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Set view out of sequence

Postby Octal450 » Wed Jul 05, 2017 1:16 am

Working, thanks Stuart!

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Set view out of sequence

Postby sidi762 » Wed Jul 12, 2017 1:54 pm

Please don't, or laptop users will have a really hard time...
sidi762
 
Posts: 129
Joined: Sat Jun 18, 2016 8:15 am
Location: Beijing, China
Callsign: DAG0762
Version: 2018.3.2
OS: MacOS Mojave

Re: Set view out of sequence

Postby Octal450 » Wed Jul 12, 2017 1:57 pm

Please explain.

TU154b does it, so what is the problem?

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Set view out of sequence

Postby Parnikkapore » Wed Jul 12, 2017 11:37 pm

They don't have a numpad ;), they won't be able to control throttle easily if you overrided 3/9
(Oh by the way, FG currently recognizes keys via character codes, so overwriting 3/9 will affect everyone without a joystick.)
There are free alternatives to every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 818
Joined: Thu Oct 29, 2015 10:16 am
Callsign: HS-FGS
Version: next [PPA]
OS: Mint 18

Re: Set view out of sequence

Postby Octal450 » Thu Jul 13, 2017 12:24 am

For me, 3 and 2 work fine to use flight controls with these views in. But 3 and 2 in the buttons above the keys work for views.... ???

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Set view out of sequence

Postby wkitty42 » Thu Jul 13, 2017 6:49 pm

you probably have your numlock turned off, too... the code for '3' is different than the code for 'PgDn'... if you turn numlock on, both digit row '3' and keypad '3' will emit the same code unless we're a lot deeper into the keyboard system and can determine the difference between a digit row '3' and a keypad '3'... some systems may also have the editing keys in a separate block on the keyboard... probably the majority of laptop keyboards don't have keypad or editing keys as separate blocks... they have to use the digit row or some other tricky key combination to achieve what those of us with 104-key (or larger) keyboards can do...

i'm actually surprised at the number of folks that seem to use a laptop for everything instead of having a real desktop system for most stuff and a laptop for mobile stuff...
"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: 5695
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Set view out of sequence

Postby Octal450 » Thu Jul 13, 2017 10:21 pm

No, I do not.

Numlock on, and it works!

The Tu154B guys got away with it, so I will try my luck.

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Set view out of sequence

Postby wkitty42 » Fri Jul 14, 2017 5:57 pm

:lol: go for it! :mrgreen:
"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: 5695
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Set view out of sequence

Postby Octal450 » Fri Jul 14, 2017 6:16 pm

:mrgreen:

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm


Return to Aircraft

Who is online

Users browsing this forum: Google [Bot], Robertfm and 2 guests