Some basic setup I do to make my hardware keyboard work:

Apple Keyboard settings

I also like to set a few keys that are specific to the Apple Keyboard (the bluetooth wireless one)