diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2022-06-25 07:42:25 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2022-06-25 07:42:25 +0530 |
commit | a7c25f19d9700c008e6d6b5b4f95ea6103bda8ab (patch) | |
tree | 8707e464bc290613efae031908063ef9788cbb0d /code.py | |
parent | 08422ad7e5ae71a1a625e8a2bda6d233fd68ceee (diff) |
fixes
Diffstat (limited to 'code.py')
-rw-r--r-- | code.py | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +def main(): # Made by compromyse: https://compromyse.tk/ + import usb_hid + from adafruit_hid.keyboard import Keyboard + from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS as KeyboardLayout + import time + import board + import digitalio + led = digitalio.DigitalInOut(board.LED) + led.direction = digitalio.Direction.OUTPUT + kbd = Keyboard(usb_hid.devices) + layout = KeyboardLayout(kbd) + time.sleep(1) + led.value = True + kbd.press(227) + kbd.release_all() + time.sleep(1) + layout.write('subl') + kbd.press(40) + kbd.release_all() + led.value = False
\ No newline at end of file |