0

Makecode output Shift keypress?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Makecode output Shift keypress?

by jamok on Fri Mar 15, 2019 2:01 am

I am trying to figure out how to get an output of just a shift key press and am having no luck.

jamok
 
Posts: 7
Joined: Mon Mar 04, 2019 10:35 pm

Re: Makecode output Shift keypress?

by johnpark on Mon Mar 25, 2019 2:05 pm

I don't believe that's possible using MakeCode's HID implementation. There are HID keycodes for the shift keys, so it should possible for it to be added to MakeCode. You may want to make a feature request for it on the Microsoft MakeCode GitHub page. https://github.com/Microsoft/pxt-adafruit/issues

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

Re: Makecode output Shift keypress?

by jamok on Mon Mar 25, 2019 7:20 pm

Thank you for letting me know. I have started to see if I can learn circuit python because I have seen things saying that may be the only way I can do this. Asking for this to be added may be much quicker that trying to learn programming from scratch. :)

jamok
 
Posts: 7
Joined: Mon Mar 04, 2019 10:35 pm

Re: Makecode output Shift keypress?

by johnpark on Mon Mar 25, 2019 7:48 pm

This guide will show you how to do it with CircuitPython https://learn.adafruit.com/make-it-a-ke ... cuitpython

Depending on your needs, you'll may find that
Code: Select all | TOGGLE FULL SIZE
kbd.send(Keycode.LEFT_SHIFT)
will send the keystroke you need.

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

Re: Makecode output Shift keypress?

by jamok on Mon Mar 25, 2019 8:04 pm

That is the one I need. Working on a foot pedal with 3 keys with the left shift for those games that do not have toggle as an option. Thank you.

jamok
 
Posts: 7
Joined: Mon Mar 04, 2019 10:35 pm

Please be positive and constructive with your questions and comments.