brlapi_keycodes.h

Go to the documentation of this file.
00001 /*
00002  * libbrlapi - A library providing access to braille terminals for applications.
00003  *
00004  * Copyright (C) 2002-2009 by
00005  *   Samuel Thibault <Samuel.Thibault@ens-lyon.org>
00006  *   Sébastien Hinderer <Sebastien.Hinderer@ens-lyon.org>
00007  *
00008  * libbrlapi comes with ABSOLUTELY NO WARRANTY.
00009  *
00010  * This is free software, placed under the terms of the
00011  * GNU Lesser General Public License, as published by the Free Software
00012  * Foundation; either version 2.1 of the License, or (at your option) any
00013  * later version. Please see the file LICENSE-LGPL for details.
00014  *
00015  * Web Page: http://mielke.cc/brltty/
00016  *
00017  * This software is maintained by Dave Mielke <dave@mielke.cc>.
00018  */
00019 
00023 #ifndef BRLAPI_INCLUDED_KEYCODES
00024 #define BRLAPI_INCLUDED_KEYCODES
00025 
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif /* __cplusplus */
00029 
00072 typedef uint64_t brlapi_keyCode_t;
00073 
00075 #define BRLAPI_PRIxKEYCODE PRIx64
00076 
00077 #define BRLAPI_PRIuKEYCODE PRIu64
00078 
00082 #define BRLAPI_KEY_MAX UINT64_C(0XFFFFFFFFFFFFFFFF)
00083 
00087 #define BRLAPI_KEY_FLAGS_MASK           UINT64_C(0XFFFFFFFF00000000)
00088 
00089 #define BRLAPI_KEY_FLAGS_SHIFT          32
00090 
00091 #define BRLAPI_KEY_FLG(v)               ((brlapi_keyCode_t)(v) << BRLAPI_KEY_FLAGS_SHIFT)
00092 
00094 #define BRLAPI_KEY_FLG_MOD1             BRLAPI_KEY_FLG(0x00000008)
00095 
00096 #define BRLAPI_KEY_FLG_MOD2             BRLAPI_KEY_FLG(0x00000010)
00097 
00098 #define BRLAPI_KEY_FLG_MOD3             BRLAPI_KEY_FLG(0x00000020)
00099 
00100 #define BRLAPI_KEY_FLG_MOD4             BRLAPI_KEY_FLG(0x00000040)
00101 
00102 #define BRLAPI_KEY_FLG_MOD5             BRLAPI_KEY_FLG(0x00000080)
00103 
00104 
00108 #define BRLAPI_KEY_TYPE_MASK            UINT64_C(0X00000000E0000000)
00109 
00110 #define BRLAPI_KEY_TYPE_SHIFT           29
00111 
00112 #define BRLAPI_KEY_TYPE_CMD             UINT64_C(0X0000000020000000)
00113 
00114 #define BRLAPI_KEY_TYPE_SYM             UINT64_C(0X0000000000000000)
00115 
00119 #define BRLAPI_KEY_CODE_MASK            UINT64_C(0X000000001FFFFFFF)
00120 
00121 #define BRLAPI_KEY_CODE_SHIFT           0
00122 
00124 #define BRLAPI_KEY_CMD_BLK_MASK         UINT64_C(0X1FFF0000)
00125 
00126 #define BRLAPI_KEY_CMD_BLK_SHIFT        16
00127 
00128 #define BRLAPI_KEY_CMD_ARG_MASK         UINT64_C(0X0000FFFF)
00129 
00130 #define BRLAPI_KEY_CMD_ARG_SHIFT        0
00131 #define BRLAPI_KEY_CMD(v)               ((v) << BRLAPI_KEY_CMD_BLK_SHIFT)
00132 
00134 #define BRLAPI_KEY_SYM_BACKSPACE        UINT64_C(0X0000FF08)
00135 #define BRLAPI_KEY_SYM_TAB              UINT64_C(0X0000FF09)
00136 #define BRLAPI_KEY_SYM_LINEFEED         UINT64_C(0X0000FF0D)
00137 #define BRLAPI_KEY_SYM_ESCAPE           UINT64_C(0X0000FF1B)
00138 #define BRLAPI_KEY_SYM_HOME             UINT64_C(0X0000FF50)
00139 #define BRLAPI_KEY_SYM_LEFT             UINT64_C(0X0000FF51)
00140 #define BRLAPI_KEY_SYM_UP               UINT64_C(0X0000FF52)
00141 #define BRLAPI_KEY_SYM_RIGHT            UINT64_C(0X0000FF53)
00142 #define BRLAPI_KEY_SYM_DOWN             UINT64_C(0X0000FF54)
00143 #define BRLAPI_KEY_SYM_PAGE_UP          UINT64_C(0X0000FF55)
00144 #define BRLAPI_KEY_SYM_PAGE_DOWN        UINT64_C(0X0000FF56)
00145 #define BRLAPI_KEY_SYM_END              UINT64_C(0X0000FF57)
00146 #define BRLAPI_KEY_SYM_INSERT           UINT64_C(0X0000FF63)
00147 #define BRLAPI_KEY_SYM_FUNCTION         UINT64_C(0X0000FFBE)
00148 #define BRLAPI_KEY_SYM_DELETE           UINT64_C(0X0000FFFF)
00149 #define BRLAPI_KEY_SYM_UNICODE          UINT64_C(0X01000000)
00150 
00153 #include "brlapi_constants.h"
00154 
00155 #ifdef __cplusplus
00156 }
00157 #endif /* __cplusplus */
00158 
00159 #endif /* BRLAPI_INCLUDED_KEYCODES */

Generated on Mon Jan 26 22:34:18 2009 for BrlAPI by  doxygen 1.5.5