title: How do I press keyboard with robot framework?
body: <p>I am trying to implement an automation project by using a <strong>Robot Framework</strong> based on Python. In my case, I need to press <kbd>Command</kbd>+<kbd>A</kbd> to select all, I have used <a href="http://www.physics.udel.edu/%7Ewatson/scen103/ascii.html" rel="nofollow noreferrer">ASCII Table</a>, <code>selenium.webdriver.common.keys</code> (<a href="https://www.selenium.dev/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html" rel="nofollow noreferrer">docs</a>), but it still doesn't work, the detail is below:</p>
  <hr />
  <h2>Environment</h2>
  <p><strong>OS:</strong> Mac 10.15.7<br />
  <strong>Code editor:</strong> Visual Studio Code</p>
  <hr />
  <h2>Code</h2>
  <pre><code>***setting***
  Library   OperatingSystem
  Library   DateTime
  Library   OperatingSystem
  Library   RequestsLibrary
  Library   BuiltIn
  Library   Collections
  Library   json
  Library   Selenium2Library
  Resource  ./resource1.robot
  
  *** Variables ***
  ${collection_name}    //input[@name='name']
  
  ***Test case***
  press keys   ${collection_name}  \\1
  </code></pre>
  <hr />
  <h2>Actual result</h2>
  <p>Key &quot;\1&quot; in the locator</p>
  <p><a href="https://i.stack.imgur.com/5ZaZD.png" rel="nofollow noreferrer">actual result</a></p>
  <hr />
  <h2>Expected result</h2>
  <p>Select all in the locator</p>
  <p><a href="https://i.stack.imgur.com/YmUG2.png" rel="nofollow noreferrer">expected result</a></p>
  <hr />
  <p>Is there any solution to the problem?<br />
  Thanks in advance!</p>