View Full Version : Multiple keyboards
Dan Potter
2005.01.05, 01:20 AM
Hi all, I'm new here (though chatting on IRC).. good to "meet" you all :)
I'm porting a console game to OSX which assumed the ability to have up to two keyboards connected to the console. The alphabetic keys are actually used in the game (it's a "typing of" type thing) so I can't just remap keys in the one keyboard to the two keyboards. Is there some way to handle reading events from two attached USB keyboards and be able to tell the input apart?
Thanks!
Fenris
2005.01.05, 05:41 AM
Hm, this was intriguing. You should investigate the HID Manager. Its documentation is HIDeous (sorry) so you'll want to look at the HID Utilities by George Warner. Search the forums! :)
Dan Potter
2005.01.05, 11:46 AM
I'll check on that stuff. Thanks!
And yeah, I hate to be negative, but a lot of Xcode's included documentation leaves a lot to be desired. I was fascinated by the "retro" SoundManager docs with examples all in Pascal. Also I've taken to using MSDN to look up OpenGL docs which seems somehow very wrong.
OneSadCookie
2005.01.05, 04:35 PM
the man pages are the best docs for OpenGL. As for the Carbon Sound Manager, the docs in Pascal are a good hint -- don't use it! (I believe it's even going to be officially deprecated in Tiger).
FCCovett
2005.01.05, 06:55 PM
I've uploaded a sample code to my web-site quite a while ago. Basically, it shows how to set up a window, Quartz and OpenGL contexts, save preferences, play audio with CoreAudio, read XML files, and use CarbonEvents, among other things. You may want to check it out, even though parts of the code have evolved a bit. http://webpages.charter.net/utopiaplanetia/BasicCarbonStruct.dmg
Dan Potter
2005.01.06, 01:09 PM
Great, thanks! I'll check that out.
On SoundManager, I'm currently only using it to play one-shot sound effects. I'm using CoreAudio for audio streaming already. SM just matched the APIs I already had pretty closely so it was really easy to get it going.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.