# Keyboard Action Is Not Working As Expected

If you use keyboard commands and they are not producing the effect you need, here are some common problems and how to solve them:

* Increase delays, as keyboard commands may take longer to take effect. See [delay-times-between-the-building-blocks](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/delay-times-between-the-building-blocks "mention"). Ensure to increase the delay in the **preceding** building block, so that there is enough time for the website to load after the previous action.
* If you have multiple keys in the Keyboard Action building block and you need them to be hit sequentially (as opposed to a shortcut), separate each key into a separate building block and add some delay between the building blocks. For example, if you need your TaskBot to hit *Tab* twice, it is better to have two separate building blocks.

❌ **Might work but not recommended:** Hitting *Tab* twice in one 'go' might be interpreted as a shortcut.

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FYaB9cviPrfRHUBWwynb3%2FScreenshot%202024-04-01%20at%2012.53.35.png?alt=media&#x26;token=058267d9-e3b6-4e32-b872-b41fe59348d5" alt=""><figcaption></figcaption></figure>

✅ **Better:** Two separate *Keyboard Action* building blocks, each hitting *Tab* once.&#x20;

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2F5daFCrMJ0igKKrWlYiB0%2FScreenshot%202024-04-01%20at%2012.56.45.png?alt=media&#x26;token=1ca0bf7b-cf4e-4742-a0cf-e1f8f09b0644" alt=""><figcaption></figcaption></figure>

* For shortcuts, order matters! For example, to select a piece of text with *Shift* + *A*, you need to adhere to the order of the keys.

❌ **Won't work - wrong order**

<div align="left"><figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FoSZkP6ASdiW9f8agejdH%2FScreenshot%202024-04-01%20at%2013.00.08.png?alt=media&#x26;token=05e35dcc-6190-4d28-8856-8ed92529bf2f" alt=""><figcaption></figcaption></figure></div>

**✅ Works - order is correct**

<div align="left"><figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FwAhQwQp6rUSMR4aQkr4O%2FScreenshot%202024-04-01%20at%2013.00.51.png?alt=media&#x26;token=1eeb3dc6-6865-4df7-a5aa-d5c1bb2f9002" alt=""><figcaption></figcaption></figure></div>

* Using native browser commands. ZeroWork can operate within the website context, but not within the native browser commands. So, say, if you want to hit CTRL/CMD+P (to print something),  CTRL/CMD+F (to search for something),  CTRL/CMD+S (to save website as html) or use a browser shortcut command to maximize a window, that won't work.
* Use [click-web-element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element "mention") with a selector instead of keyboard commands. Selectors are generally  more reliable than keyboard commands.
