The preferred one is to use HAL because it uses hardware information (which is a quite reliable source) to choose the keyboard model in a database. It means that if your keyboard model as been defined in the database your keys are recognized "out of the box" and can be seen by Xorg. That's why by expanding the database you are helping the linux community and maybe someday we won't have to care about scancodes.