Package org.octabyte.fxshell.terminal.event

Examples of org.octabyte.fxshell.terminal.event.KeyboardEvent$KeyboardEventBuilder


    }

    @Override
    public boolean onTerminalEvent(TerminalEvent event) {
        if ( event instanceof KeyboardEvent) {
            KeyboardEvent kdbEvent = (KeyboardEvent)event;
            if ( kdbEvent.getKeyCode() == KeyCode.HOME ) {
                terminalState.moveCursorSOL();
            } else if ( kdbEvent.getKeyCode() == KeyCode.END ) {
                terminalState.moveCursorEOL();
            }
        }
        return true;
    }
View Full Code Here


    }

    @Override
    public boolean onTerminalEvent(TerminalEvent event) {
        if ( event instanceof KeyboardEvent ) {
            KeyboardEvent kbdEvent = (KeyboardEvent)event;
            if ( kbdEvent.getKeyCode() == KeyCode.LEFT ) {
                terminalState.moveCursorLeft();
            } else if ( kbdEvent.getKeyCode() == KeyCode.RIGHT ) {
                terminalState.moveCursorRight();
            }
        }
        return true;
    }
View Full Code Here

    @Override
    public boolean onTerminalEvent(TerminalEvent event) {
        boolean result = true;
        if ( event instanceof KeyboardEvent ) {
            KeyboardEvent kbdEvent = (KeyboardEvent)event;
            if ( (kbdEvent.isCtrlDown() && kbdEvent.getKeyCode() == KeyCode.V)
                    || (kbdEvent.isShiftDown() && kbdEvent.getKeyCode() == KeyCode.INSERT)
            ) {
                try {
                    String pasteText = Toolkit.getDefaultToolkit().getSystemClipboard().getData(DataFlavor.stringFlavor).toString();
                    String[] lines = pasteText.split("\n");
                    for(int i = 0; i != lines.length; ++i) {
View Full Code Here

    }

    @Override
    public boolean onTerminalEvent(TerminalEvent event) {
        if ( event instanceof KeyboardEvent ) {
            KeyboardEvent kbdEvent = (KeyboardEvent)event;
            if ( kbdEvent.getKeyCode() == KeyCode.UP ) {
                processUp();
            } else if ( kbdEvent.getKeyCode() == KeyCode.DOWN) {
                processDown();
            }
        } else if ( event instanceof NewLineEvent) {
            processNewLine();
        } else if ( event instanceof ShutdownEvent) {
View Full Code Here

    }

    @Override
    public boolean onTerminalEvent(TerminalEvent event) {
        if ( event instanceof KeyboardEvent ) {
            KeyboardEvent kbdEvent = (KeyboardEvent)event;
            if ( kbdEvent.getKeyCode() == KeyCode.BACK_SPACE ) {
                terminalState.deleteCharBeforeCursor();
            } else if ( kbdEvent.getKeyCode() == KeyCode.DELETE ) {
                terminalState.deleteCharAtCursor();
            }
        }
        return true;
    }
View Full Code Here

TOP

Related Classes of org.octabyte.fxshell.terminal.event.KeyboardEvent$KeyboardEventBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.