This is terribly broken on Mac OS X. The default keycode layout does not put the number keys on my QWERTY laptop keyboard anywhere near that range, and as a matter of fact the number keys aren't even contiguous. The keycodes #10 thru #18 are mapped to other keys, such as "f" and "h", causing bizarre behavior with this default configuration. (For example, Mod4-h will switch to tag 3 and then resize the master window down one notch.)

I'm not really sure of a solution that works on OS X and is acceptable to the non-QWERTY folks...