# how to use sendkeys

**URL:** <https://forum.katalon.com/t/how-to-use-sendkeys/6684>\
**Category:** Miscellaneous\
**Tags:** katalon-studio\
**Created:** [June 30, 2017, 9:44am UTC](https://forum.katalon.com/t/how-to-use-sendkeys/6684 "2017-06-30T09:44:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sangmook.kim](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sangmook.kim](https://forum.katalon.com/u/sangmook.kim)\
**Post date:** [June 30, 2017, 9:44am UTC](https://forum.katalon.com/t/how-to-use-sendkeys/6684/1 "2017-06-30T09:44:19Z")

</div>

I want to insert ‘Enter’ Keys but failed

This is what I found from guide

==========================================================

[https://docs.katalon.com/display/KD/[WebUI]+Send+Keys](https://docs.katalon.com/display/KD/%5BWebUI%5D+Send+Keys)

`'Press Ctrl+A to select all text in txt_Comment'`

`WebUI.sendKeys(findTestObject(``'txt_Comment'``), Keys.chord(Keys.CONTROL, ``'a'``))`

==========================================================

Here is my question. What should I do for just hitting 'Enter' keys?

`WebUI.sendKeys(``Keys.ENTER``)`

Please let me know how to do this

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [July 1, 2017, 1:10pm UTC](https://forum.katalon.com/t/how-to-use-sendkeys/6684/2 "2017-07-01T13:10:56Z")

</div>

If you just want to hit’ Enter’ key:

`WebUI.sendKeys(findTestObject(null), Keys.chord(Keys.ENTER))`

---

<div class="post-metadata">

**Author:** ![dandydolph](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@dandydolph](https://forum.katalon.com/u/dandydolph)\
**Post date:** [January 9, 2019, 2:35am UTC](https://forum.katalon.com/t/how-to-use-sendkeys/6684/3 "2019-01-09T02:35:58Z")

</div>

Could you tell me please, how about if I want to press CTRL + P but there’s no test object I need to mentioned… example I want to press CTRL + P in the browser for print reason the whole page browser, I didn’t need to mentioned the test object right?

---

<div class="post-metadata">

**Author:** ![Arnel](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/arnel/32/6360_2.png) [@Arnel](https://forum.katalon.com/u/Arnel)\
**Post date:** [January 9, 2019, 6:27am UTC](https://forum.katalon.com/t/how-to-use-sendkeys/6684/4 "2019-01-09T06:27:35Z")

</div>

Hi DandyDolph,

As per Vinh\_Nguyen, just make the target null…

Refer to my comment in the link below:

> [@How to sent the enter key with no target](http://forum.katalon.com/t/how-to-sent-the-enter-key-with-no-target/14925/2):
>
> Hi Kyle, You can try this. It works for me WebUI.sendKeys(null, Keys.chord(Keys.CONTROL, ‘v’)) Just make the target null. Hope that helps. . . slight_smile

Hope that helps. . . 🙂

---

<div class="post-metadata">

**Author:** ![dandydolph](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@dandydolph](https://forum.katalon.com/u/dandydolph)\
**Post date:** [February 19, 2019, 9:03am UTC](https://forum.katalon.com/t/how-to-use-sendkeys/6684/5 "2019-02-19T09:03:36Z")

</div>

Hi @Arnel  
Already tried but there’s no result

---

<div class="post-metadata">

**Author:** ![Andrej\_Podhajsky](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/andrej_podhajsky/32/1055_2.png) [@Andrej\_Podhajsky](https://forum.katalon.com/u/Andrej_Podhajsky)\
**Post date:** [February 19, 2019, 9:12am UTC](https://forum.katalon.com/t/how-to-use-sendkeys/6684/6 "2019-02-19T09:12:55Z")

</div>

try to define //body or /html or some other top level object as TO to consume keystroke
