0
자바 로봇 클래스를 통해 특수 문자 (중국어, 키릴 문자 등)를 누르는 데 문제가 있습니다. 나는 alt + keycode로 작동하는 키를 누르는 방법을 제안합니다. 일부 특수 문자를 corrent 키 코드로 변환 할 수 없습니다. 어떻게 해결할 수 있을까요?자바 로봇 클래스 프레스 특수 문자?
KeyStroke ks = KeyStroke.getKeyStroke('a', 0);
System.out.println(ks.getKeyCode());
Output : 97
//but if I convert 'ş' to keycode
//Output is 351 . So alt+351= '_' The Correct combination is alt+0254 for 'ş'
누르기 :
public static void doType(int a, int keyCodes)
throws AWTException {
Robot robot = new Robot();
robot.keyPress(VK_ALT);
robot.keyPress(keyCodes);
robot.keyRelease(keyCodes);
robot.keyRelease(VK_ALT);
}
http://stackoverflow.com/questions/397113/how-to-make-the-java-awt-robot-type-unicode-characters-is-it-possible –