Support Reporting Terminal Window in Pixels #962

zz85 opened this Issue Nov 5, 2016 · 5 comments


None yet

4 participants

zz85 commented Nov 5, 2016
  • OS version and name: Mac OSX 10.12 (16A323)
  • version:


threejs-tern requires the actual pixel size of the terminal so it would be able to render a 3d scene with a more accurate aspect ratio.

At the point of testing, Hyper does not seems to support pixel dimension reporting (although terminal size reporting and mouse works which is pretty cool!)

Some code related to this issue is here.

This issue isn't present using iTerm2 or Mac's

I'm not too familiar with the internals of Hyper, but my guess is that a fix for this issue would be to implement the CSI sequence P 1 4.


@zz85 zz85 changed the title from Support to Support Reporting Terminal Window in Pixels Nov 5, 2016
ppot commented Nov 8, 2016

@zz85 Not sure what you want exactly. The Height x Width, since those are already in pixels

zz85 commented Dec 11, 2016

@ppot I'm not sure I get you. From my understanding Hyper only supports Window Dimensions for Height x Width expressed as Characters with command P 1 8, whereas command P 1 4 that reports Window size in pixels is not supported.

ppot commented Dec 11, 2016

@zz85 Well P 1 8 is [width;height]which are in px at the moment while P 1 4 is more or less width * height reported in px from what I understand.

P s = 1 4 → Report xterm window in pixels as CSI 4 ; height ; width t 
P s = 1 8 → Report the size of the text area in characters as CSI 8 ; height ; width t 
zz85 commented Dec 13, 2016

@ppot are you able to reproduce this error from this code?

blessed = require('blessed');
screen = blessed.screen();

screen.program.manipulateWindow(14, (e, res) => {
    if (e) {
        return console.log('Error p14', e);

    console.log('Response p14 OK');

Swap 14 with 18 and it seems to be fine.

rauchg commented Jan 8, 2017

I would love to make this work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment