MCPcopy Create free account
hub / github.com/T-duality/PillOCR-python / MacOSHotkeyManager

Class MacOSHotkeyManager

utils/hotkey_manager.py:167–195  ·  view source on GitHub ↗

macOS平台的热键管理实现 - 空实现

Source from the content-addressed store, hash-verified

165
166
167class MacOSHotkeyManager(HotkeyManager):
168 """macOS平台的热键管理实现 - 空实现"""
169
170 def register_hotkey(self, hotkey_str):
171 # macOS上不支持,返回假成功
172 self.current_hotkey = hotkey_str
173 self.is_active = False
174 return True
175
176 def unregister_hotkey(self, hotkey_str=None):
177 # macOS上不支持,返回假成功
178 if hotkey_str is None or hotkey_str == self.current_hotkey:
179 self.current_hotkey = None
180 self.is_active = False
181 return True
182
183 def register_screenshot_listener(self, hotkey_str, callback):
184 # macOS上不支持,返回假成功
185 self.screenshot_hotkey = hotkey_str
186 self.screenshot_callback = callback
187 self.screenshot_active = False
188 return True
189
190 def unregister_screenshot_listener(self):
191 # macOS上不支持,返回假成功
192 self.screenshot_hotkey = None
193 self.screenshot_callback = None
194 self.screenshot_active = False
195 return True
196
197
198def create_hotkey_manager(callback=None):

Callers 1

create_hotkey_managerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected