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

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

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

        ContextUtils.typeCommandKey( "c" )
Beispiel #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()
    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()
Beispiel #6
0
 def simulateCutKeystroke( self ):
     ContextUtils.typeCommandKey( "w" )
Beispiel #7
0
 def simulatePasteKeystroke( self ):
     ContextUtils.typeCommandKey( "y" )
Beispiel #8
0
 def simulateCutKeystroke(self):
     # Ctrl-Del should work by default in Windows version of Vim/gVim
     ContextUtils.typeCommandKey(win32con.VK_DELETE)