0

How do you get key combinations in MakeCode keyboard extenti
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How do you get key combinations in MakeCode keyboard extenti

by bjimmy77 on Wed Jan 13, 2021 8:20 pm

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?
Screenshot 2021-01-13 171620.png
Screen capture of the usage of the unknown keyboard feature.
Screenshot 2021-01-13 171620.png (33.72 KiB) Viewed 439 times


https://youtu.be/njzR5_2ncgw?t=73

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

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

by franklin97355 on Wed Jan 13, 2021 10:58 pm

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.

franklin97355
 
Posts: 21965
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

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

by bjimmy77 on Wed Jan 13, 2021 11:59 pm

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.

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

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

by johnpark on Thu Jan 14, 2021 1:53 am

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

johnpark
 
Posts: 881
Joined: Wed Mar 25, 2009 2:15 pm

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

by adavid7 on Thu Jan 14, 2021 11:16 am

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

adavid7
 
Posts: 68
Joined: Fri Jul 04, 2014 7:32 pm

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

by johnpark on Thu Jan 14, 2021 12:17 pm

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.

johnpark
 
Posts: 881
Joined: Wed Mar 25, 2009 2:15 pm

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

by bjimmy77 on Thu Jan 14, 2021 1:28 pm

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.

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

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

by senjak on Tue Feb 23, 2021 5:13 am

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 | TOGGLE FULL SIZE
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)

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

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

by johnpark on Tue Feb 23, 2021 1:56 pm

Excellent, MUTE ALL THE THINGS!

johnpark
 
Posts: 881
Joined: Wed Mar 25, 2009 2:15 pm

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

by senjak on Tue Feb 23, 2021 2:09 pm

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.

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

Please be positive and constructive with your questions and comments.