Yes, you need to specify if the key is a modifier or not. They are handled very differently. All, eight, modifiers are sent as a single bit of the same byte in the protocol. Then there are 6 more bytes for the 6KRO keys sent in every HID package, they are stored one per byte. Setting the wrong flag in is_modifier gives rise to some very interesting bugs =)
So there is a code for each modifier as a key plus the modifier flag?
If not:
I see the modifiers get numbers 1, 2, 4, 8, 16, 32, 64, 128.
These are for Shift, Alt, Control and Super (GUI)
What about the rest of the modifiers?
There are Meta and Hyper which would require numbers 256, 512, 1024 and 2048.