The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 10, 2024, 02:47:53 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  Key Binder
« previous next »
Pages: [1] 2 Print
Author Topic: Key Binder  (Read 4417 times)
Christian Johansen
Guest


Email
Key Binder
« on: August 21, 2004, 12:43:02 am »

   How about a key binding utitlity like the PC had, to re-configure controls? Or is that going to be included in the Setup menu? (Though it's one of the rare games that has great default keys)
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Key Binder
« Reply #1 on: August 21, 2004, 08:04:53 am »

It will be in the setup menu. It's already possible to change the keys, but you have to edit a config file.
The bug report for this issue can be found at http://uqm.stack.nl/cgi-bin/bugs/show_bug.cgi?id=42.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
AusME
Zebranky food
*
Offline Offline

Gender: Male
Posts: 5


Sanity is for the weak of mind.


View Profile
Re: Key Binder
« Reply #2 on: August 21, 2004, 11:43:05 am »

On a related issue, does anyone know what causes key jamming anyways?
Logged
Zeep-Eeep
Enlightened
*****
Offline Offline

Gender: Male
Posts: 917


Good Grief


View Profile WWW
Re: Key Binder
« Reply #3 on: August 21, 2004, 05:20:20 pm »

I'm not sure about this, but I have a theory. Key jamming seems to
happen when three or more keys are pressed at once, during melee.
It is my theory that the computer is receiving three inputs at a time, but
can only read one key from the input buffer at a time.
To try to see another example of this, open a text editor and hold
down the "J" key, then hold down the "R" key. Heck hold down one or
two more and see what gets printed on the screen.
Logged

What sound does a penguin make?
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Key Binder
« Reply #4 on: August 21, 2004, 07:04:43 pm »

Nope. That's not it.

Key jamming is a physical problem that exists on many keyboards (not all though). See here for instance (they call it "masking" there).
What you are describing is hardware key repeat. The keyboard controller (I'm not sure which one; the one in the keyboard, or the one on the main board) repeats the last key holded until it is released. But this can be turned off, so all that a program receives is an event for a key press, and an event for a key release. If one or more keys needs to be repeated, that can then be done in software. This is the way key repeat on the starmap works for instance.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
taleden
Zebranky food
*
Offline Offline

Gender: Male
Posts: 20



View Profile
Re: Key Binder
« Reply #5 on: August 22, 2004, 02:13:53 am »

My experience is that it has more to do with the software than the hardware.  I toyed around with writing some game engines in Turbo Pascal back in the day, and there are numerous libraries available to handle keyboard input - some of them were vulnerable to key jamming (i.e. specific pairs or combinations of keys would block eachother) more than others, and the specific keys that jammed varied with each library.  So my guess is that it's basically an issue in the keyboard event handler, which is hooked into the OS kernel (usually by redirecting an OS interrupt using assembly code - at least that's how it was generally done when I looked at the source for the keyboard libraries I used to use).  If there are specific keys that jam in UQM, it could probably be corrected by writing/using a better keyboard interrupt handler in the code.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Key Binder
« Reply #6 on: August 22, 2004, 04:54:02 am »

I wouldn't be surprised if there were buggy keyboard handlers out there, but  almost always the cause of key jamming is a real hardware limitation.

Also, your info on keyboard handling is a bit outdated.
On modern OS's programs don't interface directly with the hardware (and often can't). That's what device drivers are for.
The way to access raw keyboard codes in unix systems (at least all the ones I know) is to set the keyboard in raw mode using ioctls (which can be done through tcsetattr), and then just read() from the tty.
In Windows you could get them through the event queue, but it's probably better for games to use DirectInput.
Now what we are using in UQM is SDL, a library which provides a platform-indepentant interface to the underlying OS functionality.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
taleden
Zebranky food
*
Offline Offline

Gender: Male
Posts: 20



View Profile
Re: Key Binder
« Reply #7 on: August 22, 2004, 06:02:52 am »

So key jamming is unsolvable, and will always be different depending on each user's particular keyboard?  Weird.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Key Binder
« Reply #8 on: August 22, 2004, 06:34:25 am »

Some keyboards are better for games than others. Interestingly enough, in my experience it's the old keyboards that work the best. There are some keyboards where you can press every single key at the same time, and all of them will be registered.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Profound_Darkness
Zebranky food
*
Offline Offline

Posts: 48


Current Mood: RL-Buisy...


View Profile WWW
Re: Key Binder
« Reply #9 on: August 22, 2004, 11:05:27 am »

In my experience the problem is hardware (or driver level). Yes it also appears to be a new keyboard issue. Basicaly the keyboard can only tell the computer that so many keys are being held down.  The problem became obvious to me around the days of windows95.  Most keyboards that have this problem often will have one or more of the lights (num lock, caps lock, scroll lock) either glow faintly or be fully lit up when masses of keys are held down.  Not all keyboards mind you but just about every one I have had since I noticed this.

They probobly did an optimization on keyboard firmware/software a while back for the fact that on average the most number of keys that might be held down is 4 (ctrl+alt+shift+any other key).  Too bad...  I also wish they would bring back the clicky type keyboard (spring loaded keys) rather than these soft touch keyboards, those were better for gaming IMO.  *I* would expect that usb keyboards don't have this problem as much.
Logged

Michael Martin
Core Team
*Smell* controller
*****
Offline Offline

Posts: 387



View Profile
Re: Key Binder
« Reply #10 on: August 25, 2004, 03:10:07 am »

It's weirder than that.  The shift keys seem to be more carefully wired.  I've had keyboards where you can hold, for instance, Ctrl-Shift-anything, and all three will register, but you cannot register Up, Right, and Space at the same time.
Logged
Zeep-Eeep
Enlightened
*****
Offline Offline

Gender: Male
Posts: 917


Good Grief


View Profile WWW
Re: Key Binder
« Reply #11 on: August 25, 2004, 08:50:32 am »

I seem to remeber that key jamming was a problem on my older computer (486) as well as the new one. Espeically during super melee. Two player games required that both players wouldn't hold more than two keys at once, or it became unusable.
Logged

What sound does a penguin make?
Terminator
*Smell* controller
****
Offline Offline

Gender: Male
Posts: 308


Obnoxious One Reformed


View Profile
Re: Key Binder
« Reply #12 on: August 25, 2004, 09:45:30 am »

I had to deal with something similar when I was using WinXP when certain keys(shift, alt and spacebar specificly) are pressed repeatly, a box comes up, about feature called quickkeys, or easykeys or whatever and it made UQM(at last for me) unplayablehold down any key(don't look for the "any key" please) and see how fast the PC loops it. It's impossible to play Melee that way, is there any way around this(aside from changing the keys).
Logged

We must each create our own paths. Do not mimic mine, I don't even like myself.
Profound_Darkness
Zebranky food
*
Offline Offline

Posts: 48


Current Mood: RL-Buisy...


View Profile WWW
Re: Key Binder
« Reply #13 on: August 25, 2004, 03:19:08 pm »

As for the popups from winxp that is the accessibility shortcuts trying to kick in.  Simply go to your computer's control panel and open accessibility, turn off any accessibility features that might be on and make sure you turn off the shortcut keys too.  Not sure how winxp words the thing but I think it's a checkbox that sais accessibility shortcut or something...

As for the repeat rate, I thought uqm ignored keyboard repeat rates and instead tracks keys at a lower level (if down or up or rather state changes of the keyboard device).
Logged

Michael Martin
Core Team
*Smell* controller
*****
Offline Offline

Posts: 387



View Profile
Re: Key Binder
« Reply #14 on: August 28, 2004, 04:24:20 am »

Quote
As for the repeat rate, I thought uqm ignored keyboard repeat rates and instead tracks keys at a lower level (if down or up or rather state changes of the keyboard device).


It gets signalled every time a key is depressed or released (and then factors those all together into the actions like "player-1-thrust").  Obviously if you use some kind of autofire joystick, wackiness will ensue.
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!