Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コード
Robot r=new Robot(); r.keyPress(KeyEvent.VK_CAPS_LOCK); r.keyPress(KeyEvent.VK_V); r.keyPress(KeyEvent.VK_CAPS_LOCK);
を印刷した後に閉じませんV。これを修正するにはどうすればよいですか?
V
キーを押した後、キーを離す必要があります。
Robot r=new Robot(); r.keyPress(KeyEvent.VK_CAPS_LOCK); r.keyRelease(KeyEvent.VK_CAPS_LOCK); r.keyPress(KeyEvent.VK_V); r.keyRelease(KeyEvent.VK_V); r.keyPress(KeyEvent.VK_CAPS_LOCK); r.keyRelease(KeyEvent.VK_CAPS_LOCK);