- Timestamp:
- Oct 21, 2010 5:14:03 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r33298 r33321 441 441 print "Header is", header 442 442 basere = re.compile(r'(?P<s>\d+): (?P<t>[km]) (?P<p>.*)') 443 mre = re.compile(r'(?P<a>\d+) (?P<x> \d+) (?P<y>\d+) (?P<z>\d+) (?P<w>\d+) (?P<b>\d+)')443 mre = re.compile(r'(?P<a>\d+) (?P<x>-*\d+) (?P<y>-*\d+) (?P<z>-*\d+) (?P<w>-*\d+) (?P<b>-*\d+)') 444 444 kre = re.compile(r'\d+') 445 445 … … 449 449 try: 450 450 end = time.time() + dur 451 while time.time() < end: 452 for line in demo: 453 m = basere.search(line) 454 if m is not None: 455 dict = m.groupdict() 456 stamp = dict['s'] 457 params = dict['p'] 458 type = dict['t'] 459 460 time.sleep(float(stamp)/1000) 461 462 if type == 'k': 463 codes=kre.findall(params) 464 #print "KBD:",codes 465 kbd.putScancodes(codes) 466 elif type == 'm': 467 mm = mre.search(params) 468 if mm is not None: 469 mdict = mm.groupdict() 470 if mdict['a'] == '1': 471 # absolute 472 #print "MA: ",mdict['x'],mdict['y'],mdict['b'] 473 mouse.putMouseEventAbsolute(mdict['x'], mdict['y'], mdict['z'], mdict['w'], mdict['b']) 474 else: 475 #print "MR: ",mdict['x'],mdict['y'],mdict['b'] 476 mouse.putMouseEvent(mdict['x'], mdict['y'], mdict['z'], mdict['w'], mdict['b']) 451 for line in demo: 452 if time.time() > end: 453 break 454 m = basere.search(line) 455 if m is None: 456 continue 457 458 dict = m.groupdict() 459 stamp = dict['s'] 460 params = dict['p'] 461 type = dict['t'] 462 463 time.sleep(float(stamp)/1000) 464 465 if type == 'k': 466 codes=kre.findall(params) 467 #print "KBD:",codes 468 kbd.putScancodes(codes) 469 elif type == 'm': 470 mm = mre.search(params) 471 if mm is not None: 472 mdict = mm.groupdict() 473 if mdict['a'] == '1': 474 # absolute 475 #print "MA: ",mdict['x'],mdict['y'],mdict['z'],mdict['b'] 476 mouse.putMouseEventAbsolute(int(mdict['x']), int(mdict['y']), int(mdict['z']), int(mdict['w']), int(mdict['b'])) 477 else: 478 #print "MR: ",mdict['x'],mdict['y'],mdict['b'] 479 mouse.putMouseEvent(int(mdict['x']), int(mdict['y']), int(mdict['z']), int(mdict['w']), int(mdict['b'])) 477 480 478 481 # We need to catch all exceptions here, to close file -
trunk/src/VBox/Main/MouseImpl.cpp
r33305 r33321 580 580 581 581 #ifndef VBOXBFE_WITHOUT_COM 582 mMouseEvent.reinit(VBoxEventType_OnGuestMouseEvent, true, mouseXAbs, mouseYAbs, dz, dw, fButtons);582 mMouseEvent.reinit(VBoxEventType_OnGuestMouseEvent, true, x, y, dz, dw, fButtons); 583 583 mMouseEvent.fire(0); 584 584 #endif
Note:
See TracChangeset
for help on using the changeset viewer.