LMGetKbdType() is doented as being supported in Carbon; one of its
uses is to retrieve the keyboard layout resource ('KCAR') for the
keyboard in use. Under 10.2.6, calling LMGetKbdType() from a Carbon
PEF app two different machines return very different results. A G4/400
tower returns 204 (the black Apple USB keyboard), but a PowerBook G4
titanium returns 0, which means the KCAR resource returned by
GetResource() is NULL:

UInt8 KbdType = LMGetKbdType();
Handle KCAP_hndl = GetResource('KCAP', KbdType);

Oddly enough, the old Apple sample code classic app kcapApp works
correctly on both machines.

Is there a way around this 'feature'?


-=-=-=-=-