'Simulates user pressing key on element identified by `locator`.
`key` is either a single character, a string, or a numerical ASCII code of the key
lead by \'\\\'.
Examples:
| Press Key | text_field   | q |
| Press Key | text_field   | abcde |
| Press Key | login_button | \\13 | # ASCII code for enter key |'

@keyword
def press_key(self, locator, key):

    if (key.startswith('\\') and (len(key) > 1)):
        key = self._map_ascii_key_code_to_key(int(key[1:]))
    element = self.find_element(locator)
    element.send_keys(key)
