471,319 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

PrintScreen Key Event gets changed after we've made it a Citrix published application

I have posted this to the Citrix Developers' forum and have not heard
anything yet. So I'd like to see if any other Java developers have
experience this problem with their Java application in a Citrix Published
application environment.

We are running Citrix XP enterprise feature release 2 on windows 2000 server
sp4. We developed a Java application which can catch the "PrintScreen" key
event released event correctly in our PC but could not catch it after we
made it a Citric Published application and run it through the Citrix
Published Application Icon.
I used a simple test program to catch every key pressed, key released and
key typed event and displayed their key codes. I found out a Citrix
published application will interprete the "Printscreen" Key as key code 154
on a PC running Windows XP. But interpretes the same key as key code 17 when
running as a Citrix published application. Below is my results of the two
tests, by pressing the "Printscreen" key
PC:
KeyReleased Event java.awt.event.KeyEvent[KEY_RELEASED,keyCode=154,Print
Screen] on frame0

Citrix:
KeyPressed Event java.awt.event.KeyEvent[KEY_PRESSED,keyCode=17,keyChar='?']
on frame0
KeyReleased Event
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=17,keyChar='?'] on frame0

One more additional twist, PC can only catch the KeyReleased event. Citrix
can catch the KeyPressed and KeyReleased event but does not interprete it as
154.

Does any other Citrix users and Java developers have any insight to this?

Here is my simple Java test program, if anyone wants to see.

public class PrtScr extends JFrame implements KeyListener {
PrintWriter out;

public PrtScr() {
pack();
setSize(500, 500);

setDefaultCloseOperation(EXIT_ON_CLOSE);

try {
out = new PrintWriter(new BufferedWriter(new FileWriter("foo.txt")));

out.println("PrtScr starts: ");
addKeyListener(this);

} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
//out.close();
}

}

public void keyPressed(KeyEvent e) {
System.out.println(e);
out.println("KeyPressed Event " + e.toString());
out.flush();
}

public void keyReleased(KeyEvent e) {
System.out.println(e);
out.println("KeyReleased Event " + e.toString());
out.flush();
}

public void keyTyped(KeyEvent e) {
System.out.println(e);
out.println("KeyTyped Event " + e.toString());
out.flush();
}

public static void main(String[] args) {
PrtScr frame = new PrtScr();
frame.setVisible(true);
}
}

Thanks.

Jul 17 '05 #1
0 4488

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by David Veeneman | last post: by
5 posts views Thread by Tim W. | last post: by
2 posts views Thread by Randall Parker | last post: by
3 posts views Thread by geskerrett | last post: by
45 posts views Thread by Master Programmer | last post: by
5 posts views Thread by John | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.