Bug Report - Terminal doesn't forward mouse events #3832

Open
opened 2026-01-30 23:31:06 +00:00 by claunia · 0 comments
Owner

Originally created by @germanoeich on GitHub (Sep 11, 2019).

Environment

Windows build number: 10.0.18362.356
Windows Terminal version: 0.4.2382.0

WSL Ubuntu 18.04

Steps to reproduce

Run the following app using node.js after doing npm i blessed

var blessed = require('blessed');

var screen = blessed.screen({
    smartCSR: true
});

screen.title = 'my window title';

var box = blessed.box({
    top: 'center',
    left: 'center',
    width: '50%',
    height: '50%',
    content: 'Hello {bold}world{/bold}!',
    tags: true,
    border: {
        type: 'line'
    },
    style: {
        fg: 'white',
        bg: 'magenta',
        border: {
            fg: '#f0f0f0'
        },
        hover: {
            bg: 'green'
        }
    }
});

box.on('click', function (data) {
    box.setContent('{center}Some different {red-fg}content{/red-fg}.{/center}');
    screen.render();
});

screen.key(['escape', 'q', 'C-c'], function (ch, key) {
    return process.exit(0);
});

box.focus();
screen.append(box);
screen.render();

Expected behavior

When hovering, the mouse pointer position should be relayed to WSL and in return to the blessed application.
When clicking, the mouse pointer event should be relayed to WSL and in return to the blessed application.

Actual behavior

When hovering with the mouse pointer, the box doesn't change color as it should.
When clicking the box, the content is not changed.

This behaviour works on WSL (Win+R + wsl.exe -d Ubuntu-18.04)

Here's a gif with raw WSL and Windows Terminal running WSL side by side that compares the behaviour
7FTS1bQfWm

Originally created by @germanoeich on GitHub (Sep 11, 2019). # Environment ```none Windows build number: 10.0.18362.356 Windows Terminal version: 0.4.2382.0 WSL Ubuntu 18.04 ``` # Steps to reproduce Run the following app using node.js after doing `npm i blessed` ```js var blessed = require('blessed'); var screen = blessed.screen({ smartCSR: true }); screen.title = 'my window title'; var box = blessed.box({ top: 'center', left: 'center', width: '50%', height: '50%', content: 'Hello {bold}world{/bold}!', tags: true, border: { type: 'line' }, style: { fg: 'white', bg: 'magenta', border: { fg: '#f0f0f0' }, hover: { bg: 'green' } } }); box.on('click', function (data) { box.setContent('{center}Some different {red-fg}content{/red-fg}.{/center}'); screen.render(); }); screen.key(['escape', 'q', 'C-c'], function (ch, key) { return process.exit(0); }); box.focus(); screen.append(box); screen.render(); ``` # Expected behavior When hovering, the mouse pointer position should be relayed to WSL and in return to the blessed application. When clicking, the mouse pointer event should be relayed to WSL and in return to the blessed application. # Actual behavior When hovering with the mouse pointer, the box doesn't change color as it should. When clicking the box, the content is not changed. This behaviour works on WSL (Win+R + `wsl.exe -d Ubuntu-18.04`) Here's a gif with raw WSL and Windows Terminal running WSL side by side that compares the behaviour ![7FTS1bQfWm](https://user-images.githubusercontent.com/17045274/64737200-ad6f3080-d4c2-11e9-9e8e-249801978099.gif)
claunia added the Resolution-Duplicate label 2026-01-30 23:31:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3832