@leonabcd123/modern-caps-lock 3.0.6 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -10
- package/lib/index.js +1 -1
- package/lib/os-detection.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,9 +13,7 @@ Modern Caps Lock provides an easy way to check whether Caps Lock is active, and
|
|
|
13
13
|
3. [Examples](#examples)
|
|
14
14
|
1. [Print Caps Lock state after every change](#print-caps-lock-state-after-every-change)
|
|
15
15
|
2. [Get current Caps Lock state](#get-current-caps-lock-state)
|
|
16
|
-
4. [
|
|
17
|
-
1. [Supported Platforms](#supported-platforms)
|
|
18
|
-
2. [Unsupported Platforms](#unsupported-platforms)
|
|
16
|
+
4. [Supported Platforms](#supported-platforms)
|
|
19
17
|
5. [Limitations](#limitations)
|
|
20
18
|
6. [Credits](#credits)
|
|
21
19
|
|
|
@@ -77,18 +75,13 @@ if (isCapsLockOn()) {
|
|
|
77
75
|
}
|
|
78
76
|
```
|
|
79
77
|
|
|
80
|
-
###
|
|
81
|
-
|
|
82
|
-
##### Supported Platforms
|
|
78
|
+
### Supported Platforms
|
|
83
79
|
|
|
84
80
|
- Windows
|
|
85
81
|
- Mac
|
|
86
82
|
- Linux
|
|
87
83
|
- iPad
|
|
88
|
-
|
|
89
|
-
##### Unsupported Platforms
|
|
90
|
-
|
|
91
|
-
- Platforms using [GBoard](https://en.wikipedia.org/wiki/Gboard)
|
|
84
|
+
- Android
|
|
92
85
|
|
|
93
86
|
### Limitations
|
|
94
87
|
|
package/lib/index.js
CHANGED
|
@@ -41,7 +41,7 @@ document.addEventListener("keyup", (event) => {
|
|
|
41
41
|
else if (os === "Windows") {
|
|
42
42
|
capsState = getCapsLockModifierState(event);
|
|
43
43
|
}
|
|
44
|
-
else if (event.key !== "CapsLock") {
|
|
44
|
+
else if (event.key !== "CapsLock" && event.key !== "Unidentified") {
|
|
45
45
|
capsState = getCapsLockModifierState(event);
|
|
46
46
|
}
|
|
47
47
|
callCallbackIfNeeded();
|
package/lib/os-detection.js
CHANGED