Click here to Skip to main content
Licence CPOL
First Posted 30 Aug 2010
Views 691
Downloads 4
Bookmarked 0 times

SendKeys using ScanCodes for Citrix

By | 4 Jan 2012 | Article
A modified version of Sendkeys to allow sending of Keys to Citrix

Introduction

Your proboly here becasue you are tring to automate login or someother Citrix process and found that the .net Sendkeys does not work with Citrix, or at least the TAB and ENTER keys don't.

Background

I searched high a low as to why I could not send TAB and Enter to Citrix when I found this codeproject artical. http://www.codeproject.com/KB/system/keyboard.aspx. According to posts on the net no application has used ScanCodes for input since 1998 and I guess becasue of this Microsoft never but them in SendKeys. Anyways I reflected the MS sendkeys Class and added the ability to send ScanCodes. The Artical above had both Make and Break Scan Codes. Not sure the difference but Make works for Citrix.

Using the code

Add the SendKeysPlus Code to you Project and then Call SendKeysPlus.SendWait like you normoly would but tell what ScanCodeMode to Use. ScanCodeMode of None will work like normal SendKeys.

    ' Just like when using the Normal SendKeys the Application Must have focus When Called
    SendKeysPlus.SendWait("Username{TAB}Password{ENTER}",SendKeysPlus.ScanCodeModes.Make)
        

Points of Interest

I am not certain why Citrix is using scancode other then its a way they can send extended normoly none valid keystrokes to the Citrix Server.

History

Keep a running update of any changes or improvements you've made here.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Andrewiski

Web Developer

United States United States

Member

Andrew DeVries has been a .Net programmer since 2003. He currently works as a consultant designing custom software for windows as well as for the web. Currently he spends his days designing custom web controls and custom data sources.

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionNot an article... PinmvpDave Kreskowiak2:09 5 Jan '12  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120528.1 | Last Updated 4 Jan 2012
Article Copyright 2010 by Andrewiski
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid