@@ -52,9 +52,14 @@ data Input = Input
52 -- 'nextEvent' this will not refresh the display if the next event
52 -- 'nextEvent' this will not refresh the display if the next event
53 -- is an 'EvResize'.
53 -- is an 'EvResize'.
54 _eventChannel :: TChan Event
54 _eventChannel :: TChan Event
55− -- | Shuts down the input processing. This should return the
55+ -- | Shuts down the input processing. As part of shutting down the
56− -- terminal input state to before he input initialized.
56+ -- input, this should also restore the input state.
57 , shutdownInput :: IO ()
57 , shutdownInput :: IO ()
58+ -- | Restore the terminal's input state to what it was prior
59+ -- to configuring input for Vty. This should be done as part of
60+ -- 'shutdownInput' but is exposed in case you need to access it
62+ , restoreInputState :: IO ()
58 -- | Changes to this value are reflected after the next event.
63 -- | Changes to this value are reflected after the next event.
59 , _configRef :: IORef Config
64 , _configRef :: IORef Config
60 -- | input debug log
65 -- | input debug log
@@ -235,6 +240,7 @@ initInput config classifyTable = do
235 applyConfig fd config
240 applyConfig fd config
236 stopSync <- newEmptyMVar
241 stopSync <- newEmptyMVar
237 input <- Input <$> atomically newTChan
242 input <- Input <$> atomically newTChan
243+ <*> pure (return ())
238 <*> pure (return ())
244 <*> pure (return ())
239 <*> newIORef config
245 <*> newIORef config
240 <*> maybe (return Nothing)
246 <*> maybe (return Nothing)