17 Commits

Author SHA1 Message Date
David Herrmann
ea81381be5 vte: add 8-bit C1 code handlers (dummy)
Add handlers for C1 codes with a description what they are supposed to do. They
are not yet implemented and are no-ops.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-29 17:11:25 +01:00
David Herrmann
44fdd29e6c vte: new state machine implementation
This is now a fully vt500-series compliant state machine that parses escape
sequences. See vt100.net/emu for information on this state-machine. This is
written from scratch, though.

It now handles all kind of escape sequences that we every want to support. It
correctly ignores all unsupported ones right now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-29 15:25:53 +01:00
David Herrmann
06286da4ef vte: extend CSI debug message
Print the CSI command in debug messages so we can better understand what
escape commands were sent.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-05 16:03:13 +01:00
David Herrmann
cdb3d112a6 vte: implement backspace control
Add new helper to console subsystem which performs a backspace
operation. We must take care of auto-wrap mode so we cannot simply use
the *_move_left() function.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-05 16:02:21 +01:00
David Herrmann
5f0d151bb7 vte: implement basic cursor movement CSI
The A, B, C and D CSIs are used to move the cursor in the scroll-region
without scrolling the buffer when reaching the margins.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-05 16:01:12 +01:00
David Herrmann
dcfbbc3e1d vte: implement CSI-J
The J CSI is used to erase parts of the screen.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-05 15:56:34 +01:00
David Herrmann
a5a357e012 vte: implement CSI-K
The K CSI is used to erase parts of the current line.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-05 15:52:34 +01:00
David Herrmann
9b058b1f90 vte: implement basic cursor-movement controls
This adds support for line-feed and carriage-return controls. The two
special line-feed controls which are not \n do not take care NL-mode so
they must be handled separately.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-05 15:51:10 +01:00
David Herrmann
8fa3336a6b vte: add stub CSI parser
The new parser reads CSI parameters correctly and saves them in an array
for later evaluation. We currently do not handle the CSI commands. This
needs to be added now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-01 19:33:38 +01:00
David Herrmann
0e31653eb1 vte: parse basic control codes
This adds a parser for basic control codes but does not implement their
functionality, yet. Only the newline handler is kept.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-01 17:13:22 +01:00
David Herrmann
c4683b34ef vte: first check for special keys then for ucs4 char
We should first check whether we recognize the XK_* identifier before we
rely on the converted UCS4 character.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-01 16:03:54 +01:00
David Herrmann
23b7270790 vte: implement basic key mappings
The system keys are mapped to their ASCII equivalents. We do not support
CR/NL mode nor scroll-lock yet (is this supported by any term?).

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-01 15:59:53 +01:00
David Herrmann
e138e4ada0 vte: handle keyboard "return"/linefeed
This makes the VTE subsystem emulate a linefeed if XK_Return is read
from the keyboard.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-01-29 14:51:35 +01:00
David Herrmann
ff0e91ec45 terminal: use UTF8 state machine
This adds a converter from UTF8 stream to UCS4 data so the VTE subsystem
can handle the input correctly without complicated UTF8 input.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-01-29 14:23:27 +01:00
David Herrmann
79e1ada7e5 vte: handle keyboard input (stub)
Make the vte subsystem handle the keyboard input instead of doing this
inside of test_terminal.

The handling is just a stub function. No actual keys are parsed yet.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-01-28 22:14:20 +01:00
David Herrmann
a7128cc683 Adjust all code to use new kmscon_symbol_t
This is a big performance boost and reduces the code size quite a bit.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-01-01 17:43:57 +01:00
David Herrmann
f60356d429 terminal: add dummy terminal implementation
vte: This adds a dummy VTE subsystem. It will be used to emulate a vt100
terminal based on our console subsystem.

terminal: This ties together several subsystems including the output-, the
console- and the vte-subsystem.

The test_terminal test application can be used to test the terminal. It is
supposed to provide a full vt100 implementation which is displayed on all
available screens.

Most of the functionality here is not implemented yet and only a dummy function.
These will be added in later commits.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-30 18:01:00 +01:00