MCPcopy
hub / github.com/Sentdex/pygta5 / directKey

Method directKey

original_project/keys.py:375–387  ·  view source on GitHub ↗
(self, key, direction = None, type = None)

Source from the content-addressed store, hash-verified

373
374 # direct key press
375 def directKey(self, key, direction = None, type = None):
376 if type is None:
377 type = self.direct_keys
378 if direction is None:
379 direction = self.key_press
380 if key.startswith("0x"):
381 key = int(key, 16)
382 else:
383 key = key.upper()
384 lookup_table = self.dk if type == self.direct_keys else self.vk
385 key = lookup_table[key] if key in lookup_table else 0x0000
386
387 self.keys_worker.sendKey(key, direction | type)
388
389 # direct mouse move or button press
390 def directMouse(self, dx = 0, dy = 0, buttons = 0):

Callers 1

keys.pyFile · 0.80

Calls 1

sendKeyMethod · 0.80

Tested by

no test coverage detected