about summary refs log tree commit diff stats
path: root/src/teliva.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-02-01 21:19:51 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-02-01 21:19:51 -0800
commit664b94f414da6dbdf6c956f5378f0094eadb8444 (patch)
tree3ac0b2332376b37de47df7969cf4f142e4683fa9 /src/teliva.c
parent7968134246b203fcef53794155ac5333b826fc60 (diff)
downloadteliva-664b94f414da6dbdf6c956f5378f0094eadb8444.tar.gz
include keys typed into audit log
This will help people cross-correlate when the app performs specific
calls.
Diffstat (limited to 'src/teliva.c')
-rw-r--r--src/teliva.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/teliva.c b/src/teliva.c
index 5726428..9bd2f67 100644
--- a/src/teliva.c
+++ b/src/teliva.c
@@ -102,6 +102,13 @@ static void draw_menu(lua_State* L) {
   attrset(A_NORMAL);
 }
 
+const char* character_name(char c) {
+  if (c == '\n') return "ENTER";
+  if (c == '\t') return "TAB";
+  if (c == ' ') return "SPACE";
+  return "UNKNOWN";
+}
+
 static void render_permissions(lua_State* L) {
   attrset(A_NORMAL);
   mvaddstr(LINES-1, COLS-12, "");