org.fusesource.jansi.internal.WindowsSupport.readConsoleInput()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(141)

本文整理了Java中org.fusesource.jansi.internal.WindowsSupport.readConsoleInput()方法的一些代码示例,展示了WindowsSupport.readConsoleInput()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindowsSupport.readConsoleInput()方法的具体详情如下:
包路径:org.fusesource.jansi.internal.WindowsSupport
类名称:WindowsSupport
方法名:readConsoleInput

WindowsSupport.readConsoleInput介绍

暂无

代码示例

代码示例来源:origin: jline/jline

events = WindowsSupport.readConsoleInput(1);
} catch (IOException e) {
  Log.debug("read Windows console input error: ", e);

代码示例来源:origin: org.aesh/aesh-readline

events = WindowsSupport.readConsoleInput(1);
} catch (IOException e) {
  LOGGER.log(Level.INFO, "read Windows terminal input error: ", e);

代码示例来源:origin: com.typesafe.sbt/incremental-compiler

events = WindowsSupport.readConsoleInput(1);
} catch (IOException e) {
  Log.debug("read Windows console input error: ", e);

代码示例来源:origin: org.jline/jline

protected boolean processConsoleInput() throws IOException {
  INPUT_RECORD[] events = WindowsSupport.readConsoleInput(1, 100);
  if (events == null) {
    return false;
  }
  boolean flush = false;
  for (INPUT_RECORD event : events) {
    if (event.eventType == INPUT_RECORD.KEY_EVENT) {
      KEY_EVENT_RECORD keyEvent = event.keyEvent;
      processKeyEvent(keyEvent.keyDown , keyEvent.keyCode, keyEvent.uchar, keyEvent.controlKeyState);
      flush = true;
    } else if (event.eventType == INPUT_RECORD.WINDOW_BUFFER_SIZE_EVENT) {
      raise(Signal.WINCH);
    } else if (event.eventType == INPUT_RECORD.MOUSE_EVENT) {
      processMouseEvent(event.mouseEvent);
      flush = true;
    } else if (event.eventType == INPUT_RECORD.FOCUS_EVENT) {
      processFocusEvent(event.focusEvent.setFocus);
    }
  }
  return flush;
}

相关文章