# KeyDown - Holding the key

**URL:** <https://forums.eggplantsoftware.com/t/keydown-holding-the-key/2948>\
**Category:** Eggplant Functional\
**Created:** [September 22, 2011, 2:29pm UTC](https://forums.eggplantsoftware.com/t/keydown-holding-the-key/2948 "2011-09-22T14:29:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kathryn](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/k/ed8c4c/32.png) [@kathryn](https://forums.eggplantsoftware.com/u/kathryn)\
**Post date:** [September 22, 2011, 2:29pm UTC](https://forums.eggplantsoftware.com/t/keydown-holding-the-key/2948/1 "2011-09-22T14:29:35Z")

</div>

How do I press the backspace button and have it hold for 10 seconds?  
Reason is I need to go to a url and remove what’s already on there.

this is not working:  
click url  
set option keydowndelay, 10  
keydown backspace  
wait 10  
keyup allkeys  
setoption keydowndelay, 0

---

<div class="post-metadata">

**Author:** ![EggplantMatt](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/eggplantmatt/32/3_2.png) [@EggplantMatt](https://forums.eggplantsoftware.com/u/EggplantMatt)\
**Post date:** [September 22, 2011, 2:38pm UTC](https://forums.eggplantsoftware.com/t/keydown-holding-the-key/2948/2 "2011-09-22T14:38:30Z")

</div>

Holding the key down that way doesn’t work because of the way the key repeat works on the SUT. A better way of handling that operation is doing a select all and delete:

```auto
click URL
TypeText controlkey, "a" -- select all
TypeText backspace

```

---

<div class="post-metadata">

**Author:** ![kathryn](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/k/ed8c4c/32.png) [@kathryn](https://forums.eggplantsoftware.com/u/kathryn)\
**Post date:** [September 22, 2011, 2:44pm UTC](https://forums.eggplantsoftware.com/t/keydown-holding-the-key/2948/3 "2011-09-22T14:44:08Z")

</div>

perfect, it worked
