Despite search before creating this topic I found the answer here
The right syntax is now Kaleidoscope.hid().keyboard().wasModifierKeyActive()
Kaleidoscope.hid().keyboard().wasModifierKeyActive()
Thanks to @merlin