Changes between Version 10 and Version 16 of Ticket #2043
- Timestamp:
- Jul 30, 2013, 11:09:35 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2043 – Description
v10 v16 1 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.1 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, same keyboard layout). I have a Belgian keyboard, so default keymapping is really different from the US one. 2 2 3 3 A ~/.config/0ad/config/local.cfg can receive modifications to have custom hotkeys, but some keys I needed where not available: § à ç è é 4 4 5 Theses keys are also present in the French keyboards (the only change for theses places is at place 6: "-" instead of "§").5 Theses keys are (in sdl 1.2) part of the SDLK_WORLD keys. 6 6 7 To have a full ctrl+1 to ctrl+0 bar, I added theses entries in the /0ad/source/ps/Keyname.cpp list : 7 Unfortunately, the numbers used are not always the same (at least different in OSX with french keyboard). 8 9 To allow people to have a full ctrl+1 to ctrl+0 bar without changing the sources and to anticipate the possible keypapping in the GUI, I added the full SDLK_WORLD key list in the /0ad/source/ps/Keyname.cpp list. 10 11 As the SDLK_WORLD are no more there in sdl2, I putted the definition there: 8 12 9 13 {{{ 10 { SDLK_WORLD_7, "Sect", 0 }, 11 { SDLK_WORLD_64, "Agrave", 0 }, 12 { SDLK_WORLD_71, "Ccedil", 0 }, 13 { SDLK_WORLD_72, "Egrave", 0 }, 14 { SDLK_WORLD_73, "Eacute", 0 }, 14 #if SDL_VERSION_ATLEAST(2, 0, 0) 15 { SDLK_KP_0, "Numpad 0", "Num0" }, 16 . 17 . 18 . 19 { SDLK_KP_9, "Numpad 9", "Num9" }, 20 #else 21 == { SDLK_WORLD_0, "World0", "W0" }, 22 . 23 . 24 . 25 { SDLK_WORLD_95, "World95", "W95" }, == 26 27 28 { SDLK_KP0, "Numpad 0", "Num0" }, 29 . 30 . 31 . 32 { SDLK_KP9, "Numpad 9", "Num9" }, 33 #endif 15 34 }}} 16 35 And configured the ~/.config/0ad/config/local.cfg like this: 17 36 18 37 {{{ 19 hotkey.selection.group.select.0 = Agrave20 hotkey.selection.group.save.0 = "Ctrl+ Agrave"21 hotkey.selection.group.add.0 = "Shift+ Agrave"38 hotkey.selection.group.select.0 = W64 39 hotkey.selection.group.save.0 = "Ctrl+W64" 40 hotkey.selection.group.add.0 = "Shift+W64" 22 41 hotkey.selection.group.select.1 = Ampersand 23 42 hotkey.selection.group.save.1 = "Ctrl+Ampersand" 24 43 hotkey.selection.group.add.1 = "Shift+Ampersand" 25 hotkey.selection.group.select.2 = Eacute26 hotkey.selection.group.save.2 = "Ctrl+ Eacute"27 hotkey.selection.group.add.2 = "Shift+ Eacute"44 hotkey.selection.group.select.2 = W73 45 hotkey.selection.group.save.2 = "Ctrl+W73" 46 hotkey.selection.group.add.2 = "Shift+W73" 28 47 hotkey.selection.group.select.3 = DoubleQuote 29 48 hotkey.selection.group.save.3 = "Ctrl+DoubleQuote" … … 35 54 hotkey.selection.group.save.5 = "Ctrl+LeftParen" 36 55 hotkey.selection.group.add.5 = "Shift+LeftParen" 37 hotkey.selection.group.select.6 = Sect38 hotkey.selection.group.save.6 = "Ctrl+ Sect"39 hotkey.selection.group.add.6 = "Shift+ Sect"40 hotkey.selection.group.select.7 = Egrave41 hotkey.selection.group.save.7 = "Ctrl+ Egrave"42 hotkey.selection.group.add.7 = "Shift+ Egrave"56 hotkey.selection.group.select.6 = W7 57 hotkey.selection.group.save.6 = "Ctrl+W7" 58 hotkey.selection.group.add.6 = "Shift+W7" 59 hotkey.selection.group.select.7 = W72 60 hotkey.selection.group.save.7 = "Ctrl+W72" 61 hotkey.selection.group.add.7 = "Shift+W72" 43 62 hotkey.selection.group.select.8 = Exclaim 44 63 hotkey.selection.group.save.8 = "Ctrl+Exclaim" 45 64 hotkey.selection.group.add.8 = "Shift+Exclaim" 46 hotkey.selection.group.select.9 = Ccedil47 hotkey.selection.group.save.9 = "Ctrl+ Ccedil"48 hotkey.selection.group.add.9 = "Shift+ Ccedil"65 hotkey.selection.group.select.9 = W71 66 hotkey.selection.group.save.9 = "Ctrl+W71" 67 hotkey.selection.group.add.9 = "Shift+W71" 49 68 }}} 50 The /0ad/binaries/data/config/keys.txt should also be updated .69 The /0ad/binaries/data/config/keys.txt should also be updated to warn theses keys are available. 51 70 52 71 I could manage to do this changes thanks to Philip` and RedFox| on the IRC, so a big thanks to them. … … 56 75 57 76 58 ''( to add otherkeys, you can temporary add the line''77 ''(To know which SDLK_WORLD number correspond to a keys, you can temporary add the line'' 59 78 60 79 {{{ … … 62 81 }}} 63 82 64 ''in the HotkeyInputHandler function of /0ad/source/ps/Hotkey.cpp then compile and lau ch the game in a terminal. an integer will be displayed when thekey is pressed:''83 ''in the HotkeyInputHandler function of /0ad/source/ps/Hotkey.cpp then compile and launch the game in a terminal. An integer will be displayed when a key is pressed:'' 65 84 66 85 {{{