Skip to main content

# Toggle Input

Pro Feature

This is an exclusive feature of WebSerial Pro. Check it out here.

The toggle input feature in WebSerial Pro allows users to easily enable or disable the command input bar within the webserial interface. It is particularly useful when users want to use WebSerial solely for monitoring purposes, such as when they do not want commands sent to their firmware or when it is integrated into a product for monitoring only.

The input bar can be re-enabled whenever command input is required, making it a versatile tool for various use cases.

## Disable Input​

By default, the command input bar is enabled in WebSerial. To disable it, you can simply add this line of code in your firmware:

    WebSerial.disableInput();

## Enable Input​

Similarly, You can re-enable command input bar using the following line of code:

    WebSerial.enableInput();

### Example Usage​

    ...
    #include <WebSerialPro.h>

    void setup() {
      ...

      // Disables WebSerial Command Input Bar
      WebSerial.disableInput();
    }

    void loop() {
      ...
    }