Skip to content

Commit

Permalink
update as stated by @RedBearAK
Browse files Browse the repository at this point in the history
  • Loading branch information
Udhay707 committed Feb 15, 2025
1 parent f5c5f67 commit 7e772fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/keyszer/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def all():
@staticmethod
def print_list():
devices = Devices.all()
device_format = "{1.fn:<20} {1.name:<35} {1.phys}"
device_format = "{1.path:<20} {1.name:<35} {1.phys}"
device_lines = [
device_format.format(n, d) for n, d in enumerate(devices)
]
Expand All @@ -42,7 +42,7 @@ def print_list():
for i, line in enumerate(device_lines):
dev = devices[i]
if len(dev.name) > 35:
fmt = "{1.fn:<20} {1.name:<35}"
fmt = "{1.path:<20} {1.name:<35}"
print(fmt.format(None, dev))
print(" " * 57 + dev.phys)
else:
Expand Down Expand Up @@ -81,7 +81,7 @@ def autodetect(self):
self.grab(device)

def grab(self, device):
info(f"Grabbing {device.name} ({device.fn})", ctx="+K")
info(f"Grabbing {device.name} ({device.path})", ctx="+K")
self._loop.add_reader(device, self._input_cb, device)
self._devices.append(device)
try:
Expand Down Expand Up @@ -131,7 +131,7 @@ def filter(self, device):
# picks up keyboard-ish devices.
if self.matches:
for match in self.matches:
if device.fn == match or device.name == match:
if device.path == match or device.name == match:
return True
return False

Expand Down

2 comments on commit 7e772fe

@RedBearAK
Copy link

Choose a reason for hiding this comment

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

@Udhay707

You seem to be committing to your fork of the rbreaves/keyszer fork with this, but that's a fork of the original joshgoebel/keyszer fork, and I think the rbreaves fork hasn't been synced with the the original keyszer in a long time. It wasn't the Kinto dev that created keyszer from xkeysnail. The code seems older than the current state of keyszer, which I was using until I hard-forked it into xwaykeyz for Toshy (mostly for the Wayland context support).

I put in a PR on the original keyszer fork a few days ago. So the original keyszer fork will be fixed once that's merged.

joshgoebel#170

@Udhay707
Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks for the clarification, I was thinking of raising a PR.

Please sign in to comment.