Browser Events get pressed key

Hello,

Apologies if this has been asked before. I wanted to know if there’s a way to modify the browser events extension so that it returns which key was pressed / released instead of having to manually check for every single key.

Thank you.

2 Likes

Apologies for the lateness, but there is the :computer: Custom Keybinds Extension AKA MORE BUTTONS! extension which distinguishes between them!

Thank you for reaching out! Please, no apologies needed. I have used the extension before. It’s very nice but I don’t see any blocks that tells me which button the user pressed sadly.

1 Like

Ah, yeah, I was misremembering it! :upside_down_face:
It seems there’s no built-in way to do this, but you can use a function like this:

Which basically checks all of the keys and returns the first one that is true (If you expect your player will press multiple, though, you could make it return an array instead).

Here’s the link if you want to use the function!

3 Likes

Thank you! I ended up using the on “X” key pressed events. As scuffed as it looks, it at least servers its purpose well ahah.

2 Likes