You should probably be able to tell which is the external one as it will be connected via USB, so just check the DeviceID or PNPDeviceID strings.

For example using this:
 Code:
For Each $keybItem In GetObject('WinMgmts:root/cimv2').ExecQuery('select * from Win32_Keyboard', , 48)
	 "Description: " $keybItem.Description ?
	 "     Layout: " $keybItem.Layout ?
	 "   DeviceID: " $keybItem.DeviceID ?
	 "PNPDeviceID: " $keybItem.PNPDeviceID ?
	?
Next


My laptop reports:
 Quote:
Description: USB Human Interface Device
Layout: 00000809
DeviceID: USB\VID_049F&PID_0051&MI_00\9&168AC4D9&0&0000
PNPDeviceID: USB\VID_049F&PID_0051&MI_00\9&168AC4D9&0&0000

Description: Standard 101/102-Key or Microsoft Natural PS/2 Keyboard
Layout: 00000809
DeviceID: ACPI\PNP0303\4&38462492&0
PNPDeviceID: ACPI\PNP0303\4&38462492&0


Clearly, the first device connected via USB is the external device.