Hello HelenOS community,

I am sending a patch for clearing the screen using Ctrl+L in the bdsh shell.

Thanks,
Ashish
=== modified file 'uspace/lib/clui/tinput.c'
--- uspace/lib/clui/tinput.c	2015-10-20 10:08:15 +0000
+++ uspace/lib/clui/tinput.c	2017-03-30 18:46:12 +0000
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 #include <str.h>
 #include <io/console.h>
+#include <io/con_srv.h>
 #include <io/keycode.h>
 #include <io/style.h>
 #include <io/color.h>
@@ -41,11 +42,13 @@
 #include <assert.h>
 #include <stdbool.h>
 #include <tinput.h>
+#include <task.h>
 
 #define LIN_TO_COL(ti, lpos) ((lpos) % ((ti)->con_cols))
 #define LIN_TO_ROW(ti, lpos) ((lpos) / ((ti)->con_cols))
 #define LIN_POS(ti, col, row) ((col) + (row) * (ti)->con_cols)
 
+
 /** Seek direction */
 typedef enum {
 	seek_backward = -1,
@@ -950,12 +953,20 @@
 		tinput_sel_delete(ti);
 		break;
 	case KC_C:
-		tinput_sel_copy_to_cb(ti);
-		break;
+		printf("\n^C");
+        ti->done = true;
+		ti->exit_clui = true;
+        break;
 	case KC_V:
 		tinput_sel_delete(ti);
 		tinput_paste_from_cb(ti);
 		break;
+    case KC_L:
+        console_flush(ti->console);
+        console_set_style(ti->console, STYLE_NORMAL);
+        console_clear(ti->console);
+        console_cursor_visibility(ti->console, 1);
+        break;
 	case KC_A:
 		tinput_sel_all(ti);
 		break;

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to