Konsole
Vt102Emulation.cpp
Go to the documentation of this file.
68 Vt102Emulation::Vt102Emulation()
168 #define TY_CONSTRUCT(T,A,N) ( ((((int)N) & 0xffff) << 16) | ((((int)A) & 0xff) << 8) | (((int)T) & 0xff) )
278 #define eps(C) (p >= 3 && s[2] != '?' && s[2] != '!' && s[2] != '>' && cc < 256 && (charClass[cc] & (C)) == (C))
353 processToken(TY_CSI_PS(cc, argv[i-2]), COLOR_SPACE_RGB, (argv[i] << 16) | (argv[i+1] << 8) | argv[i+2]);
736 //Konsole currently supports mode 1000 (basic mouse press and release) and mode 1002 (dragging the mouse).
779 case TY_CSI_PR('l', 1047) : _screen[1]->clearEntireScreen(); resetMode(MODE_AppScreen); break; //XTERM
791 case TY_CSI_PR('h', 1049) : saveCursor(); _screen[1]->clearEntireScreen(); setMode(MODE_AppScreen); break; //XTERM
848 snprintf(tmp, sizeof(tmp), "\033[%d;%dR", _currentScreen->getCursorY()+1, _currentScreen->getCursorX()+1);
925 // Note that if multiple extensions are enabled, the 1006 is used, so it's okay to check for only that.
940 // Check the extensions in decreasing order of preference. Encoding the release event above assumes that 1006 comes first.
QByteArray fromUnicode(const QString &str) const
QString & append(QChar ch)
void programBracketedPasteModeChanged(bool bracketedPasteMode)
Echos the operating system specific erase character.
Definition: KeyboardTranslator.h:112
virtual void setImageSize(int lines, int columns)
Change the size of the emulation's image.
Definition: Emulation.cpp:338
void titleChanged(int title, const QString &newTitle)
Emitted when the program running in the terminal wishes to update the session's title.
const T & next()
void sendData(const char *data, int len)
Emitted when a buffer of data is ready to send to the standard input of the terminal.
Scroll the terminal display down one line.
Definition: KeyboardTranslator.h:106
int currentLine() const
Returns the index of the line which is currently at the top of this window.
Definition: ScreenWindow.cpp:212
void clearEntireScreen()
Clear the whole screen, moving the current screen contents into the history first.
Definition: Screen.cpp:954
Scroll the terminal display up to the start of history.
Definition: KeyboardTranslator.h:108
Qt::KeyboardModifiers modifierMask() const
Returns the keyboard modifiers which are valid in this entry.
Definition: KeyboardTranslator.h:464
TODO More documentation.
Definition: KeyboardTranslator.h:78
Represents an association between a key sequence pressed by the user and the character sequence and c...
Definition: KeyboardTranslator.h:121
QByteArray text(bool expandWildCards=false, Qt::KeyboardModifiers keyboardModifiers=Qt::NoModifier) const
Returns the character sequence associated with this entry, optionally replacing wildcard '*' characte...
Definition: KeyboardTranslator.h:491
bool isEmpty() const
Indicates that any of the modifier keys is active.
Definition: KeyboardTranslator.h:85
Qt::KeyboardModifiers modifiers() const
Returns a bitwise-OR of the enabled keyboard modifiers associated with this entry.
Definition: KeyboardTranslator.h:455
Definition: Emulation.h:438
Indicates that the alternate screen ( typically used by interactive programs such as screen or vim ) ...
Definition: KeyboardTranslator.h:83
int length() const
Indicates that no special state is active.
Definition: KeyboardTranslator.h:65
virtual void sendMouseEvent(int buttons, int column, int line, int eventType)
Definition: Vt102Emulation.cpp:919
TerminalDisplay * currentTerminalDisplay()
Definition: Screen.h:569
void setCodec(const QTextCodec *)
Sets the codec used to decode incoming characters.
Definition: Emulation.cpp:149
const KeyboardTranslator * _keyTranslator
Definition: Emulation.h:458
Definition: Emulation.h:437
virtual bool event(QEvent *e)
void setMargins(int topLine, int bottomLine)
Sets the margins for scrolling the screen.
Definition: Screen.cpp:130
void programUsesMouseChanged(bool usesMouse)
This is emitted when the program running in the shell indicates whether or not it is interested in mo...
States state() const
Returns a bitwise-OR of the enabled state flags associated with this entry.
Definition: KeyboardTranslator.h:515
Indicates that the terminal is in 'ANSI' mode.
Definition: KeyboardTranslator.h:74
virtual char eraseChar() const
Returns the special character used for erasing character.
Definition: Vt102Emulation.cpp:1299
virtual void sendText(const QString &text)
Definition: Vt102Emulation.cpp:964
Scroll the terminal display down one page.
Definition: KeyboardTranslator.h:102
QByteArray & prepend(char ch)
virtual void resetMode(int mode)
Definition: Vt102Emulation.cpp:1249
virtual void clearEntireScreen()
Copies the current image into the history and clears the screen.
Definition: Vt102Emulation.cpp:82
bool isEmpty() const
virtual void sendString(const char *, int length=-1)
Definition: Vt102Emulation.cpp:837
const char * constData() const
QString text() const
The terminal program has triggered a bell event to get the user's attention.
Definition: Emulation.h:57
int count(char ch) const
Entry findEntry(int keyCode, Qt::KeyboardModifiers modifiers, States state=NoState) const
Looks for an entry in this keyboard translator which matches the given key code, keyboard modifiers a...
Definition: KeyboardTranslator.cpp:680
int lineCount() const
Returns the total number of lines, including those stored in the history.
Definition: Emulation.cpp:303
QList< Key > keys() const
States stateMask() const
Returns the state flags which are valid in this entry.
Definition: KeyboardTranslator.h:524
void clear()
int key() const
Scroll the terminal display down to the end of history.
Definition: KeyboardTranslator.h:110
Command command() const
Returns the commands associated with this entry.
Definition: KeyboardTranslator.h:478
Provides an xterm compatible terminal emulation based on the DEC VT102 terminal.
Definition: Vt102Emulation.h:76
void setDefaultMargins()
Resets the scrolling margins back to the top and bottom lines of the screen.
Definition: Screen.cpp:341
TODO More documentation.
Definition: KeyboardTranslator.h:69
int getCursorX() const
Returns the column which the cursor is positioned at.
Definition: Screen.cpp:830
void scrollScreenWindow(enum ScreenWindow::RelativeScrollMode mode, int amount)
Scrolls current ScreenWindow.
Definition: TerminalDisplay.cpp:2933
int count() const
int getCursorY() const
Returns the line which the cursor is positioned on.
Definition: Screen.cpp:835
Indicates that no command is associated with this command sequence.
Definition: KeyboardTranslator.h:96
void changeTabTextColorRequest(int color)
Requests that the color of the text used to represent the tabs associated with this emulation be chan...
ScreenWindow * screenWindow() const
Returns the terminal screen section which is displayed in this widget.
Definition: TerminalDisplay.cpp:103
Scroll the terminal display up one page.
Definition: KeyboardTranslator.h:100
void reserve(int size)
Scroll the terminal display up one line.
Definition: KeyboardTranslator.h:104
void receiveData(const char *buffer, int len)
Processes an incoming stream of characters.
Definition: Emulation.cpp:225
void start(int msec)
void setLineProperty(LineProperty property, bool enable)
Sets or clears an attribute of the current line.
Definition: Screen.cpp:1376
void stateSet(int state)
Emitted when the activity state of the emulation is set.
virtual void sendKeyEvent(QKeyEvent *)
Definition: Vt102Emulation.cpp:974
const QTextCodec * codec() const
Returns the codec used to decode incoming characters.
Definition: Emulation.h:169
void saveCursor()
Saves the current position and appearance (text color and style) of the cursor.
Definition: Screen.cpp:279
void flowControlKeyPressed(bool suspendKeyPressed)
Emitted when a flow control key combination ( Ctrl+S or Ctrl+Q ) is pressed.
Indicates that the numpad is in application mode.
Definition: KeyboardTranslator.h:87
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
A widget which displays output from a terminal emulation and sends input keypresses and mouse activit...
Definition: TerminalDisplay.h:63
void imageResizeRequest(const QSize &sizz)
Emitted after receiving the escape sequence which asks to change the terminal emulator's size...
Scroll the window down by a given number of pages, where one page is windowLines() lines...
Definition: ScreenWindow.h:200
QByteArray toAscii() const
void setSingleShot(bool singleShot)
Scroll the window down by a given number of lines.
Definition: ScreenWindow.h:195
typedef KeyboardModifiers
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.