Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions Firmware/actions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import usb_hid
import time
import supervisor
Copy link
Author

@V-FEXrt V-FEXrt Nov 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it is actually safe to delete these here. I needed to remove them to run the test code on my host machine. Removing them didn't seem to break anything but that might not be the case on the real keyboard and needs to be tested/confirmed

import microcontroller

class BoundAction:
__slots__ = 'owner'
Expand Down Expand Up @@ -212,7 +209,7 @@ def __init__(self, el_stringerino, delay_between_keystrokes, repeat_every=None):

def one_shot(self):
for index, char in enumerate(self.payload):
if index is not 0: # Prevents unnecessary delay after final char
if index != 0: # Prevents unnecessary delay after final char
time.sleep(self.typing_rate)
self.owner.hid_keyboard_layout.write(char)
self.last_fire_timestamp = time.monotonic()
Expand Down Expand Up @@ -324,4 +321,4 @@ def start_hold(self):
self.owner.queue_reload()

def __eq__(self, obj):
return isinstance(obj, ReloadkeymapAction)
return isinstance(obj, ReloadKeymapAction)
Loading