Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1025317 // automate_typeChar

JavaX fragment (include)

svoid automate_typeChar(char c) {
  assertAutomationAllowed();
  int kc = KeyEvent.getExtendedKeyCodeForChar(Character.toLowerCase(c));
  if (kc == KeyEvent.VK_UNDEFINED) ret with print("No keycode for " + c);
  awtRobot().keyPress(kc);
  awtRobot().keyRelease(kc);
}

Author comment

Began life as a copy of #1010755

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025317
Snippet name: automate_typeChar
Eternal ID of this version: #1025317/3
Text MD5: c10727278c1a3b928aada760401eac96
Author: stefan
Category: javax / automation
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-21 22:46:54
Source code size: 273 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 243 / 259
Version history: 2 change(s)
Referenced in: [show references]