# Path: pywinauto/application.py



import sys
import os
import unittest
import subprocess
import time
from pywinauto.application import Application
    from pywinauto.keyboard import send_keys, parse_keys, KeySequenceError
    from pywinauto.keyboard import KeyAction, VirtualKeyAction, PauseAction
    from pywinauto.sysinfo import is_x64_Python, is_x64_OS
    from pywinauto import mouse
    from pywinauto.linux.keyboard import send_keys, KeySequenceError, KeyAction
    from pywinauto.linux import clipboard
        """Make sure that repeated action works"""
        send_keys("{TAB 3}{PAUSE 0.5}{F 3}", pause = .3)
        received = self.receive_text()
        self.assertEqual("\t\t\tFFF", received)

    def testShiftModifier(self):
        """Make sure that Shift modifier works"""
        send_keys("+(a)")
        received = self.receive_text()
        self.assertEqual("A", received)

    if sys.platform != 'win32':
        def testAltModifier(self):
            """Make sure that alt modifier works"""
            clipboard.set_data('abc')
            # check alt via opening edit menu and paste text from clipboard
            time.sleep(0.3)
            send_keys('%(e)')
            time.sleep(0.3)
            send_keys('{ENTER}')
            received = self.receive_text()
            self.assertEqual('abc', received)


if sys.platform == 'win32':
    class SendKeysModifiersTests(unittest.TestCase):
        """Unit tests for the Sendkeys module (modifiers)"""

        def setUp(self):
            """Start the application and ensure it's in the state we want"""

# Path: pywinauto/application.py



# Path: pywinauto/unittests/test_keyboard.py
import sys
import os
import unittest
import subprocess
import time
from pywinauto.application import Application
    from pywinauto.keyboard import send_keys, parse_keys, KeySequenceError
    from pywinauto.keyboard import KeyAction, VirtualKeyAction, PauseAction
    from pywinauto.sysinfo import is_x64_Python, is_x64_OS
    from pywinauto import mouse
    from pywinauto.linux.keyboard import send_keys, KeySequenceError, KeyAction
    from pywinauto.linux import clipboard

        """Make sure that repeated action works"""
        send_keys("{TAB 3}{PAUSE 0.5}{F 3}", pause = .3)
        received = self.receive_text()
        self.assertEqual("\t\t\tFFF", received)

    def testShiftModifier(self):
        """Make sure that Shift modifier works"""
        send_keys("+(a)")
        received = self.receive_text()
        self.assertEqual("A", received)

    if sys.platform != 'win32':
        def testAltModifier(self):
            """Make sure that alt modifier works"""
            clipboard.set_data('abc')
            # check alt via opening edit menu and paste text from clipboard
            time.sleep(0.3)
            send_keys('%(e)')
            time.sleep(0.3)
            send_keys('{ENTER}')
            received = self.receive_text()
            self.assertEqual('abc', received)


if sys.platform == 'win32':
    class SendKeysModifiersTests(unittest.TestCase):
        """Unit tests for the Sendkeys module (modifiers)"""

        def setUp(self):
            """Start the application and ensure it's in the state we want"""

            self.app = Application().start(os.path.join(mfc_samples(), u"CtrlTest.exe"))