 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
James Ng Guest
|
Posted: Tue Mar 02, 2004 3:26 pm Post subject: PrintScreen Key Event changed in Citrix published applicatio |
|
|
I have posted this to the Citrix Developers' forum and comp.lang.java
for a while, and have not heard anything yet. So I'd like to see if
any other Java GUI developers have experienced this problem with their
Java application in a Citrix Published application environment. Since
the problem relates to mapping a key in a Java GUI application.
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.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|