DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36959>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36959 ------- Additional Comments From [EMAIL PROTECTED] 2005-12-05 18:14 ------- Additional informations: In MenuFactory.addEditMenu(JPopupMenu menu, boolean removable) with different shortcuts (different from Ctrl+x, Ctrl+c, Ctrl+v), it works fine. I tried with: KeyEvent.VK_(2, 3, 4) (not numpad, watch out they don't behave as normal keys, keyTyped is not call) and with KeyEvent.VK_G (I desactivated this one because it was use elsewhere) (this one behave normally) I added System.out.println and breakpoints in JMeterTreeListener.keyTyped(KeyEvent e) (WARN: I'll provide the System.out.println as a patch but it not for real use) but I don't understand why Ctrl+x doesn't work?! I tried to replace VK_X with VK_CUT, still doesn't work. I read (again and again) the KeyEvent javadoc (http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/KeyEvent.html), but I didn't see any special mention of a different behavior with those special shortcuts. I tried with azerty and qwerty keyboards, still don't work. The strange thing is that we assign Crtl+x shortcut in MenuFactory.addEditMenu(JPopupMenu menu, boolean removable): menu.add(makeMenuItem(JMeterUtils.getResString("cut"), "Cut", "Cut", KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_MASK))); But in JMeterTreeListener.keyTyped(KeyEvent e): if (e.getKeyChar() == KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_MASK).getKeyChar()) { System.out.println("YES!"); } else { System.out.println("NO!"); } always print "NO!" when typing "Ctrl+x" ?! >java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
