|
|
Linux Technical issues under Linux platform |
|
Thread Tools | Display Modes |
08-30-2009, 01:19 PM | #1 |
Apprentice
Join Date: Jun 2007
Posts: 73
|
Fix for key binding annoyances.
I was fed up with the non working arrow keys and the premium menu key.
So ... i fixed it. The arrow keys are mapped to WASD and the x,k keys are switched. HOWTO: Download & Unpack: http://xcb.freedesktop.org/dist/libxcb-1.4.tar.gz Apply diff: Download the attachment to the src folder patch -p0 < xcb_in.c.txt Compile: ./configure make DO NOT make install !!!!!!!! If you have problems, look here: http://xcb.freedesktop.org/DevelopersGuide/ Run game with: LD_PRELOAD=<folder you unpacked it in>/src/.libs/libxcb.so.1.1.0 ./rolauncher Edit: Maybe i will add a patch for not being able to select enemies later. DONE, see next post. Edit: DO NOT make install !!!!!!!! It will mess up your linux.
__________________
Regnum: It's Highly Addictive! Last edited by Eli2; 08-30-2009 at 03:53 PM. |
08-30-2009, 03:34 PM | #2 |
Apprentice
Join Date: Jun 2007
Posts: 73
|
Here it is, as you wished.
A fix for the "not sticking" bug when selecting Objects. Edit: After some testing i found out 10 pixels is not perfect. look for those lines + (ev->event_x < mouseX + 10 && ev->event_x > mouseX -10) && + (ev->event_y < mouseY + 10 && ev->event_y > mouseY -10) ) { and replace them with + (ev->event_x < mouseX + 20 && ev->event_x > mouseX -20) && + (ev->event_y < mouseY + 20 && ev->event_y > mouseY -20) ) {
__________________
Regnum: It's Highly Addictive! Last edited by Eli2; 08-30-2009 at 07:30 PM. |
08-30-2009, 06:17 PM | #3 |
Count
Join Date: Jun 2009
Location: France
Posts: 1,024
|
Fantastic
I use a slightly modified version of it to map keypad 0-9 to 0-9 on a french keyboard (since those require shift to be pressed on such keyboard). I use ZQSD with QD = strafe, AE=rotate, but it was mandatory to use 0-9 on keypad for me, and since the left hand is on ZQSD, the right one on mouse, it's rather difficult in action. I hope NGD will fix this in the game, here is my suggestions: - allow to map any action to any key combo - chat mode should be different from character control mode, allowing to map space bar to some spell. - all mouse buttons should be useable (next/prev buttons on some mouses) Thanks
__________________
Annavilya / War-Luck (Haven)
|
08-31-2009, 02:53 PM | #4 |
Master
Join Date: Jun 2007
Posts: 451
|
Hi,
Great work, I had a problem induced by own stupidity though: Preloading the patched library when starting the launcher works fine - i noticed since my password contained an x... However, when the games executable was started i got the following terminal output: Code:
ERROR: ld.so: object './libxcb.so.1.1.0' from LD_PRELOAD cannot be preloaded: ignored. Z. ps: each time i see someone talk about azerty keymaps it seems more awful to me - you have to press shift to access numbers???
__________________
Based on facts, as I choose to see them.
|
08-31-2009, 06:15 PM | #5 | |
Count
Join Date: Jun 2009
Location: France
Posts: 1,024
|
Quote:
But for entering numbers there is the numpad too. BTW, i add to drop the k/x swap since it affects chat dialog and other text entries (tekt and xeys ... ). And i configured only 1-3 (instead of 0-9) on top row, since 4 key is simple quote too .... so needed. If NGD implement fully configurable controls, i would love to be able to use spacebar to cast a spell, in WASD mode you can hit the spacebar with thumb
__________________
Annavilya / War-Luck (Haven)
|
|
08-31-2009, 08:09 PM | #6 |
Apprentice
Join Date: Jun 2007
Posts: 73
|
V 0.2 is out, now with chat Mode
__________________
Regnum: It's Highly Addictive! |
09-01-2009, 03:46 AM | #7 |
Baron
Join Date: Nov 2007
Location: Not where it looks like, to either of us.
Posts: 706
|
Heheh. Static variables should be declared for the function only. I promise, they'll still stay in the same place in memory if you move them there.
__________________
If you can't detect sarcasm yourself, please pay attention when it's pointed out to you.
Arathael :: Wyrd Sceote :: Gwn M'ger — Soul Taker, Imperial Guard of Ignis |
09-01-2009, 09:53 AM | #8 |
Master
Join Date: Jul 2008
Location: South Central USA
Posts: 260
|
Very nice work my friend
With your permission and without further objection from the users here I will include a patched lib in the RO package (with the option to use it or not set in /etc/default/regnum-online). Forgive perhaps a silly question.. what happens with you minimize RO? Do these key changes stick in other apps? If not then I think this would be a excellent option for people to have.
__________________
RA/Syrtis Hunter LVL50: Elusis RA/Syrtis Barba LVL50: Artemisia RA/Syrtis Conju Lvl45: Nellas Miriel |
09-01-2009, 11:09 AM | #9 |
Count
Join Date: Jul 2007
Location: Toulouse
Posts: 1,335
|
It should only work for RO according to the run command, but I may be wrong.
__________________
« Thanks all, you are right I'm great with the barbarian ... for killing mobs. » -- Athena Stillwater
|
09-01-2009, 01:16 PM | #10 |
Count
Join Date: Jun 2009
Location: France
Posts: 1,024
|
Those patches are obsolete, use the one here instead
Nice. But when chat mode is entered with mouse click... so when it occurs you may have k and x inverted, and Enter fails to revert to correct mode (since count is lost). So here is my patch: - it adds #define for each hack, each has to choose what he wants: #define REMAP_KX 1 /* swap K and X */ #define REMAP_ARROW_KEYS 1 /* remap arrows to WSAD */ #define REMAP_AZERTY_NUMBERS 1 /* remap 0-9 on top row of keyboard to num pad (ie. french keyboard) */ #define REMAP_SPACEBAR 1 /* Allow to use space bar to cast spell 1 */ - it adds a way to revert to chat mode using the backspace, so if you have k/x inverted in chat mode, just press backspace to fix. Additionnally, i had to patch configure.ac to be able to compile libxcb-1.4 on Ubuntu jaunty since it requires lib-proto 1.5 which is not available by default. I lowered the requirement to 1.4 and all seems to work (well, that's a hack in the hack...). Enjoy.
__________________
Annavilya / War-Luck (Haven)
Last edited by Zas_; 09-09-2009 at 04:49 PM. Reason: Obsolete patches |
|
|