Caps lock tracking

I’m writing an application using iced and I have to show the user if the caps lock is active. Currently, I listen to the keyboard events and when the caps lock key is pressed I flip a flag in the state of my application.
This method works but if the caps lock is already active before the application starts everything falls apart.
The modifiers key doesn’t track the caps lock so I wonder if there is a solution to this problem.


It doesn’t seem like winit provides a way to check the caps lock status.