diff --git a/src/extensions/scratch3_microbit/index.js b/src/extensions/scratch3_microbit/index.js index acac5c107..7fcc6c74b 100644 --- a/src/extensions/scratch3_microbit/index.js +++ b/src/extensions/scratch3_microbit/index.js @@ -751,11 +751,11 @@ class Scratch3MicroBitBlocks { */ isButtonPressed (args) { if (args.BTN === 'any') { - return this._peripheral.buttonA | this._peripheral.buttonB; + return (this._peripheral.buttonA | this._peripheral.buttonB) === 1; } else if (args.BTN === 'A') { - return this._peripheral.buttonA; + return this._peripheral.buttonA === 1; } else if (args.BTN === 'B') { - return this._peripheral.buttonB; + return this._peripheral.buttonB === 1; } return false; }