Author Topic: [SOLVED] How FSO detects keyboard layout on Linux?  (Read 1396 times)

0 Members and 1 Guest are viewing this topic.

[SOLVED] How FSO detects keyboard layout on Linux?
Hi,

I have just installed Diaspora on my linux laptop and experience a problem that is more linked, I guess, to the FSO code or one of its dependencies than a diaspora specific problem.

My laptop has a built-in azerty belgian keyboard. this is causing a problem because lots of keys are not available in the game like the digits and the \ key. If I plug a qwerty keyboard and configure KDE to use a qwerty-us layout, Diaspora still see the keyboard as azerty.

How FSO is detecting the keyboard layout and how can I force it to see a qwerty keyboard on Linux?
« Last Edit: December 18, 2012, 08:44:37 am by montaropdf »
Luke, use the F.O.S.S.!!!

 

Offline niffiwan

  • 211
  • Eluder Class
Re: How FSO detects keyboard layout on Linux?
I'm not an expert on this, but make sure you haven't got the command line parameter "-keyboard_layout" set.  From a quick look through the code it seems that querty should be the default unless you've specifically set qwertz or azerty.  Of course, the problem might be that FSO is detecting / using the inbuilt azerty keyboard instead of the one you plugged in, I'm not sure how FSO deals with multiple keyboards.

Perhaps you can try setting -keyboard_layout azerty on the command line to see if that makes your inbuilt keyboard work?  Otherwise, can you post a fs2_open.log to see if that helps show what's going on? (see my sig for details on how to do this)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Eli2

  • 26
Re: How FSO detects keyboard layout on Linux?
There is no auto detection, add the following command line parameter or use xmodmap.
"-keyboard_layout azerty"

 
Re: How FSO detects keyboard layout on Linux?
I have tried -keyboard_layout with qwerty, but it change nothing, it is still the azerty keyboard that is used. I will try with xmodmap and keep you informed.

Attached is the fs2_open.log with -keyboard_layout qwerty.

[attachment deleted by a basterd]
Luke, use the F.O.S.S.!!!

 
Re: How FSO detects keyboard layout on Linux?
I finally find the problem, it comes from the fact that I have 2 layouts configured in X, namely 'be' and 'us' in that order. It seems that FSO (or SDL maybe) pick the first layout whatever is selected via the KDE interface. Using setxkbmap I have changed the layout order to 'us,be' and now, the keyboard layout used is 'us' (qwerty).

I will test tomorrow if everything is working fine with that new configuration and will close the thread when the task is completed.

@Eli2: thanks I discover the above command when searching how to use xmodmap.
Luke, use the F.O.S.S.!!!

 
Re: How FSO detects keyboard layout on Linux?
After playing a few missions with the new keyboard setting, everything is fine.

Thanks for your help.
Luke, use the F.O.S.S.!!!