aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-23 12:12:20 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-23 12:12:20 +0000
commit35e5fa1f760142daf03ba8c840da0124802b95c4 (patch)
treef12196e856e291854deac759d4f892cd78339579 /terminal.h
parentcsi: implement 'CSI H' (set cursor position) (diff)
vt: implement DECCKM (cursor key sends either SS3 or CSI escapes)
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/terminal.h b/terminal.h
index fa6623ef..002739f1 100644
--- a/terminal.h
+++ b/terminal.h
@@ -68,16 +68,20 @@ struct grid {
tll(struct damage) damage;
};
+struct vt_subparams {
+ unsigned value[16];
+ size_t idx;
+};
+
+struct vt_param {
+ unsigned value;
+ struct vt_subparams sub;
+};
+
struct vt {
int state; /* enum state */
struct {
- struct {
- unsigned value;
- struct {
- unsigned value[16];
- size_t idx;
- } sub;
- } v[16];
+ struct vt_param v[16];
size_t idx;
} params;
struct {
@@ -116,9 +120,14 @@ struct kbd {
} repeat;
};
+enum decckm { DECCKM_CSI, DECCKM_SS3 };
+enum keypad_mode { KEYPAD_NUMERICAL, KEYPAD_APPLICATION };
+
struct terminal {
pid_t slave;
int ptmx;
+ enum decckm decckm;
+ enum keypad_mode keypad_mode;
bool bracketed_paste;
struct vt vt;
struct grid grid;