In this thread there is the needed source to add this feature to HID.cpp and keyboard.cpp, but I don't know how to implement it: https://forum.arduino.cc/index.php?topic=173583.new#new