Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Numbers key don't work with azerty keyboards

#1
Hi,
I don't know if it is a bug or a specific problem with my computer.
When I try to map the "number keys" to each weapons, xonotic doesn't recognize some.
As I'm french, I have an azerty keyboard, and the key not recognized are :
- é (2)
- è (7)
- ç (9)
- à (0)

Is there any way to fix it, or is it a bug?

Oh, and I use Xonotic 0.6, but the same problem is present in last git build. (at least the 31/10)
Reply

#2
Indeed, this is a problem. Keyboard input in DarkPlaces (the engine Xonotic uses) is broken by design because it's american-centric, dealing with only ASCII characters and the usual special keys. See this bug report.

There is a workaround but it's rather unstable. The thing with the keys you are trying to bind is that they are not ASCII characters, but they are still in the latin1 range. For some reason I forgot (perhaps because it's still single-byte encoding so the config can be read,) DarkPlaces still recognizes latin1 characters in bind commands when they are read from a config file. But there's a problem with this (that you might not notice), in that some latin1 characters lie in ranges of internal key codes that is also used by special keys. So, if you manage to bind a non-ASCII latin1 character's key, the bind might be shared with a special key such as page up/down, home/end, perhaps the F keys, and others (maybe even the keypad keys?)

Anyway, if you still want to give it a try, here's how you can bind those latin1 keys. First you need to create the autoexec.cfg file in your personal data directory if it does not exist yet. That directory is located somewhere in your personal documents directory and depends on your OS. The easiest way to figure it out is to open the Xonotic console (shift escape, works in the menu as well as ingame) and type which config.cfg in there. This will locate the config.cfg file which lives in the personal data directory. So, next to that config.cfg file, create an autoexec.cfg file.

Then, you want to put your binds in there. For example,
Code:
bind "é" +jump
bind "à" "say I just pressed my a-grave key"
Now, this is important, you need to save this file with a latin1 encoding. In some text editors you can pick the encoding in the "save as" dialog, in some others you have to set the encoding for the file somewhere in the menus. Use a better text editor if yours does not seem to let you pick the encoding. This matters, because utf-8 just won't work.

Don't hesitate to ask for help if you're having trouble with this. I'm also fluent in French if that can help.
Reply

#3
Thank you, things worked great!
Here is what I've done.
I just edited the file ~/.xonotic/data/config.cfg (I used vim and there was no problem with encoding, lucky), and added as Mr Bougo suggested these lines :
Code:
bind QUOTE "weapon_group_3"
bind & "weapon_group_1"
bind APOSTROPHE "weapon_group_4"
bind ( "weapon_group_5"
bind - "weapon_group_6"
bind _ "weapon_group_8"
bind à "weapon_group_0"
bind ç "weapon_group_9"
bind è "weapon_group_7"
bind é "weapon_group_2"
And since now, everything seems to work fine.

Thank you!
Reply

#4
config.cfg works too, but this sort of config is better in autoexec.cfg I think. There's no risk of overriding the binds and having to go into a text editor to type them back Smile

Do it the way you like it, it doesn't really matter Smile
Reply

#5
No problem yet, but if any override happens, I'l know what to do.
Thank you very much! Smile
Reply

#6
Oh, that's not what I meant. The thing with config.cfg is that it's rewritten every time you close the game, so it's not the best place to add permanent customization. It still works, but that's why I suggested autoexec.cfg instead.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [NEED HELP] My mouse binds do not work in GLX? FAF 5 2,287 07-29-2022, 08:39 AM
Last Post: FAF
  [SOLVED] Two weapons on each key? FAF 18 8,323 07-27-2022, 03:55 PM
Last Post: FAF
  [SOLVED] Textures don't load at other side of warpzone bananovenc 6 3,540 06-11-2020, 12:56 PM
Last Post: bananovenc
  [SOLVED] No stats for the player Ubuntu 19.04 - just don't use the flathub version Fiorentino 2 3,392 04-20-2020, 07:42 AM
Last Post: Fiorentino
  [NEED HELP] cl_gunalign doesn't seem to work on some servers/maps Aguaumreal 2 2,888 09-10-2019, 03:42 AM
Last Post: Aguaumreal
  [BUG] Rebound "R" key, still occasionally does "team say" anyways Cynical 2 2,031 06-27-2019, 08:54 AM
Last Post: Cynical
  Chat key bind problem BuddyFriendGuy 4 3,399 01-26-2019, 11:12 PM
Last Post: BuddyFriendGuy
  [NEED HELP] Buffs Don't Work 3agle427 0 1,686 01-19-2019, 04:46 PM
Last Post: 3agle427
  [SOLVED] Weird key hold issue with official version Bloodthorn 9 5,819 05-21-2018, 07:56 AM
Last Post: Bloodthorn
  [SOLVED] Servers list don't show any of servers Ketjow3 8 5,902 01-25-2018, 04:12 AM
Last Post: Ketjow3

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-