How do you get key combinations in MakeCode keyboard extenti

Microsoft's MakeCode platform for easy blocks-style programming

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bjimmy77
 
Posts: 3
Joined: Wed Jan 13, 2021 8:00 pm

How do you get key combinations in MakeCode keyboard extenti

Post by bjimmy77 »

In his MakeCode minute video, @johnpark uses the keyboard extension in MakeCode to control the mute of Zoom and Google Meet by using the CPX to send commad+d or ctrl+d to Meet based on a button press on the CPX. I tried replicating this, but the extention doesn't seem to support the features he was using. Is there a different version of the keyboard extension that can handle this or am I just missing it in MakeCode?

If you look at the screen at time 1:13 you can see "keyboard type "d" with command". How do you get the with <keypress> to show up?
Screen capture of the usage of the unknown keyboard feature.
Screen capture of the usage of the unknown keyboard feature.
Screenshot 2021-01-13 171620.png (33.72 KiB) Viewed 970 times
https://youtu.be/njzR5_2ncgw?t=73

User avatar
Franklin97355
 
Posts: 23902
Joined: Mon Apr 21, 2008 2:33 pm

Re: How do you get key combinations in MakeCode keyboard ext

Post by Franklin97355 »

If you "show more" there is a link to John's full length YT https://www.youtube.com/watch?v=fwiTd272A6Y that might be of help although I didn't watch it yet.

User avatar
bjimmy77
 
Posts: 3
Joined: Wed Jan 13, 2021 8:00 pm

Re: How do you get key combinations in MakeCode keyboard ext

Post by bjimmy77 »

Thanks for the reply, the full video did not add any additional information about how he got those options. He must have a beta version or something. It looks like there might be a circuit python way of doing it but that's a bit more difficult.

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: How do you get key combinations in MakeCode keyboard ext

Post by johnpark »

Hi -- I think you're correct, that's a beta feature, all you need to do is add "beta" to the url like this: https://makecode.adafruit.com/beta#editor

User avatar
adavid7
 
Posts: 120
Joined: Fri Jul 04, 2014 7:32 pm

Re: How do you get key combinations in MakeCode keyboard ext

Post by adavid7 »

John, do you know if there is any documentation on changes and new features in this beta? I stumbled across a few things when someone mentioned it in another thread (return values for functions, e.g.!) , but was wondering if there is a change list. Also when it will become the official release?

Thanks,

.Andy

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: How do you get key combinations in MakeCode keyboard ext

Post by johnpark »

adavid7, MakeCode for Circuit Playground Express itself is not in beta, but there is always a beta available for testing upcoming features.
Microsoft doesn't have a release notes page for MakeCode AFAIK, so the best places to check up on new features are their GitHub repos https://github.com/topics/pxt as well as their Forums https://forum.makecode.com/ and Blog https://makecode.com/blog.

User avatar
bjimmy77
 
Posts: 3
Joined: Wed Jan 13, 2021 8:00 pm

Re: How do you get key combinations in MakeCode keyboard ext

Post by bjimmy77 »

Thanks John, it looks like that feature is available in the beta editor. I'll give it a try. I appreciate the fast response time.

User avatar
senjak
 
Posts: 12
Joined: Fri May 08, 2020 2:14 am

Re: How do you get key combinations in MakeCode keyboard ext

Post by senjak »

johnpark wrote:Hi -- I think you're correct, that's a beta feature, all you need to do is add "beta" to the url like this: https://makecode.adafruit.com/beta#editor
Thank you!!! I'm making a giant mute button and I needed multiple types of mutes.

Code: Select all

input.pinA1.onEvent(ButtonEvent.LongClick, function () {
    pause(100)
    light.showAnimation(light.rainbowAnimation, 2000)
    light.setAll(0x000000)
})
input.pinA1.onEvent(ButtonEvent.Click, function () {
    if (ledon == 0) {
        pause(100)
        light.setAll(0x00ff00)
        gamepad.setButton(GamepadButton.Up, false)
        pause(100)
        keyboard.type("A", KeyboardModifierKey.ShiftAlt)
        ledon = 1
        pause(100)
    } else {
        pause(100)
        light.setAll(0xff0000)
        gamepad.setButton(GamepadButton.Up, true)
        pause(100)
        keyboard.type("A", KeyboardModifierKey.ShiftAlt)
        ledon = 0
        pause(100)
    }
})
let ledon = 0
light.showAnimation(light.rainbowAnimation, 2000)
light.setAll(0x00ffff)

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: How do you get key combinations in MakeCode keyboard ext

Post by johnpark »

Excellent, MUTE ALL THE THINGS!

User avatar
senjak
 
Posts: 12
Joined: Fri May 08, 2020 2:14 am

Re: How do you get key combinations in MakeCode keyboard ext

Post by senjak »

Would there be an interest in my parts list and build notes? My current device is configured to mute/unmute Discord, Google Meetings, and Zoom. Unlike many of the solutions out there, mine doesn't need an additional software component on the PC/Mac.

Oh, and for everything but Discord you might need to manually sync the colors :-)

My next build challenge is to use a different (cheaper!) Adafruit processor.

Locked
Please be positive and constructive with your questions and comments.

Return to “MakeCode”