Mailing List
Home
Forum Home
MUD Dev - Discussion of MUD system design, development, and implementation
Mac Game - Mac game development
Rivers of MUD - a Diku and Merc based multiuser dungeon
SMAUG
Subjects
Getting UDP through NAT/firewalls/whatever for a game
Getting UDP through NAT/firewalls/whatever for a game
QuickTime errors
Python script as stand alone MUD server
Various sound problems
Fragment Shaders & GL TEXTURE RECTANGLE EXT
Timers and global variables
Re: Language and platform for Text MUD server
Apparent acquisition of Yantis (mysupersales) by IDE
HID keyboard
Getting UDP through NAT/firewalls/whatever for a game
Microsoft Sparkle
Director MX
Congratulations Horizons
Yet more problems fullscreen mode
Apple Dev Kitchen Them 's tasty vittles, Maw!
NSOpenGLContext, Pbuffers, and drawables
More DCR "theft " naughtiness
dynamic sprite creation and imaging lingo
Re: Find stuff in Flash array?
Effects of skill imbalances?
QuickTime errors
Rom 2 4/Quickmud Enhancement/Bug fix
Working with XML files/CFURL
smooth scrolling/subpixel tweening
RE: (Ron help me?) Flash text
Flash Racing
MudDev FAQ 2
Browser based games
Installing GLUT
Special character in Flash XML
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Storing keybindings

Storing keybindings

2004-12-14       - By Wade Williams

 Back
Reply:     1     2     3     4     5     6  

All:

We're trying to solve a problem I can't believe hasn't been solved
before, and I'm looking for ideas on solving it.

When a user maps a key in our GUI keymapping utility, we write the key
corresponding the to virtual key (vKey) and any modifiers to a plain
text file that stores the keymappings.

For example, they may map the "Fire guns" function to Shift-1, and we
write:

Fire guns = Shift + 1

in our keymapping file.

When we read the file back in, we use some code that walks the KCHR
resource to find the vKey associated with the "1" key and then map
"fire guns" to Shift + that vKey.  The code essentially does the
reverse of KeyTranslate() - i.e. it goes from character to virtual key.

This all works fairly well.  I'm sure there are some failure cases, but
we haven't seem to hit many.

So, why not use ASCII character values?  Because we don't want to store:

Fire guns = !

and the obvious problem that many keys don't produce characters, which
would prevent them from being mapped under this method (how does write
write an ASCII character to represent Control-Shift-D for example?)

Now we want to move our app to Unicode.

There appear to be two solutions:

1)  Write code that walks the uchr resource and provides
character-to-vKey mapping.  Yes, the number of failure cases would be
huge and I understand that some characters take multiple keypresses to
generate.  Still, if you want to store your key bindings in
human-readable form, this is the only solution I can think of.

2)  Come up with a completely new way to store key mappings.

We would *really* like the keyboard mappings to be in a user-editable
file, so storing the vKey itself for example is not a desirable
solution.

All thoughts appreciated.

Thanks,

Wade

__ ____ ____ ____ ____ ____ ____ ____ ____ ____
Do not post admin requests to the list. They will be ignored.
Mac-games-dev mailing list      (Mac-games-dev@(protected))
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-games-dev/junlu%405341.com

This email sent to junlu@(protected)

Earn $52 per hosting referral at Lunarpages.