X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/blobdiff_plain/d277f40b53e43bc4f40e1cc734bb0ef57a846974..db35c5f457c413bd50cd79b0170cb295abb614d2:/fth/termio.fth diff --git a/fth/termio.fth b/fth/termio.fth index ab8cc17..fa9682e 100644 --- a/fth/termio.fth +++ b/fth/termio.fth @@ -21,7 +21,18 @@ $ 01 constant ASCII_CTRL_A $ 05 constant ASCII_CTRL_E $ 18 constant ASCII_CTRL_X -\ ANSI Terminal Control +\ ANSI arrow key sequences +\ ESC [ 0x41 is UP +\ ESC [ 0x42 is DOWN +\ ESC [ 0x43 is RIGHT +\ ESC [ 0x44 is LEFT + +\ ANSI terminal control +\ ESC [ 2J is clear screen +\ ESC [ {n} D is move left +\ ESC [ {n} C is move right +\ ESC [ K is erase to end of line + : ESC[ ( send ESCAPE and [ ) ASCII_ESCAPE emit ascii [ emit @@ -52,7 +63,6 @@ $ 18 constant ASCII_CTRL_X ascii K emit ; - : BELL ( -- , ring the terminal bell ) 7 emit ;