コード例 #1
0
ファイル: TextSelection.py プロジェクト: tilofix/enso
    def simulatePasteKeystroke( self ):
        """
        Simulate Ctrl-V, which is the paste command in most
        applications.
        """

        ContextUtils.typeCommandKey( "v" )
コード例 #2
0
ファイル: TextSelection.py プロジェクト: tilofix/enso
    def simulateCutKeystroke( self ):
        """
        Simulate Ctrl-X, which is the cut command in most
        applications.
        """

        ContextUtils.typeCommandKey( "x" )
コード例 #3
0
ファイル: TextSelection.py プロジェクト: tilofix/enso
    def simulateCopyKeystroke( self ):
        """
        Simulate Ctrl-C, which is the copy command in most
        applications.
        """

        ContextUtils.typeCommandKey( "c" )
コード例 #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()
コード例 #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()
コード例 #6
0
ファイル: TextSelection.py プロジェクト: tilofix/enso
 def simulateCutKeystroke( self ):
     ContextUtils.typeCommandKey( "w" )
コード例 #7
0
ファイル: TextSelection.py プロジェクト: tilofix/enso
 def simulatePasteKeystroke( self ):
     ContextUtils.typeCommandKey( "y" )
コード例 #8
0
 def simulateCutKeystroke(self):
     # Ctrl-Del should work by default in Windows version of Vim/gVim
     ContextUtils.typeCommandKey(win32con.VK_DELETE)