-
Notifications
You must be signed in to change notification settings - Fork 357
Open
Labels
Milestone
Description
Key sources include real human keyboard input and java.awt.Robot virtual input. How do I distinguish them when using keyListener?
I tried to distinguish by these properties, but they are the same in both cases.
public void nativeKeyPressed(NativeKeyEvent e) {
System.out.println("--------------------------");
System.out.println(e.getKeyCode());
System.out.println(e.getKeyLocation());
System.out.println(e.getWhen());
System.out.println(e.getKeyChar());
System.out.println(e.getSource());
System.out.println(e.getID());
System.out.println(e.getModifiers());
System.out.println(e.getRawCode());
System.out.println("==========================");
}