Terminal key input library
Go to file
Přemysl Eric Janouch e330d751a4 Make mode 1015 and 1006 work, prepare for 1005 2014-10-13 23:39:15 +02:00
tests CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
.gitignore CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
CMakeLists.txt CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
LICENSE WIP: Is mine now (^3^) 2014-09-23 03:05:01 +02:00
README CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
config-version.cmake.in CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
config.cmake.in CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
demo-async.c CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
demo-glib.c CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
demo.c CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
driver-csi.c Make mode 1015 and 1006 work, prepare for 1005 2014-10-13 23:39:15 +02:00
driver-ti.c Work on mouse support, it's a mess 2014-10-13 01:03:13 +02:00
termkey2-config.h.in CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
termkey2-internal.h Make mode 1015 and 1006 work, prepare for 1005 2014-10-13 23:39:15 +02:00
termkey2.c Make mode 1015 and 1006 work, prepare for 1005 2014-10-13 23:39:15 +02:00
termkey2.h Make mode 1015 and 1006 work, prepare for 1005 2014-10-13 23:39:15 +02:00

README

termkey2
========

`termkey2' is a library providing an alternative to ncurses' handling of
terminal input.  ncurses does a really terrible job at that, mainly wrt. mouse
support which seems to be utterly broken.  If you can drag things in a terminal
application, such as in VIM, I can assure you it's not using ncurses for that.

Since terminal I/O is really complicated and full of special cases, this project
doesn't aspire to also replace the output part of ncurses, but is rather
complementary to it.  In the end it makes use of its terminfo library.

The API isn't stable yet.  Tell me what needs to be done so I can fix it first.

Building and Installing
-----------------------
Build dependencies: GCC/Clang, pkg-config, cmake >= 2.8.5
Optional dependencies: Unibilium (alternative for curses), GLib (for the demos)

 $ git clone https://github.com/pjanouch/termkey2.git
 $ mkdir build
 $ cd build
 $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local

To install the library, you can do either the usual:
 $ make install

Or you can try telling CMake to make a package for you.  For Debian it is:
 $ cpack -G DEB
 # dpkg -i termkey2-*.deb

To see the library in action, you can try running the demos, which are
statically linked against the library, and hence they can be run as they are:

 $ make demos

What's Different From the Original termkey?
-------------------------------------------
The main change is throwing away any UTF-8 dependent code, making the library
capable of handling all unibyte and multibyte encodings supported by iconv on
your system.  The characters are still presented as Unicode at the end, however,
as the other sensible option is wchar_t and that doesn't really work well, see
http://gnu.org/software/libunistring/manual/libunistring.html#The-wchar_005ft-mess

Another change worth mentioning is the usage of CMake instead of the problematic
libtool-based Makefile.  Now you can include this project in your other CMake-
-based projects and simply import the target.  No package maintainer action is
needed for you to enjoy the benefits of proper terminal input.

The rest is just me going silly over formatting and various unimportant stuff.
Oh, and I've deleted the manpages.  It needs more Doxygen. :)  TBD

License
-------
`termkey2' is based on the `termkey' library originally written by Paul Evans
<leonerd@leonerd.org.uk>, with additional changes made by Přemysl Janouch
<p.janouch@gmail.com>.

You may use the software under the terms of the MIT license, the text of which
is included within the package, see the file LICENSE.