Jump to content

Creating control group on Linux and Mac with non QWERTY keyboards.


lsdh
 Share

Recommended Posts

Where QWERTY keyboards have "1234567890" AZERTY one have symbols like "&é"'(-è!çà".

Under Windows, the developers had to made a custom sdl manger that make theses key behave like the QWERTY ones for Hotkeys, but under Linux and Mac OS X, the generic one is used.

It is planed to have a GUI interface to configure the hotkeys, but this is not yet implemented, so we have to make it a bit ourself.

This will only work with Alpha 15 and later or SVN.

First thing (if it is not already done) is to copy the default.cfg file that can be found in:

SVN:

0ad/binaries/data/config/default.cfg

Alpha versions:

Linux:

/usr/share/[games/]0ad/config/default.cfg

OS X:

0ad.app/Contents/Resources/data/config/default.cfg

and paste it in:

Linux:

$XDG_CONFIG_HOME/0ad/config/local.cfg (generally ~/.config/0ad/config/local.cfg)

OS X:

~/Library/Application\ Support/0ad/config/local.cfg

Now we can edit this file to configure our hotkeys.

Most of the keys are listed in the key.txt file (can be found in the same directory than the default.cfg file).

For the ones remaining (é § è ç à), we currently have to use the WorldX keys (§ is only at this place on Belgian layout).

On Linux, you should have on French and Belgian layout:

é = World73 (or W73)

§ = World7 (or W7)

è = World72 (or W72)

ç = World71 (or W71)

à = World64 (or W64)

On OSX, French layout:

é = World0 (or W0)

è = World3 (or W3)

ç = World2 (or W2)

à = World4 (or W4)

Please, share your results and complete the missing informations. There may have other differences.

If you need to find the key number, you can find instruction in the #2043.

Here is the local.cfg that suit for Belgian layout under Linux (just rename the .zip to be a .cfg): local.zip

(If you give it, I can add your file to give more examples).

Edited by lsdh
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

lsdh, as there doesn't seem a lot of people with a non-qwerty keyboard, could you make a documentation page on the wiki on how to change the shortkeys, what the configuration for belgian azerty on linux is etc... ?

I just don't want to forget all that.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 years later...

hotkey for french keyboard, if it can help someone :)

[hotkey.selection.group.add]
0 = "Shift+W64"
1 = "Shift+Ampersand"
2 = "Shift+W73"
3 = "Shift+DoubleQuote"
4 = "Shift+SingleQuote"
5 = "Shift+LeftParen"
6 = "Shift+Minus"
7 = "Shift+W72"
8 = "Shift+Underscore"
9 = "Shift+W71"
[hotkey.selection.group.save]
0 = "Ctrl+W64"
1 = "Ctrl+Ampersand"
2 = "Ctrl+W73"
3 = "Ctrl+DoubleQuote"
4 = "Ctrl+SingleQuote"
5 = "Ctrl+LeftParen"
6 = "Ctrl+Minus"
7 = "Ctrl+W72"
8 = "Ctrl+Underscore"
9 = "Ctrl+W71"
[hotkey.selection.group.select]
0 = W64
1 = Ampersand
2 = W73
3 = DoubleQuote
4 = SingleQuote
5 = LeftParen
6 = Minus
7 = W72
8 = Underscore
9 = W71

Edited by chocard
Link to comment
Share on other sites

  • 2 months later...

Is this supposed to work in 0.19?

I see these errors:

WARNING: Hotkey mapping used invalid key 'Shift+W64'WARNING: Hotkey mapping used invalid key 'Shift+W73'WARNING: Hotkey mapping used invalid key 'Shift+W72'WARNING: Hotkey mapping used invalid key 'Shift+W71'WARNING: Hotkey mapping used invalid key 'Ctrl+W64'WARNING: Hotkey mapping used invalid key 'Ctrl+W73'WARNING: Hotkey mapping used invalid key 'Ctrl+W72'WARNING: Hotkey mapping used invalid key 'Ctrl+W71'WARNING: Hotkey mapping used invalid key 'W64'WARNING: Hotkey mapping used invalid key 'W73'WARNING: Hotkey mapping used invalid key 'W72'WARNING: Hotkey mapping used invalid key 'W71'
Link to comment
Share on other sites

Thanks for digging up the details. I found a recent bug report on SDL's Bugzilla that is related to this issue: https://bugzilla.libsdl.org/show_bug.cgi?id=3188

The bug report has not been aknowledged yet (update: there are now some comments on the report). I've seen a workaround in the yquake2 project: https://github.com/yquake2/yquake2/blob/AZERTY-workaround/src/backends/sdl/input.c#L393

Edited by crocmiam
  • Like 1
Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...