/**********************                                       Michael Campbell
 * File: KBDIF        *                                          12 Sep 2005
 **********************/

/* Create some general key definitions for common keystrokes referenced     */
/* throughout the VE source                                                 */

#define ESC               0x1b
#define BEL               0x07
#define TAB               0x09
#define CR                0x0d
#define LF                0x0a
#define ENTER             0x0a     /* Linux port: ENTER causes 0x0a         */
#define SPC               0x20
#define NIL_CHR           0x00


/* Define the values received for CTL-x keystrokes                          */

#define CTL_T             0x14     /* Bound to Cursor TopOfPage             */
#define CTL_G             0x07     /* Bound to Cursor MiddleOfPage          */
#define CTL_B             0x02     /* Bound to Cursor BottomOfPage          */

#define CTL_U             0x15     /* Bound to Cursor Up                    */
#define CTL_D             0x04     /* Bound to Cursor Down                  */
#define CTL_L             0x0c     /* Bound to Cursor Left                  */
#define CTL_R             0x12     /* Bound to Cursor Right                 */

#define CTL_N             0x0e     /* Bound to Page Down (Next Page)        */
#define CTL_P             0x10     /* Bound to Page Up (Previous Page)      */

#define CTL_C             0x03     /* Bound to CopyLine                     */
#define CTL_V             0x16     /* Bound to Paste Line                   */
#define CTL_X             0x18     /* Bound to Cut (copy & cut) Line        */

#define CTL_E             0x05     /* Bound to Extended Motion (Qunix HOME) */
#define CTL_H             0x08     /* Bound to Rubout                       */

#define CTL_O             0x0f     /* Bound to Insert-Overwrite             */
#define CTL_Z             0x1a     /* Bound to Undo                         */

/* Define the values received from the extended keyboard keys               */

#define LK_F1                  0x109    /* F1 key    */
#define LK_F2                  0x10a    /* F2 key    */
#define LK_F3                  0x10b    /* F3 key    */
#define LK_F4                  0x10c    /* F4 key    */
#define LK_F5                  0x10d    /* F5 key    */
#define LK_F6                  0x10e    /* F6 key    */
#define LK_F7                  0x10f    /* F7 key    */
#define LK_F8                  0x110    /* F8 key    */
#define LK_F9                  0x111    /* F9 key    */
#define LK_F10                 0x112    /* F10 key   */
#define LK_F11                 0x113    /* F11 key   */
#define LK_F12                 0x114    /* F12 key   */

#define LK_BACKSPACE           0x107    /* Keypad Backspace key            */
#define LK_KEYPAD_INS          0x14b    /* Keypad Insert key               */
#define LK_KEYPAD_DEL          0x14a    /* Keypad Delete key               */
#define LK_KEYPAD_HOME         0x106    /* Keypad Home key - some OS'      */
#define LK_KEYPAD_HOME_2       0x16a    /* Keypad Home key - some OS'      */
#define LK_KEYPAD_END          0x168    /* Keypad End key - some OS'       */
#define LK_KEYPAD_END_2        0x181    /* Keypad End key - some OS'       */
#define LK_KEYPAD_PGUP         0x153    /* Keypad Page Up key              */
#define LK_KEYPAD_PGDN         0x152    /* Keypad Page Down key            */
#define LK_KEYPAD_CURSOR_DOWN  0x102    /* Keypad Cursor Down key          */
#define LK_KEYPAD_CURSOR_UP    0x103    /* Keypad Cursor Up key            */
#define LK_KEYPAD_CURSOR_LEFT  0x104    /* Keypad Cursor Left key          */
#define LK_KEYPAD_CURSOR_RIGHT 0x105    /* Keypad Cursor Right key         */
#define LK_KEYPAD_5            0x15e    /* Keypad 5 key - original HOME fn */

#define LK_KEYPAD_SLASH        0x139    /* Keypad "/" key                  */
#define LK_KEYPAD_STAR         0x145    /* Keypad "*" key                  */
#define LK_KEYPAD_MINUS        0x146    /* Keypad "-" key                  */
#define LK_KEYPAD_PLUS         0x147    /* Keypad "+" key                  */

#define LK_SHFT_CUR_DOWN       0x183    /* SHIFT + Cursor Down             */  /* TOTAL guess */
#define LK_SHFT_CUR_UP         0x186    /* SHIFT + Cursor Up               */  /* TOTAL guess */
#define LK_SHFT_CUR_LEFT       0x189    /* SHIFT + Cursor Left             */
#define LK_SHFT_CUR_RIGHT      0x192    /* SHIFT + Cursor Right            */

#define LK_KEYPAD_PAUSE        0x200    /* Keypad Pause/Break key          */
#define LK_KEYPAD_SHIFT_TAB    0x201    /* Shift of the TAB key            */

