Diffstat (limited to 'core/apps/embeddedkonsole/TEmulation.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/TEmulation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/apps/embeddedkonsole/TEmulation.cpp b/core/apps/embeddedkonsole/TEmulation.cpp index c19f2a1..a539757 100644 --- a/core/apps/embeddedkonsole/TEmulation.cpp +++ b/core/apps/embeddedkonsole/TEmulation.cpp @@ -166,64 +166,65 @@ void TEmulation::setCodec(int c) : QTextCodec::codecForLocale(); if (decoder) delete decoder; decoder = codec->makeDecoder(); } void TEmulation::setKeytrans(int no) { keytrans = KeyTrans::find(no); } void TEmulation::setKeytrans(const char * no) { keytrans = KeyTrans::find(no); } // Interpreting Codes --------------------------------------------------------- /* This section deals with decoding the incoming character stream. Decoding means here, that the stream is first seperated into `tokens' which are then mapped to a `meaning' provided as operations by the `Screen' class. */ /*! */ void TEmulation::onRcvChar(int c) // process application unicode input to terminal // this is a trivial scanner { c &= 0xff; + switch (c) { case '\b' : scr->BackSpace(); break; case '\t' : scr->Tabulate(); break; case '\n' : scr->NewLine(); break; case '\r' : scr->Return(); break; case 0x07 : gui->Bell(); break; default : scr->ShowCharacter(c); break; }; } /* ------------------------------------------------------------------------- */ /* */ /* Keyboard Handling */ /* */ /* ------------------------------------------------------------------------- */ /*! */ void TEmulation::onKeyPress( QKeyEvent* ev ) { if (!connected) return; // someone else gets the keys if (scr->getHistCursor() != scr->getHistLines()); scr->setHistCursor(scr->getHistLines()); if (!ev->text().isEmpty()) { // A block of text // Note that the text is proper unicode. // We should do a conversion here, but since this // routine will never be used, we simply emit plain ascii. emit sndBlock(ev->text().ascii(),ev->text().length()); } |