Esempio n. 1
0
    def simulatePasteKeystroke( self ):
        """
        Simulate Ctrl-V, which is the paste command in most
        applications.
        """

        ContextUtils.typeCommandKey( "v" )
Esempio n. 2
0
    def simulateCutKeystroke( self ):
        """
        Simulate Ctrl-X, which is the cut command in most
        applications.
        """

        ContextUtils.typeCommandKey( "x" )
Esempio n. 3
0
    def simulateCopyKeystroke( self ):
        """
        Simulate Ctrl-C, which is the copy command in most
        applications.
        """

        ContextUtils.typeCommandKey( "c" )
Esempio n. 4
0
    def getSelectedFiles(self):
        """
        Returns a list of the names of the files that are selected.
        Each element of the list is an absolute path.  If no files are
        selected, it returns None (not an empty list).
        """

        ClipboardBackend.prepareForClipboardToChange()
        ContextUtils.typeCommandKey("C")
        success = ClipboardBackend.waitForClipboardToChange(
            FILE_COPY_WAIT_TIME)

        if not success:
            return None

        return self.__getHdropFiles()
Esempio n. 5
0
    def getSelectedFiles( self ):
        """
        Returns a list of the names of the files that are selected.
        Each element of the list is an absolute path.  If no files are
        selected, it returns None (not an empty list).
        """

        ClipboardBackend.prepareForClipboardToChange()
        ContextUtils.typeCommandKey( "C" )
        success = ClipboardBackend.waitForClipboardToChange(
            FILE_COPY_WAIT_TIME
            )

        if not success:
            return None

        return self.__getHdropFiles()
Esempio n. 6
0
 def simulateCutKeystroke( self ):
     ContextUtils.typeCommandKey( "w" )
Esempio n. 7
0
 def simulatePasteKeystroke( self ):
     ContextUtils.typeCommandKey( "y" )
Esempio n. 8
0
 def simulateCutKeystroke(self):
     # Ctrl-Del should work by default in Windows version of Vim/gVim
     ContextUtils.typeCommandKey(win32con.VK_DELETE)