crossterm_screen 0.3.1

A cross-platform library for raw and alternate screen.
Documentation

Lines of Code Latest Version MIT docs Join us on Discord

Crossterm Screen

This crate allows you to work with alternate and raw screen cross-platform. It supports all UNIX and windows terminals down to windows 7 (not all terminals are tested see Tested Terminals for more info)

This crate is a sub-crate of crossterm to move between screen buffers and switch to raw-mode, it can be use individually.

Other sub-crates are:

When you want to use other modules as well you might want to use crossterm with feature flags.

In case you are wondering what 'alternate' or 'raw' screen is, you could checkout the book describing this in more detail.

Table of contents:

Getting Started

All examples of how crossterm_input works can be found in the examples repository. You might consider reading the book which has a dedicated section on alternate and raw modes.

Add the crossterm_screen package to your Cargo.toml file.

[dependencies]
crossterm_screen = "0.3"

And import the crossterm_screen modules you want to use.

pub use crossterm_screen::{AlternateScreen, RawScreen};

Useful Links

Features

These are the features of this crate:

  • Cross-platform
  • Multi-threaded (send, sync)
  • Detailed Documentation
  • Few Dependencies
  • Alternate screen
  • Raw screen

Planned features:

  • make is possible to switch between multiple buffers.

Examples

The examples repository has more complete and verbose examples.

Tested terminals

  • Windows Powershell
    • Windows 10 (pro)
  • Windows CMD
    • Windows 10 (pro)
    • Windows 8.1 (N)
  • Ubuntu Desktop Terminal
    • Ubuntu 17.10
  • (Arch, Manjaro) KDE Konsole
  • Linux Mint

This crate supports all Unix terminals and windows terminals down to Windows 7 but not all of them have been tested. If you have used this library for a terminal other than the above list without issues feel free to add it to the above list, I really would appreciate it.

Authors

  • Timon Post - Project Owner & creator

License

This project is licensed under the MIT License - see the LICENSE.md file for details