On 24 May 2009, at 02:26, Spencer Salazar wrote:
I'm pretty sure there is no direct way to go from SpaceNavigator -> ChucK. In its current form, ChucK HID only deals with devices that identify themselves as keyboards, mice, or joysticks.
There is a a file /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/ IOKit/hid/IOHIDUsageTables.h which defines HID type numbers and there controller variables kHIDUsage_GD_Pointer = 0x01, /* Physical Collection */ kHIDUsage_GD_Mouse = 0x02, /* Application Collection */ /* 0x03 Reserved */ kHIDUsage_GD_Joystick = 0x04, /* Application Collection */ kHIDUsage_GD_GamePad = 0x05, /* Application Collection */ kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */ kHIDUsage_GD_Keypad = 0x07, /* Application Collection */ kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */ Perhaps it is a multiaxis controller, then.
I actually bought one of these a while back for the specific purpose of getting it to work in ChucK, so there's a definite possibility of that manifesting in some form. In the long term, I think it would be better if ChucK had a way of dealing with any kind of generic HID.
One would want a way to list all available devices, and make a pick from them. (Like 'chuck --probe' but for HIDs and within the program.) There are though a lot of controller types. Further down in the file mentioned above: kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */ kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */ kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */ kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */ kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */ kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */ kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */ kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */ kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */ kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */ kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */ kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */ /* 0x0D - 0x1F Reserved */ kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */ kHIDUsage_Sim_FlightStick = 0x21, /* Application Collection */ kHIDUsage_Sim_CyclicControl = 0x22, /* Physical Collection */ kHIDUsage_Sim_CyclicTrim = 0x23, /* Physical Collection */ kHIDUsage_Sim_FlightYoke = 0x24, /* Application Collection */ kHIDUsage_Sim_TrackControl = 0x25, /* Physical Collection */ ... Do you want them all? :-) Hans