Skip to content

Commit ffdb7ff

Browse files
committed
1.0.22 "More code clean up and catched another bug"
1 parent 3298607 commit ffdb7ff

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

main.py

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -109,74 +109,78 @@ def on_press(key):
109109
# pynput.keyboard.Key.
110110
if isinstance(key, pynput.keyboard.KeyCode):
111111
self.shortcut_start_stop = key.char
112-
print(key)
112+
113113
else:
114114
if key == pynput.keyboard.Key.f1:
115115
self.shortcut_start_stop = "F1"
116-
print(key)
116+
117117
elif key == pynput.keyboard.Key.f2:
118118
self.shortcut_start_stop = "F2"
119-
print(key)
119+
120120
elif key == pynput.keyboard.Key.f3:
121121
self.shortcut_start_stop = "F3"
122-
print(key)
122+
123123
elif key == pynput.keyboard.Key.f4:
124124
self.shortcut_start_stop = "F4"
125-
print(key)
125+
126126
elif key == pynput.keyboard.Key.f5:
127127
self.shortcut_start_stop = "F5"
128-
print(key)
128+
129129
elif key == pynput.keyboard.Key.f6:
130130
self.shortcut_start_stop = "F6"
131-
print(key)
131+
132132
elif key == pynput.keyboard.Key.f7:
133133
self.shortcut_start_stop = "F7"
134-
print(key)
134+
135135
elif key == pynput.keyboard.Key.f8:
136136
self.shortcut_start_stop = "F8"
137-
print(key)
137+
138138
elif key == pynput.keyboard.Key.f9:
139139
self.shortcut_start_stop = "F9"
140-
print(key)
140+
141141
elif key == pynput.keyboard.Key.f10:
142142
self.shortcut_start_stop = "F10"
143-
print(key)
143+
144144
elif key == pynput.keyboard.Key.f11:
145145
self.shortcut_start_stop = "F11"
146-
print(key)
146+
147147
elif key == pynput.keyboard.Key.f12:
148148
self.shortcut_start_stop = "F12"
149-
print(key)
149+
150150
elif key == pynput.keyboard.Key.home:
151151
self.shortcut_start_stop = "home"
152-
print(key)
152+
153153
elif key == pynput.keyboard.Key.insert:
154154
self.shortcut_start_stop = "insert"
155-
print(key)
155+
156156
elif key == pynput.keyboard.Key.delete:
157157
self.shortcut_start_stop = "delete"
158-
print(key)
158+
159159
elif key == pynput.keyboard.Key.end:
160160
self.shortcut_start_stop = "end"
161-
print(key)
161+
162162
elif key == pynput.keyboard.Key.page_up:
163163
self.shortcut_start_stop = "page_up"
164-
print(key)
164+
165165
elif key == pynput.keyboard.Key.page_down:
166166
self.shortcut_start_stop = "page_down"
167-
print(key)
167+
168168
elif key == pynput.keyboard.Key.pause:
169169
self.shortcut_start_stop = "pause"
170-
print(key)
170+
171171
elif key == pynput.keyboard.Key.backspace:
172172
self.shortcut_start_stop = "backspace"
173-
print(key)
173+
174174
elif key == pynput.keyboard.Key.enter:
175175
self.shortcut_start_stop = "enter"
176-
print(key)
176+
177177
elif key == pynput.keyboard.Key.space:
178-
self.shortcut_start_stop = "space"
179-
print(key)
178+
self.shortcut_start_stop = (
179+
"F6" # ? space does not work well for the time being
180+
)
181+
182+
else:
183+
self.shortcut_start_stop = "F6"
180184

181185
def on_release(key):
182186
keyboard.add_hotkey(self.shortcut_start_stop, self.shortcut_func)

0 commit comments

Comments
 (0)