@solid-primitives/keyboard 1.3.4 → 1.3.6
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/dist/index.js +10 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -116,7 +116,16 @@ export const useKeyDownList = /*#__PURE__*/ createSingletonRoot(() => {
|
|
|
116
116
|
if (typeof e.key !== "string")
|
|
117
117
|
return;
|
|
118
118
|
const key = e.key.toUpperCase();
|
|
119
|
-
|
|
119
|
+
// macOS never fires keyup for other keys held down together with Meta —
|
|
120
|
+
// only Meta's own keyup arrives — so its release must clear everything,
|
|
121
|
+
// or the other keys' stale state corrupts the next press.
|
|
122
|
+
// See https://github.com/solidjs-community/solid-primitives/issues/269
|
|
123
|
+
if (key === "META") {
|
|
124
|
+
reset();
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
setPressedKeys(prev => prev.filter(_key => _key !== key));
|
|
128
|
+
}
|
|
120
129
|
});
|
|
121
130
|
makeEventListener(window, "blur", reset);
|
|
122
131
|
makeEventListener(window, "contextmenu", e => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solid-primitives/keyboard",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "A library of reactive promitives helping handling user's keyboard input.",
|
|
5
5
|
"author": "Damian Tarnwski <gthetarnav@gmail.com>",
|
|
6
6
|
"contributors": [],
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@solid-primitives/
|
|
53
|
-
"@solid-primitives/
|
|
54
|
-
"@solid-primitives/
|
|
52
|
+
"@solid-primitives/rootless": "^1.5.3",
|
|
53
|
+
"@solid-primitives/utils": "^6.4.0",
|
|
54
|
+
"@solid-primitives/event-listener": "^2.4.5"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"solid-js": "^1.6.12"
|