summarylogtreecommitdiffstats
path: root/evdev-1.9.0.patch
blob: 54d16473e705a2f146fed2fc13f701cdd277aa70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --unified --recursive --text xkeysnail-0.4.0/xkeysnail/input.py xkeysnail-0.4.0.new/xkeysnail/input.py
--- xkeysnail-0.4.0/xkeysnail/input.py	2025-02-22 14:50:16.856917950 +0300
+++ xkeysnail-0.4.0.new/xkeysnail/input.py	2025-02-22 14:47:21.197684595 +0300
@@ -33,7 +33,7 @@
 
 
 def print_device_list(devices):
-    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)]
     print('-' * len(max(device_lines, key=len)))
     print('{:<20} {:<35} {}'.format('Device', 'Name', 'Phys'))
@@ -54,7 +54,7 @@
         # Match by device path or name, if no keyboard devices specified, 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
         # Exclude none keyboard devices
@@ -92,7 +92,7 @@
 
 def in_device_list(fn, devices):
     for device in devices:
-        if device.fn == fn:
+        if device.path == fn:
             return True
     return False
 
@@ -157,7 +157,7 @@
     new_devices = []
     for event in inotify.read():
         new_device = InputDevice("/dev/input/" + event.name)
-        if device_filter(new_device) and not in_device_list(new_device.fn, devices):
+        if device_filter(new_device) and not in_device_list(new_device.path, devices):
             try:
                 new_device.grab()
             except IOError: