Create an account

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

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)

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,
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.

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 :
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!

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

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

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.

Possibly Related Threads...
Thread Author Replies Views Last Post
  [NEED HELP] cl_gunalign doesn't seem to work on some servers/maps Aguaumreal 2 921 09-10-2019, 03:42 AM
Last Post: Aguaumreal
  [NEED HELP] Buffs Don't Work 3agle427 0 814 01-19-2019, 04:46 PM
Last Post: 3agle427
  [SOLVED] Surround sound refuses to work with C-Media CMI-8788 soundcards Lee_Stricklin 2 1,857 03-06-2017, 08:24 PM
Last Post: Lee_Stricklin
  [SOLVED] Xonotic doesn't work with overwolf Ch4mp 2 2,400 08-12-2016, 02:44 AM
Last Post: Ch4mp
  [SOLVED] How does the defer command work? nightspawn9911 4 2,300 07-18-2016, 07:34 PM
Last Post: nightspawn9911
  [FIXED] assault map don't work Brot 3 2,661 10-13-2015, 05:44 PM
Last Post: Mario
  [SOLVED] Cannot get cl_simpleitems_postfix to work sev 12 8,359 09-09-2014, 07:31 AM
Last Post: tZork
  [SOLVED] How to get Xonotic to work with the open-source Radeon driver? MirceaKitsune 16 14,466 11-19-2013, 06:49 AM
Last Post: MirceaKitsune
  [SOLVED] Joystick wont work? axe 7 7,353 04-05-2013, 04:31 PM
Last Post: Mr. Bougo
  [SOLVED] Sound doesn't work machine! 13 11,002 02-17-2013, 09:31 AM
Last Post: Mr. Bougo

Forum Jump:

Users browsing this thread:
1 Guest(s)

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