Merge branch 'master' of github.com:coreyoconnor/vty
commit562cc50f13dc4704e0e24ba84f7bfe2efc9d195b
authorCorey O'Connor <coreyoconnor@gmail.com>
dateFri 25 Oct 2013, 18:30 (13 years ago)
parentce5b5f4ffe6de2
src/Graphics/Vty/Input/Terminfo.hsnew file+10
@@ -0,0 +1,10 @@
1+module Graphics.Vty.Input.Terminfo where
2+
3+import Graphics.Vty.Input.Data
4+import Graphics.Vty.Input.Internal
5+
6+import System.Console.Terminfo
7+
8+caps_classify_table :: Terminal -> [(String,Event)] -> [(String,Event)]
9+caps_classify_table terminal table = [(x,y) | (Just x,y) <- map extract_cap table]
10+ where extract_cap = first (getCapability terminal . tiGetStr)