MCPcopy Create free account
hub / github.com/badvision/jace / getClipboardKeystroke

Method getClipboardKeystroke

src/main/java/jace/core/Keyboard.java:333–354  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

331 static StringReader pasteBuffer = null;
332
333 public static int getClipboardKeystroke() {
334 if (pasteBuffer == null) {
335 return -1;
336 }
337
338 try {
339 int keypress = pasteBuffer.read();
340 // Handle end of paste buffer
341 if (keypress == -1) {
342 pasteBuffer.close();
343 pasteBuffer = null;
344 return -1;
345 }
346
347 return (keypress & 0x0ff);
348
349 } catch (IOException ex) {
350 Logger.getLogger(Keyboard.class
351 .getName()).log(Level.SEVERE, null, ex);
352 }
353 return -1;
354 }
355
356 @Override
357 public String getName() {

Callers 1

readStateMethod · 0.95

Calls 4

closeMethod · 0.80
getNameMethod · 0.65
readMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected