Open justingolden21 opened 5 months ago
Is this repo still taking pull requests?
Let me know if there's anything you'd like me to update or fix.
Thanks for the contribution :+1: I may accept PRs, but my bandwidth is very low, so it could take a long time :sweat:.
As far as I know, there is no way to detect reliably if CapsLock is on in a browser: what you did only detects that the button has been pressed, it doesn't detect when CapsLocks is turned off (not immediately) or if CapLocks is turned on outside the browser window. And showing it isn't really helpful, as the user may not know what it changes.
Instead I would rather show a toast message giving feedback about the action that has just been perform. Example:
All good on the bandwidth, don't stress it 😁
And yeah it can't detect on load, but any time any key at all is pressed, it will get the correct value, even if they press caps lock in another tab or elsewhere. But it only runs when they hit a key in this app.
I think you know best for the UX for your app, so a toast message seems fine as well. I simply think something should be done UX wise as it's rather confusing if you don't know caps is on.
Will show "CapsLock On" text in the top right UI when caps lock is on
There seems to be no way to detect this on load, but
$event.getModifierState('CapsLock')
seems to work when adding todocument:keydown
. When hitting any letter or the CapsLock itself, the correct state is added.I tried to mimic the coding style of some other merged PRs and keep the aesthetic similar with the colors, padding, and right margin, but feel free to let me know if there's something you'd like updated.
Resolves https://github.com/Yqnn/svg-path-editor/issues/120