# 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-2012 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
    00090 typedef uint64_t brlapi_keyCode_t;
    00091
    00093 #define BRLAPI_PRIxKEYCODE PRIx64
    00094
    00095 #define BRLAPI_PRIuKEYCODE PRIu64
    00096
    00100 #define BRLAPI_KEY_MAX UINT64_C(0XFFFFFFFFFFFFFFFF)
    00101
    00105 #define BRLAPI_KEY_FLAGS_MASK           UINT64_C(0XFFFFFFFF00000000)
    00106
    00107 #define BRLAPI_KEY_FLAGS_SHIFT          32
    00108
    00109 #define BRLAPI_KEY_FLG(v)               ((brlapi_keyCode_t)(v) << BRLAPI_KEY_FLAGS_SHIFT)
    00110
    00112 #define BRLAPI_KEY_FLG_MOD1             BRLAPI_KEY_FLG(0x00000008)
    00113
    00114 #define BRLAPI_KEY_FLG_MOD2             BRLAPI_KEY_FLG(0x00000010)
    00115
    00116 #define BRLAPI_KEY_FLG_MOD3             BRLAPI_KEY_FLG(0x00000020)
    00117
    00118 #define BRLAPI_KEY_FLG_MOD4             BRLAPI_KEY_FLG(0x00000040)
    00119
    00120 #define BRLAPI_KEY_FLG_MOD5             BRLAPI_KEY_FLG(0x00000080)
    00121
    00122
    00126 #define BRLAPI_KEY_TYPE_MASK            UINT64_C(0X00000000E0000000)
    00127
    00128 #define BRLAPI_KEY_TYPE_SHIFT           29
    00129
    00130 #define BRLAPI_KEY_TYPE_CMD             UINT64_C(0X0000000020000000)
    00131
    00132 #define BRLAPI_KEY_TYPE_SYM             UINT64_C(0X0000000000000000)
    00133
    00137 #define BRLAPI_KEY_CODE_MASK            UINT64_C(0X000000001FFFFFFF)
    00138
    00139 #define BRLAPI_KEY_CODE_SHIFT           0
    00140
    00142 #define BRLAPI_KEY_CMD_BLK_MASK         UINT64_C(0X1FFF0000)
    00143
    00144 #define BRLAPI_KEY_CMD_BLK_SHIFT        16
    00145
    00146 #define BRLAPI_KEY_CMD_ARG_MASK         UINT64_C(0X0000FFFF)
    00147
    00148 #define BRLAPI_KEY_CMD_ARG_SHIFT        0
    00149 #define BRLAPI_KEY_CMD(v)               ((v) << BRLAPI_KEY_CMD_BLK_SHIFT)
    00150
    00152 #define BRLAPI_KEY_SYM_BACKSPACE        UINT64_C(0X0000FF08)
    00153 #define BRLAPI_KEY_SYM_TAB              UINT64_C(0X0000FF09)
    00154 #define BRLAPI_KEY_SYM_LINEFEED         UINT64_C(0X0000FF0D)
    00155 #define BRLAPI_KEY_SYM_ESCAPE           UINT64_C(0X0000FF1B)
    00156 #define BRLAPI_KEY_SYM_HOME             UINT64_C(0X0000FF50)
    00157 #define BRLAPI_KEY_SYM_LEFT             UINT64_C(0X0000FF51)
    00158 #define BRLAPI_KEY_SYM_UP               UINT64_C(0X0000FF52)
    00159 #define BRLAPI_KEY_SYM_RIGHT            UINT64_C(0X0000FF53)
    00160 #define BRLAPI_KEY_SYM_DOWN             UINT64_C(0X0000FF54)
    00161 #define BRLAPI_KEY_SYM_PAGE_UP          UINT64_C(0X0000FF55)
    00162 #define BRLAPI_KEY_SYM_PAGE_DOWN        UINT64_C(0X0000FF56)
    00163 #define BRLAPI_KEY_SYM_END              UINT64_C(0X0000FF57)
    00164 #define BRLAPI_KEY_SYM_INSERT           UINT64_C(0X0000FF63)
    00165 #define BRLAPI_KEY_SYM_FUNCTION         UINT64_C(0X0000FFBE)
    00166 #define BRLAPI_KEY_SYM_DELETE           UINT64_C(0X0000FFFF)
    00167 #define BRLAPI_KEY_SYM_UNICODE          UINT64_C(0X01000000)
    00168
    00171 #include "brlapi_constants.h"
    00172
    00173 #ifdef __cplusplus
    00174 }
    00175 #endif /* __cplusplus */
    00176
    00177 #endif /* BRLAPI_INCLUDED_KEYCODES */