Apparent keymap issue - resolved, kind of . . .

Help with Setup, Hardware, Performance or other Issues...Or just pimp your rig.
Post Reply
tadawson
Private
Private
Posts: 4
Joined: Sat Sep 15, 2007 12:04 am

Apparent keymap issue - resolved, kind of . . .

Post by tadawson »

I have been trying to get a version of bzflag that will work on my Linux system. The code compiles fine, and installs cleanly as well. The problem is that the program does not recognize cursor up or down on the initial config screens, making menu navigation very difficult. Tab will move down, so I can see that all else is working, but since bzflag does not itself link to curses, I am stumped as to why it is deaf to these keys. Both /etc/termcap and terminfo are correct, and these keys function in other programs . . . .

Even a pointer to the section of code that is handling this input in the source would be helpful - I have not found it yet, and am not really up for reading the whole doggone release!

Ncurses has been upgraded to 5.6, with no change. (was 5.3). XFree86 is version 4.6.0, kernel is 2.6.22.5, and the distro is more or less slackware, but I evolve it outside of the release tree to stay more current.

Xev shows KP_Up, KP_Down, KP_Left, and KP_Right events for the cursor keys, and in ASCII, they send (and yes, these are the arrow keys, and not the pad - that does send the same keycodes, however . . . ):

Up: \E[A
Down: \E[B
Right: \E[C
Left: \E[D

Any suggestions? I suspect that this is pretty simple in actuality, but I am stumped at the moment.

- Tim
Last edited by tadawson on Tue Sep 18, 2007 3:40 am, edited 1 time in total.
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak »

Are you using SDL or X for your platform (if you're using SDL, it will say so at the end of your version output...i.e. "BZFlag 2.0.8.20070907-RELEASE-dragonfly1.6.1-SDL")? The codepaths for handling input are very different between them.

For what it's worth, building with SDL has more features and is generally more reliable than trying to use X directly. Either way the behavior you're seeing is likely a bug.
tadawson
Private
Private
Posts: 4
Joined: Sat Sep 15, 2007 12:04 am

Post by tadawson »

BZFlag client 2.0.9.20070915-DEVEL-linux-gnu-SDL (protocol 0026) http://BZFlag.org/
Copyright (c) 1993 - 2007 Tim Riker

I have seen this problem with 2.0.6, 2.0.8, and now 2.0.9. The interesting revelation, though, is that by changing keyboards, it now functions - my primary keyboard only sends KP_Up, KP_Down, etc. and not just Up, Down, etc. events, and apparently bzflag was never written to support the keypad cursor keys. As such, I think I will change this to an enhancement request - those arrow keys are just as valid as the others, and it should be a trivial change . . .

On a secondary note, now I have either speed or crash problems. With the XFree 4.6.0 NVidia server ("nv" module), everything from the config screen out is slow as mud. If I use Nvidia's server, the config screens run like lightning, but bzflag memory faults joining a game . . . ***sigh***

Both have GL/GLX support configured, and display the same list of extensions.

- Tim
User avatar
Macrosoft
Private First Class
Private First Class
Posts: 142
Joined: Fri May 04, 2007 2:21 am

Post by Macrosoft »

try the restricted nvidia driver System>Administration>Restricted Drivers Manager
gazz: A bullet may have your name on it, but shrapnel is addressed "to whom it may concern".
http://bash.org/?785529
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak »

Macrosoft, please read his post before posting stuff that has no relevance. He uses a Slackware variant, not Ubuntu.

Yeah, we don't poll keypad keys for menu movement. We could do so, I suppose; I'll see if anyone has any objections first.

"nv" is not 3d accelerated, so your performance will suck when using it. "nvidia" is, and should work. I'm interested in where it's crashing - do you have a backtrace? ("gdb bzflag", make it crash, "bt") If it's in our code, there may be something we can do about it.
tadawson
Private
Private
Posts: 4
Joined: Sat Sep 15, 2007 12:04 am

Post by tadawson »

DTRemenak wrote:Macrosoft, please read his post before posting stuff that has no relevance. He uses a Slackware variant, not Ubuntu.

Yeah, we don't poll keypad keys for menu movement. We could do so, I suppose; I'll see if anyone has any objections first.

"nv" is not 3d accelerated, so your performance will suck when using it. "nvidia" is, and should work. I'm interested in where it's crashing - do you have a backtrace? ("gdb bzflag", make it crash, "bt") If it's in our code, there may be something we can do about it.
I have an older card, so have to run and older driver, but will run a trace here momentarily . . . . gotta relight the thing back onto the old server first - more in a few . . .

- Tim
tadawson
Private
Private
Posts: 4
Joined: Sat Sep 15, 2007 12:04 am

Post by tadawson »

Just put the old server config file back in place (no changes whatsoever . . . ) and the dang thing works beautifully now . . . . so, sorry and all, I can't do a trace right now . . . I will bring this thread back to life if the problem recurs, but for now, I am pretty much golden! Thanks for all the help, and my condolences to those that are stuck on Windows!

- Tim
Post Reply