XTerm Console Addon
Vaadin 14+ Java integration of xterm.js terminal emulator.
Features
- Send input text to server
- Programmatically write to the console
- Clipboard support
- Command line edition (cursor keys, insert, etc.)
- ANSI escape sequences
- And much more...
Found a bug or have a suggestion? Report it on GitHub
For bug reports, feature suggestions, or questions, please open an issue on GitHub. This makes it easier for us to track and respond efficiently, ensuring you get the best possible support. Your input helps us improve—thank you!
Sample code
XTerm xterm = new XTerm(); xterm.writeln("Hello world.\n\n"); xterm.setCursorBlink(true); xterm.setCursorStyle(CursorStyle.UNDERLINE); xterm.setSizeFull(); xterm.loadFeature(new XTermClipboard(), clipboard->{ clipboard.setCopySelection(true); clipboard.setUseSystemClipboard(UseSystemClipboard.READWRITE); clipboard.setPasteWithRightClick(true); }); xterm.loadFeature(new XTermConsole(), console->{ console.addLineListener(ev->{ String line = ev.getLine(); System.out.println(line); }); xterm.focus(); xterm.getFeature(XTermFit.class).ifPresent(fit->{ fit.fit(); });
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
New features:
- Provide reflection hints for native compilation (#90)
- Released
- 2024-09-02
- Maturity
- TESTED
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 24
- Vaadin 23 in 2.2.0
- Vaadin 22 in 2.2.0
- Vaadin 21 in 2.0.1
- Vaadin 14 in 1.0.2
- Browser
- N/A
XTerm Console Addon - Vaadin Add-on Directory
Vaadin 14+ Java integration of xterm.js terminal emulator.Issue tracker
Online Demo
Author Homepage
XTerm Console Addon version 1.0.0
Release for Vaadin 14+ (npm)
### Features
* Send input text to server
* Programmatically write to the console
* Clipboard support
* Command line edition (cursor keys, insert, etc.)
* ANSI escape sequences
* And much more...
Note: IE11 is not supported
XTerm Console Addon version 1.0.1
[Pin npm dependencies](https://github.com/FlowingCode/XTermConsoleAddon/commit/070d46ce2b100912428590d49f695c6c3ac8d8c4)
XTerm Console Addon version 1.0.2
Upgrade to xterm.js version 4.4.0
XTerm Console Addon version 2.0.0
### Overview
* Compatible with Vaadin 21+
* Based on xterm.js version [4.14.0](https://github.com/xtermjs/xterm.js/releases/tag/4.14.0)
### New features
* Add support for command prompt.
* Add support for command history.
* Preserve state of the terminal when the component is reattached.
* Add support for selection using shift+arrow, shift+home and shift+end keys.
* Initialize the terminal in insert mode.
* Add Java API for setting insert mode.
For more information about the release, please visit the [GitHub release page](https://github.com/FlowingCode/XTermConsoleAddon/releases/tag/xterm-console-2.0.0).
XTerm Console Addon version 2.0.1
### Maintenance release.
* Compatible with Vaadin 21+
* Based on xterm.js version 4.14.0
### Bug Fixes
* Fill the parent container after navigation ([#35](https://github.com/FlowingCode/XTermConsoleAddon/issues/35))
* PreserveStateAddon: reset() now clears the scrollbackBuffer ([#36](https://github.com/FlowingCode/XTermConsoleAddon/issues/36))
* PreserveStateAddon: preserve prompt in the scrollback buffer ([#36](https://github.com/FlowingCode/XTermConsoleAddon/issues/36))
XTerm Console Addon version 2.0.2
### New Features
* Compatible with Vaadin 22+
* Trigger a fit operation in response to a terminal-initialized event. This change prevents a situation where the terminal is not always resized on navigation.
XTerm Console Addon version 2.0.3
* Improve history behavior ([#48](https://github.com/FlowingCode/XTermConsoleAddon/issues/48))
* Improve handling of the prompt in PreserveStateAddon ([#50](https://github.com/FlowingCode/XTermConsoleAddon/issues/50))
* upgrade to Vaadin 22
XTerm Console Addon version 2.1.0
### New Features
* Upgrade to term.js 4.19.0
XTerm Console Addon version 2.1.1
#### Bug fixes:
* Fix compilation errors in Vaadin 23.3.0/24 ([#64](https://github.com/FlowingCode/XTermConsoleAddon/issues/64))
XTerm Console Addon version 2.2.0
#### New features:
* Upgrade to XTerm version 5.1.0
* Add method for enqueuing a listener before others
XTerm Console Addon version 3.0.0
#### Bug fixes:
* Import customElement from lit/decorators ([#82](https://github.com/FlowingCode/XTermConsoleAddon/issues/82))
#### New features:
* Use Lombok version for Java 21
XTerm Console Addon version 3.1.0
#### New features:
* Provide reflection hints for native compilation ([#90](https://github.com/FlowingCode/XTermConsoleAddon/issues/90))