Opened 11 years ago
Last modified 11 years ago
#2043 closed enhancement
Adding some Belgian keymapping for the hotkeys — at Initial Version
Reported by: | lsdh | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 14 |
Component: | Core engine | Keywords: | simple patch |
Cc: | Patch: |
Description
On Linux (tested on Ubuntu 13.4 with gnome shell); the hotkeys ctrl+1 to ctrl+0 did not work natively in my case (but does in Windows 7, same computer). I have a Belgian keyboard, so default keymapping is really different from the US one.
A ~/.config/0ad/config/local.cfg can receive modifications to have custom hotkeys, but some keys I needed where not available: § à ç è é
Theses keys are also present in the French keyboards (the § is not in the same place).
To have a full ctrl+1 to ctrl+0 bar, I added theses entries in the /0ad/source/ps/Keyname.cpp list :
{ SDLK_WORLD_7, "World7", "W7" }, // § { SDLK_WORLD_64, "World64", "W64" }, // à { SDLK_WORLD_71, "World71", "W71" }, // ç { SDLK_WORLD_72, "World72", "W72" }, // è { SDLK_WORLD_73, "World73", "W73" }, // é
And configured the ~/.config/0ad/config/local.cfg like this:
hotkey.selection.group.select.0 = W64 hotkey.selection.group.save.0 = "Ctrl+W64" hotkey.selection.group.add.0 = "Shift+W64" hotkey.selection.group.select.1 = Ampersand hotkey.selection.group.save.1 = "Ctrl+Ampersand" hotkey.selection.group.add.1 = "Shift+Ampersand" hotkey.selection.group.select.2 = W73 hotkey.selection.group.save.2 = "Ctrl+W73" hotkey.selection.group.add.2 = "Shift+W73" hotkey.selection.group.select.3 = DoubleQuote hotkey.selection.group.save.3 = "Ctrl+DoubleQuote" hotkey.selection.group.add.3 = "Shift+DoubleQuote" hotkey.selection.group.select.4 = SingleQuote hotkey.selection.group.save.4 = "Ctrl+SingleQuote" hotkey.selection.group.add.4 = "Shift+SingleQuote" hotkey.selection.group.select.5 = LeftParen hotkey.selection.group.save.5 = "Ctrl+LeftParen" hotkey.selection.group.add.5 = "Shift+LeftParen" hotkey.selection.group.select.6 = W7 hotkey.selection.group.save.6 = "Ctrl+W7" hotkey.selection.group.add.6 = "Shift+W7" hotkey.selection.group.select.7 = W72 hotkey.selection.group.save.7 = "Ctrl+W72" hotkey.selection.group.add.7 = "Shift+W72" hotkey.selection.group.select.8 = Exclaim hotkey.selection.group.save.8 = "Ctrl+Exclaim" hotkey.selection.group.add.8 = "Shift+Exclaim" hotkey.selection.group.select.9 = W71 hotkey.selection.group.save.9 = "Ctrl+W71" hotkey.selection.group.add.9 = "Shift+W71"
The /0ad/binaries/data/config/keys.txt could also be updated.
I could manage to do this changes thanks to Philip` and RedFox| on the IRC, so a big thanks to them.