# Send keyboard input - sending multiple keys

**URL:** https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656
**Category:** Bugs
**Created:** [September 2, 2008, 2:19am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656 "2008-09-02T02:19:15Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jaynestle](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@jaynestle](https://www.finalbuilder.com/forums/u/jaynestle)
#### Post date: [September 2, 2008, 2:19am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/1 "2008-09-02T02:19:15Z")

</div>

I am trying to send keyboard input onto a webpage and everytime I get duplicate keys.

For example I want to send a user name for a login text box:&nbsp; JoeSmith

I have Automise successfully opening the webpage, then waiting for the application, then clicking on the correct textbox, but when the text is sent it is random what keys are duplicated.&nbsp; I might get JJJooeSSSSSSmmithhhhhh one time and the next get JJooooooooeeeeeeSSmiiiiiiitttttth the next.

I did try changing my key repeat in Windows to the slowest setting and this didn't help.&nbsp; I also tried using sending a single key, ie just the J.&nbsp; I almost always get multiple JJJJJJ in the text even with this.&nbsp; I am thinking there must be a way to fix this.&nbsp; A coworker installed on his PC and we tried with the same results thinking it was maybe something only happening on my PC.

Thanks for any help!

&nbsp;&nbsp;&nbsp; Jay

---

<div class="post-metadata">

### Author: ![jaynestle](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@jaynestle](https://www.finalbuilder.com/forums/u/jaynestle)
#### Post date: [September 9, 2008, 9:55am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/2 "2008-09-09T09:55:53Z")

</div>

…bump… anyone?   
  
 Can anyone confirm they are using the send keyboard input functionality?   
  
 Thanks!

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [September 10, 2008, 2:26am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/3 "2008-09-10T02:26:40Z")

</div>

Hi Jay,   
  
 Sorry - we haven’t been able to reproduce this here and don’t know why it might be happening. We’re still looking into it though.

---

<div class="post-metadata">

### Author: ![jaynestle](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@jaynestle](https://www.finalbuilder.com/forums/u/jaynestle)
#### Post date: [September 10, 2008, 12:21pm UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/4 "2008-09-10T12:21:04Z")

</div>

Thanks Tate!   
  
 Something I just thought of is that at work they do have websense running, maybe this would cause a problem? If you need any further system info just let me know, but here’s a start:   
  
 OS NameMicrosoft Windows XP Professional   
 Version5.1.2600 Service Pack 2 Build 2600   
 OS ManufacturerMicrosoft Corporation   
 System Name—   
 System ManufacturerDell Inc.   
 System ModelOptiPlex 745   
 System TypeX86-based PC   
 Processorx86 Family 15 Model 6 Stepping 5 GenuineIntel ~3391 Mhz   
 Processorx86 Family 15 Model 6 Stepping 5 GenuineIntel ~3391 Mhz   
 BIOS Version/DateDell Inc. 2.3.1, 5/21/2007   
 SMBIOS Version2.3   
 Windows DirectoryC:\WINDOWS   
 System DirectoryC:\WINDOWS\system32   
 Boot Device\Device\HarddiskVolume1   
 LocaleUnited States   
 Hardware Abstraction LayerVersion = “5.1.2600.2180 (xpsp\_sp2\_rtm.040803-2158)”   
 User Name—   
 Time ZoneEastern Daylight Time   
 Total Physical Memory1,024.00 MB   
 Available Physical Memory293.26 MB   
 Total Virtual Memory2.00 GB   
 Available Virtual Memory1.96 GB   
 Page File Space2.38 GB   
 Page FileC:\pagefile.sys   
  
 IE7 summary:   
 Version7.0.5730.13   
 Build75730   
 Application PathC:\Program Files\Internet Explorer   
 LanguageEnglish (United States)   
 Active PrinterHP Color LaserJet,winspool,Ne03:   
 Cipher Strength128-bit   
 Content AdvisorDisabled   
 IEAK InstallNo

---

<div class="post-metadata">

### Author: ![jaynestle](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@jaynestle](https://www.finalbuilder.com/forums/u/jaynestle)
#### Post date: [September 16, 2008, 1:33am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/5 "2008-09-16T01:33:09Z")

</div>

Just a quick update on this.&nbsp; Still no solution using Automise, every PC we've tried it on here has the same random key repeat issue.

We did find a solution however using AutoHotKeys - this runs perfect everytime.&nbsp; It obviously isn't&nbsp; a replacement for Automise, but when used with Automise I think it will give us the solution we need.

If you guys do have some ideas on what is causing this and how to fix please update as I would much rather have everything in one application and the control over automise is much better.

&nbsp;&nbsp;&nbsp; Thanks!

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [January 7, 2009, 12:51pm UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/6 "2009-01-07T12:51:55Z")

</div>

same thing happens to me when trying to enter text in to a web form it repeats the keys three or four times. but i tested it in notepad and it worked OK, then it left out one letter   
 i am using vista with internet explorer 7.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 7, 2009, 4:46am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/7 "2009-01-07T04:46:06Z")

</div>

I will say that the Send Keyboard Input action is not very reliable with IE7… it relies on window handles and child controls to find the controls… but ie doesn’t conform. I was able to reproduce the missing character in notepad. I put the send keys action in a tight loop (for loop that does nothing else), however as soon as I added something else in the loop (set variable) the problem went away. I’m inclined to think that windows cannot process the messages fast enough. I will do some more investigation on this to see if there is anything we can do differently.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 7, 2009, 4:51am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/8 "2009-01-07T04:51:55Z")

</div>

I spoke too soon… it’s not 100% reliable even with a delay between send keys, although it is more reliable. I will post here when I have a resolution.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 7, 2009, 6:47am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/9 "2009-01-07T06:47:38Z")

</div>

Hi Jay/Todd   
  
 Ok, I have made some progress on this. The issue is that we are using the Windows.Forms.SendKeys.SendWait method to send the keys… unfortunately this method is unreliable, as it is susceptible to focus changes. When you see incomplete strings or doubled up characters, it is because something tried to steal the focus while the SendWait method was running. I have modified our code to increase the likelihood of success (always call setfocus) but because of the nature of the SendKeys class (calls the windows SendInput api for each character) we cannot guarantee success.   
  
 I am still doing some more testing of this, I post here when we have a build available with hopefully and improved behavior.

---

<div class="post-metadata">

### Author: ![jaynestle](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@jaynestle](https://www.finalbuilder.com/forums/u/jaynestle)
#### Post date: [January 7, 2009, 1:26am UTC](https://www.finalbuilder.com/forums/t/send-keyboard-input-sending-multiple-keys/4656/10 "2009-01-07T01:26:50Z")

</div>

Thanks Vincent! Appreciate the effort. Automise is working so well for me in every other application I’ve automated with it.   
  
 Don’t know if they would let you know how they are doing it, but autohotkeys appears to not have any problems with this. I’ve hacked using the two together to get most of what I need done, but again it’s not clean and I would like to just use automise alone in the future.   
  
 Thanks!   
 Jay
