Skip to content

Commit 5b8a640

Browse files
committed
add addon support to whenkeyhit
1 parent 77c494a commit 5b8a640

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/addons/gamepad/userscript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default async function (scaffolding, pointerlock) {
4848
const result = new Set();
4949
for (const blocks of allBlocks) {
5050
for (const block of Object.values(blocks._blocks)) {
51-
if (block.opcode === "event_whenkeypressed" || block.opcode === "sensing_keyoptions") {
51+
if (block.opcode === "event_whenkeypressed" || block.opcode === "event_whenkeyhit" || block.opcode === "sensing_keyoptions") {
5252
// For blocks like "key (my variable) pressed?", the sensing_keyoptions still exists but has a null parent.
5353
if (block.opcode === "sensing_keyoptions" && !block.parent) {
5454
continue;

0 commit comments

Comments
 (0)