A syllable is, in general, composed of a three hangul jama characters, one with a light red background, one with a light green background, and one with a light blue background, which should be selected in that order.
Many units, such as ᄑ and ᇁ, look the same but difffer in whether, when combined, they go at the top or bottom of the block. A keyboard ought to be able to assign them to their correct place, but my implementation of a keyboard doesn't, making it of limited use.
Unicode 5.2 Character Code Chart "Hangul Jamo"
Wikipedia on "Hangul - jamo"
Some Hangul keyboards