At 37b1b03ab105aedaef6654970b31e480b8cc5806, there are several issues we need to address to make the new keyboard correctly functioning on OS X.
1) OS X seems to assume that the USB logical maximum values are always signed.
Therefore, in the class specific descriptor,
0x25, 0xFF, // LOGICAL_MAXIMUM (255)
doesn't work on OS X while both Windows and Linux accept it. The solution is to use a word value instead of a byte value:
0x26, DESC_CONFIG_WORD(0xFF), // LOGICAL_MAXIMUM (255)
2) The order of keycodes in array fields has no significance in OS X.
This is what the HID specification says and OS X follows. Note both Windows and Linux preserve the order and we can send a Romaji sequence in a single array, which doesn't work on OS X.
3) ことえり does not convert "xn" to "ん" by default.
4) かな(KEY_LANG1) and 英数(KEY_LANG2) should be used instead of F13 and F14.
At 37b1b03ab105aedaef6654970b31e480b8cc5806, there are several issues we need to address to make the new keyboard correctly functioning on OS X.
1) OS X seems to assume that the USB logical maximum values are always signed. Therefore, in the class specific descriptor, 0x25, 0xFF, // LOGICAL_MAXIMUM (255) doesn't work on OS X while both Windows and Linux accept it. The solution is to use a word value instead of a byte value: 0x26, DESC_CONFIG_WORD(0xFF), // LOGICAL_MAXIMUM (255)
2) The order of keycodes in array fields has no significance in OS X. This is what the HID specification says and OS X follows. Note both Windows and Linux preserve the order and we can send a Romaji sequence in a single array, which doesn't work on OS X.
3) ことえり does not convert "xn" to "ん" by default.
4) かな(KEY_LANG1) and 英数(KEY_LANG2) should be used instead of F13 and F14.