diff options
author | Ken Moore <moorekou@gmail.com> | 2016-03-14 13:09:08 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-03-14 13:09:08 -0400 |
commit | c72454508cfeae6d6dcebd31a8713b881fc632d9 (patch) | |
tree | eed88e1ea425059fce85468f408de54d8d5224ff /desktop-utilities/lumina-terminal/TtyProcess.cpp | |
parent | Finish getting the special keys handled in lumina-terminal. Now the terminal ... (diff) | |
download | lumina-c72454508cfeae6d6dcebd31a8713b881fc632d9.tar.gz lumina-c72454508cfeae6d6dcebd31a8713b881fc632d9.tar.bz2 lumina-c72454508cfeae6d6dcebd31a8713b881fc632d9.zip |
Add the ANSI graphics support (most common ones) so that the text is bold/italics/colored/other as necessary.
Diffstat (limited to 'desktop-utilities/lumina-terminal/TtyProcess.cpp')
-rw-r--r-- | desktop-utilities/lumina-terminal/TtyProcess.cpp | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/desktop-utilities/lumina-terminal/TtyProcess.cpp b/desktop-utilities/lumina-terminal/TtyProcess.cpp index fefc96ea..0291a712 100644 --- a/desktop-utilities/lumina-terminal/TtyProcess.cpp +++ b/desktop-utilities/lumina-terminal/TtyProcess.cpp @@ -63,38 +63,13 @@ void TTYProcess::closeTTY(){ } void TTYProcess::writeTTY(QByteArray output){ - qDebug() << "Write:" << output; + //qDebug() << "Write:" << output; ::write(ttyfd, output.data(), output.size()); } -/*void TTYProcess::writeQtKey(int key){ - QByteArray ba; - //Check for special keys - switch(key){ - case Qt::Key_Backspace: - ba.append("\x1b[D\x1b[K"); - break; - case Qt::Key_Left: - ba.append("\x1b[D"); - break; - case Qt::Key_Right: - ba.append("\x1b[C"); - break; - case Qt::Key_Up: - ba.append("\x1b[A"); - break; - case Qt::Key_Down: - ba.append("\x1b[B"); - break; - } - - //qDebug() << "Forward Input:" << txt << ev->key() << ba; - if(!ba.isEmpty()){ this->writeTTY(ba); } -}*/ - QByteArray TTYProcess::readTTY(){ QByteArray BA; - qDebug() << "Read TTY"; + //qDebug() << "Read TTY"; if(sn==0){ return BA; } //not setup yet char buffer[64]; ssize_t rtot = read(sn->socket(),&buffer,64); @@ -129,7 +104,7 @@ void TTYProcess::setTerminalSize(QSize chars, QSize pixels){ if( ioctl(ttyfd, TIOCSWINSZ, &ws) ){ qDebug() << "Error settings terminal size"; }else{ - qDebug() <<"Set Terminal Size:" << pixels << chars; + //qDebug() <<"Set Terminal Size:" << pixels << chars; } } |