How to use the terminal-kit.terminal.fullscreen function in terminal-kit

To help you get started, we’ve selected a few terminal-kit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zamotany / react-slate / packages / core / src / renderFullscreen.ts View on Github external
function initialize(container: View) {
  process.on('exit', exit);

  global.console = bufferedConsole;
  terminal.fullscreen(true);
  terminal.grabInput({ mouse: 'motion' });
  terminal.hideCursor();

  terminal.once('key', (name: string) => {
    if (name === 'CTRL_C') {
      // Trigger 'exit' event, which will do the clean up.
      process.exit(0);
    }
  });

  const eventManager = new EventManager();

  terminal.on('mouse', (name: string, data: MouseEvent) => {
    if (name === 'MOUSE_LEFT_BUTTON_PRESSED') {
      eventManager.propagateEvent(
        EventTypes.MOUSE_LEFT_BUTTON_PRESSED,
github zamotany / react-slate / packages / core / src / renderFullscreen.ts View on Github external
export function exit(code: number = 0) {
  terminal.grabInput(false);
  terminal.hideCursor(false);
  terminal.fullscreen(false);
  flushConsole(terminal);
  terminal.processExit(code);
}
github sjurba / rebase-editor / lib / terminal_renderer.js View on Github external
function init(cb) {
  term.fullscreen(true);
  term.grabInput();
  term.on('key', (key) => {
    cb(keyBindings[key], key);
  });
}
github sjurba / rebase-editor / lib / editor.js View on Github external
function setData(data) {
  term.fullscreen(true);
  status('Status ');

  input = input.concat(data.split('\n'));
  resetTerminal();
  for (var i = 0; i < input.length; i++) {
    if (input[i] === '') {
      lastLine = i - 1;
      break;
    }
  }
}
github sjurba / rebase-editor / lib / editor.js View on Github external
function close(str) {
    term.fullscreen(false);
    term.clear();
    done(str);
  }
  term.grabInput();
github brannondorsey / chattervox / src / ui / chat.ts View on Github external
export function enter(): void {
    term.fullscreen()
}
github msaari / 18sh / modules / commandPrompt.js View on Github external
const initialize = () => {
	term.fullscreen()
	term.nextLine(term.height - 4)
	const response = gameState.createOrLoadGame()
	if (response.mode === "load") {
		_updateGameState(gameState.getCommandHistory())
	}
	term(response.feedback)
	updateStatusBar()
}
github Automattic / wp-calypso / bin / analyze-css.js View on Github external
const render = () => {
	term.fullscreen();
	term.inverse( padLine( 'Use the arrow keys and BACKSPACE to navigate, ENTER to select, and ESC to quit' ) );
	term( '\n' );
	term.bold( padLine( `--- ${ current.path } `, '-' ) );

	if ( menu ) {
		menu.abort();
	}

	menu = term.singleColumnMenu(
		getMenu( current, term.height - 4 ),
		{ selectedIndex: current.index },
		( error, { selectedIndex } ) => {
			const selectedDirectory = current.items[ selectedIndex ].name;
			const selectedPath = path.resolve( current.path, selectedDirectory );
			const stats = fs.statSync( selectedPath );