コード例 #1
0
ファイル: InputEmulation.py プロジェクト: fintechilla/RPAd
    def buttonDown(self, button=mouse.LEFT):
        """ Holds down the specified mouse button.

        Use Mouse.LEFT, Mouse.MIDDLE, Mouse.RIGHT
        """
        self._lock.acquire()
        mouse.press(button)
        self._lock.release()
コード例 #2
0
ファイル: mouse_tests.py プロジェクト: caenyon/keyboard
 def test_buttons(self):
     mouse.press()
     self.assertEqual(self.flush_events(), [(DOWN, LEFT)])
     mouse.release()
     self.assertEqual(self.flush_events(), [(UP, LEFT)])
     mouse.click()
     self.assertEqual(self.flush_events(), [(DOWN, LEFT), (UP, LEFT)])
     mouse.double_click()
     self.assertEqual(self.flush_events(), [(DOWN, LEFT), (UP, LEFT), (DOWN, LEFT), (UP, LEFT)])
     mouse.right_click()
     self.assertEqual(self.flush_events(), [(DOWN, RIGHT), (UP, RIGHT)])
     mouse.click(RIGHT)
     self.assertEqual(self.flush_events(), [(DOWN, RIGHT), (UP, RIGHT)])
     mouse.press(X2)
     self.assertEqual(self.flush_events(), [(DOWN, X2)])
コード例 #3
0
 def test_buttons(self):
     mouse.press()
     self.assertEqual(self.flush_events(), [(DOWN, LEFT)])
     mouse.release()
     self.assertEqual(self.flush_events(), [(UP, LEFT)])
     mouse.click()
     self.assertEqual(self.flush_events(), [(DOWN, LEFT), (UP, LEFT)])
     mouse.double_click()
     self.assertEqual(self.flush_events(), [(DOWN, LEFT), (UP, LEFT), (DOWN, LEFT), (UP, LEFT)])
     mouse.right_click()
     self.assertEqual(self.flush_events(), [(DOWN, RIGHT), (UP, RIGHT)])
     mouse.click(RIGHT)
     self.assertEqual(self.flush_events(), [(DOWN, RIGHT), (UP, RIGHT)])
     mouse.press(X2)
     self.assertEqual(self.flush_events(), [(DOWN, X2)])
コード例 #4
0
ファイル: InputEmulation.py プロジェクト: deneme056/lackey
    def buttonDown(self, button=mouse.LEFT):
        """ Holds down the specified mouse button.

        Use Mouse.LEFT, Mouse.MIDDLE, Mouse.RIGHT
        """
        mouse.press(button)