What is hardware type ID in keylayout xml file?
I got an excellent answer in the Google Group "Ukelele Users" (link directly to the answer) from John Brownie. The hardware ID is what is returned by CGEventSourceGetKeyboardType. Mr Brownie writes: 


  The keyboard ID is what is reported back to the system when certain
  system calls are made. Historically, these were 'gestalt' calls, but
  currently it uses Quartz Events, calling CGEventSourceGetKeyboardType.


For a list of IDs, see the answer in the group.