summaryrefslogtreecommitdiffstats
path: root/defaultGetCommand.hs
diff options
context:
space:
mode:
Diffstat (limited to 'defaultGetCommand.hs')
-rw-r--r--defaultGetCommand.hs33
1 files changed, 0 insertions, 33 deletions
diff --git a/defaultGetCommand.hs b/defaultGetCommand.hs
deleted file mode 100644
index b82f2ce..0000000
--- a/defaultGetCommand.hs
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-defaultGetCommand :: IO Command
-defaultGetCommand = do
- c1 <- getChar
- case c1 of
- '\x1b' -> do
- c2 <- getChar
- case c2 of
- '[' -> do
- c3 <- getChar
- case c3 of
- 'C' -> return MoveCursorRight
- 'D' -> return MoveCursorLeft
- '3' -> do
- c4 <- getChar
- case c4 of
- '~' -> return KillNextChar
- _ -> return $ AlertBadInput (c1:c2:c3:c4:[])
- _ -> return $ AlertBadInput (c1:c2:c3:[])
- _ -> return $ AlertBadInput (c1:c2:[])
- _ ->
- if isPrint c1
- then return $ InsertChar c1
- else
- case ord c1 of
- 22 -> return InsertNextCharVerbatim
- 23 -> return KillLastWord
- 10 -> return ExecuteInputBuffer
- 127 -> return KillLastChar
- _ -> return $ AlertBadInput (c1:[])