Added support for DECCKM (Cursor Keys Mode).

This fixes arrow keys when using Mosh - which doesn't work properly with just keypad application mode. This should also fix issue #264.