PrintScreen Key Event gets changed after we've made it a Citrix published application
From: James Ng (spock_at_dhc.net)
Date: 02/29/04
- Next message: Mark A. Washburn: "Calendar fun"
- Previous message: Dr John Stockton: "Re: S.O.S!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 29 Feb 2004 16:39:35 GMT
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.
- Next message: Mark A. Washburn: "Calendar fun"
- Previous message: Dr John Stockton: "Re: S.O.S!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|