Board index FlightGear Support Hardware

Config of keybindings on Ubuntu 20.04 LTS

Joysticks, pedals, monitors.

Config of keybindings on Ubuntu 20.04 LTS

Postby vedoge » Thu Jul 23, 2020 4:23 am

Hello, I am completely new to Flightgear, and I find that I want to change a couple of keybindings. Any idea on how to do this?
vedoge
 
Posts: 3
Joined: Thu Jul 23, 2020 4:17 am

Re: Config of keybindings on Ubuntu 20.04 LTS

Postby Johan G » Thu Jul 23, 2020 1:09 pm

vedoge wrote in Thu Jul 23, 2020 4:23 am:Hello, I am completely new to Flightgear [...]

Hi and Welcome to FlightGear and the forum! :D

vedoge wrote in Thu Jul 23, 2020 4:23 am:I find that I want to change a couple of keybindings. Any idea on how to do this?

Some keyboard bindings are defined in a configuration file that loads with FlightGear, some are defined in aircraft configuration files.

The bindings that always load are defined in $FG ROOT/keyboard.xml. Do not change the bindings there, as that file might be overwritten when you update your FlightGear version. Instead overlay those bindings in a file that you load with a --config switch. Settings in such a file will replace any other settings.

The bindings that are aircraft specific are typically defined in the <Aircraft>-set.xml file. You can define them there or, using conditions and IIRC the /sim/model property, in the file mentioned above.

These FlightGear wiki articles should be a good starting point (see also related articles at the bottom of these ones):

Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Config of keybindings on Ubuntu 20.04 LTS

Postby vedoge » Fri Jul 24, 2020 6:23 am

Alright, thanks so much! WIll check it out.
vedoge
 
Posts: 3
Joined: Thu Jul 23, 2020 4:17 am

Re: Config of keybindings on Ubuntu 20.04 LTS

Postby vedoge » Fri Jul 24, 2020 6:38 am

Also, for some reason uncommenting line 39 does not seem to give me the keycodes, are they ASCII-standard or are they different?
vedoge
 
Posts: 3
Joined: Thu Jul 23, 2020 4:17 am

Re: Config of keybindings on Ubuntu 20.04 LTS

Postby SurferTim » Fri Jul 24, 2020 11:14 am

The key values below 32 are CTRL keys. Key values 32 and above are ascii.
What are you trying to change?
Fly low. Fly slow. Land on a dime. Twin Otter. https://github.com/SurferTim/dhc6p
My other aircraft is a Citation-X https://github.com/SurferTim/CitationX
PirateAir videos at https://www.youtube.com/user/SurferTim850
User avatar
SurferTim
 
Posts: 1708
Joined: Sun Dec 09, 2018 6:49 pm
Location: Miramar Beach, FL
Callsign: Pirate
Version: 2020.4.0
OS: Ubuntu 18.04

Re: Config of keybindings on Ubuntu 20.04 LTS

Postby Johan G » Fri Jul 24, 2020 2:55 pm

vedoge wrote in Fri Jul 24, 2020 6:38 am:[...] are [the keycodes] ASCII-standard or are they different?

SurferTim wrote in Fri Jul 24, 2020 11:14 am:The key values below 32 are CTRL keys. Key values 32 and above are ascii.

The of the wiki article and section Howto:Reassign keyboard bindings#Finding keycodes (permalink) has an interesting phrase:
As mentioned in keyboard.xml, "regular keycodes go up to 255; special keys start at 256, and can be calculated by adding 256 to the GLUT key value in glut.h."

Using Google Search looking for "flightgear glut.h" and a lot of looking around[1] I found a reference to glut.h that I added to the article (diff).
____
[1] The "windows-3rd-party" repository is for some reason not immediately visible from the main FlightGear page on SourceForge. At first I thought the glut.h header file was no longer in use.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Config of keybindings on Ubuntu 20.04 LTS

Postby roundcubeten » Sat Oct 03, 2020 11:54 am

I had Ubuntu MATE 18.04, and I could change keys like "Ctrl is mapped to Win and usual Ctrl keys", or "Alt is mapped to Right Win...", those options for me were very useful, that let me adapt keyboards of different laptops to have similar functionality. shareit app blacklisted_site
roundcubeten
 
Posts: 1
Joined: Sat Oct 03, 2020 7:21 am

Re: Config of keybindings on Ubuntu 20.04 LTS

Postby vicyclesix » Sat Feb 06, 2021 8:22 am

An advanced option like this is not available in the pre-installed Settings application, you need to use (GNOME) Tweaks. First install it by running the following command in Terminal (you would have to enable the universe repo first if it's disabled):

sudo apt install gnome-tweaks shareit
vicyclesix
 
Posts: 1
Joined: Sat Feb 06, 2021 8:19 am


Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests