Board index FlightGear Development

How can i update /sim/input/click with keyboard?

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.

How can i update /sim/input/click with keyboard?

Postby AndrewS » Fri Mar 04, 2022 7:15 pm

Hello, I'm using FlightGear V2020.3.11 and I want to read the click position but without the mouse. I want to use the viewer center and a keyboard command. Is it possible to update /sim/input/click?
AndrewS
 
Posts: 5
Joined: Fri Mar 04, 2022 6:46 pm

Re: How can i update /sim/input/click with keyboard?

Postby TheEagle » Mon Mar 07, 2022 2:55 pm

This is impossible I'm afraid … the propertie's name already suggests that. Why would you want this, anyways ?
By looking at the source code I found that this is really impossible - just as you can't click a button in the cockpit with the keyboard. it's just impossible. If you would explain why you need this, we might be able to find another solution though ! :)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: How can i update /sim/input/click with keyboard?

Postby AndrewS » Thu Mar 10, 2022 12:27 am

I need the Lat/Lon/Alt position data from the click output in the scenario, but I didn't want to use the mouse for that.
AndrewS
 
Posts: 5
Joined: Fri Mar 04, 2022 6:46 pm

Re: How can i update /sim/input/click with keyboard?

Postby TheEagle » Thu Mar 10, 2022 12:14 pm

I got that, but WHY don't you want to use the mouse for it ?
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: How can i update /sim/input/click with keyboard?

Postby wkitty42 » Thu Mar 10, 2022 1:40 pm

for one thing, it means taking your hand off the keyboard...
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: How can i update /sim/input/click with keyboard?

Postby TheEagle » Thu Mar 10, 2022 1:45 pm

That's really a BIG THING that you CAN'T DO once in 10 minutes, right ? :wink: :mrgreen:
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: How can i update /sim/input/click with keyboard?

Postby wkitty42 » Thu Mar 10, 2022 3:10 pm

for some of us, yeah... especially if you're a touch typist like some of us ;)
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: How can i update /sim/input/click with keyboard?

Postby TheEagle » Thu Mar 10, 2022 3:34 pm

@AndrewS: Oh well, there is one possibility … but it works only on Linux AFAIK. So - which platform are you on - Windows, Mac or Linux (Ubuntu, …)?
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: How can i update /sim/input/click with keyboard?

Postby AndrewS » Mon Mar 14, 2022 8:07 pm

t's used for application with another functionality for the mouse. The development occurs in windows 10 pro.
AndrewS
 
Posts: 5
Joined: Fri Mar 04, 2022 6:46 pm

Re: How can i update /sim/input/click with keyboard?

Postby TheEagle » Mon Mar 14, 2022 8:21 pm

Well, if you were on Linux you could remap a keyboard shortcut to a mouse click which would click wherever the mouse currently is - additionally you could bind another to a command that centers the mouse on the screen. Maybe it's also possible on Windows, but I never used Windows, so I can't help you with that, sorry. Inside the simulator at least, it is not possible.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: How can i update /sim/input/click with keyboard?

Postby AndrewS » Mon Mar 14, 2022 9:02 pm

Thank you very much for the clarification on the matter.
AndrewS
 
Posts: 5
Joined: Fri Mar 04, 2022 6:46 pm

Re: How can i update /sim/input/click with keyboard?

Postby Fahim Dalvi » Wed Mar 16, 2022 7:52 am

If your mouse click is being used for something else, you can still map "Keyboard key + Mouse click" to an action, not sure if this helps you.
For example, in the UFO, "click" is place object, but "g + click" is teleport. So if your only issue is that you want to keep the current click behavior for something else, maybe this combo technique can be useful for you!
User avatar
Fahim Dalvi
 
Posts: 1352
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS


Return to Development

Who is online

Users browsing this forum: No registered users and 12 guests