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-2007 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,
00013  * or (at your option) any later version.
00014  * Please see the file COPYING-API for details.
00015  *
00016  * Web Page: http://mielke.cc/brltty/
00017  *
00018  * This software is maintained by Dave Mielke <dave@mielke.cc>.
00019  */
00020 
00024 #ifndef BRLAPI_INCLUDED_KEYCODES
00025 #define BRLAPI_INCLUDED_KEYCODES
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif /* __cplusplus */
00030 
00073 typedef uint64_t brlapi_keyCode_t;
00074 
00076 #define BRLAPI_PRIxKEYCODE PRIx64
00077 
00078 #define BRLAPI_PRIuKEYCODE PRIu64
00079 
00083 #define BRLAPI_KEY_MAX UINT64_C(0XFFFFFFFFFFFFFFFF)
00084 
00088 #define BRLAPI_KEY_FLAGS_MASK           UINT64_C(0XFFFFFFFF00000000)
00089 
00090 #define BRLAPI_KEY_FLAGS_SHIFT          32
00091 
00092 #define BRLAPI_KEY_FLG(v)               ((brlapi_keyCode_t)(v) << BRLAPI_KEY_FLAGS_SHIFT)
00093 
00095 #define BRLAPI_KEY_FLG_MOD1             BRLAPI_KEY_FLG(0x00000008)
00096 
00097 #define BRLAPI_KEY_FLG_MOD2             BRLAPI_KEY_FLG(0x00000010)
00098 
00099 #define BRLAPI_KEY_FLG_MOD3             BRLAPI_KEY_FLG(0x00000020)
00100 
00101 #define BRLAPI_KEY_FLG_MOD4             BRLAPI_KEY_FLG(0x00000040)
00102 
00103 #define BRLAPI_KEY_FLG_MOD5             BRLAPI_KEY_FLG(0x00000080)
00104 
00105 
00109 #define BRLAPI_KEY_TYPE_MASK            UINT64_C(0X00000000E0000000)
00110 
00111 #define BRLAPI_KEY_TYPE_SHIFT           29
00112 
00113 #define BRLAPI_KEY_TYPE_CMD             UINT64_C(0X0000000020000000)
00114 
00115 #define BRLAPI_KEY_TYPE_SYM             UINT64_C(0X0000000000000000)
00116 
00120 #define BRLAPI_KEY_CODE_MASK            UINT64_C(0X000000001FFFFFFF)
00121 
00122 #define BRLAPI_KEY_CODE_SHIFT           0
00123 
00125 #define BRLAPI_KEY_CMD_BLK_MASK         UINT64_C(0X1FFF0000)
00126 
00127 #define BRLAPI_KEY_CMD_BLK_SHIFT        16
00128 
00129 #define BRLAPI_KEY_CMD_ARG_MASK         UINT64_C(0X0000FFFF)
00130 
00131 #define BRLAPI_KEY_CMD_ARG_SHIFT        0
00132 #define BRLAPI_KEY_CMD(v)               ((v) << BRLAPI_KEY_CMD_BLK_SHIFT)
00133 
00135 #define BRLAPI_KEY_SYM_BACKSPACE        UINT64_C(0X0000FF08)
00136 #define BRLAPI_KEY_SYM_TAB              UINT64_C(0X0000FF09)
00137 #define BRLAPI_KEY_SYM_LINEFEED         UINT64_C(0X0000FF0D)
00138 #define BRLAPI_KEY_SYM_ESCAPE           UINT64_C(0X0000FF1B)
00139 #define BRLAPI_KEY_SYM_HOME             UINT64_C(0X0000FF50)
00140 #define BRLAPI_KEY_SYM_LEFT             UINT64_C(0X0000FF51)
00141 #define BRLAPI_KEY_SYM_UP               UINT64_C(0X0000FF52)
00142 #define BRLAPI_KEY_SYM_RIGHT            UINT64_C(0X0000FF53)
00143 #define BRLAPI_KEY_SYM_DOWN             UINT64_C(0X0000FF54)
00144 #define BRLAPI_KEY_SYM_PAGE_UP          UINT64_C(0X0000FF55)
00145 #define BRLAPI_KEY_SYM_PAGE_DOWN        UINT64_C(0X0000FF56)
00146 #define BRLAPI_KEY_SYM_END              UINT64_C(0X0000FF57)
00147 #define BRLAPI_KEY_SYM_INSERT           UINT64_C(0X0000FF63)
00148 #define BRLAPI_KEY_SYM_FUNCTION         UINT64_C(0X0000FFBE)
00149 #define BRLAPI_KEY_SYM_DELETE           UINT64_C(0X0000FFFF)
00150 #define BRLAPI_KEY_SYM_UNICODE          UINT64_C(0X01000000)
00151 
00154 #include "brlapi_constants.h"
00155 
00156 #ifdef __cplusplus
00157 }
00158 #endif /* __cplusplus */
00159 
00160 #endif /* BRLAPI_INCLUDED_KEYCODES */

Generated on Wed Oct 17 11:27:42 2007 for BrlAPI by  doxygen 1.5.1