ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ntddkbd.h
Go to the documentation of this file.
00001 /*
00002  * ntddkbd.h
00003  *
00004  * Keyboard IOCTL interface
00005  *
00006  * This file is part of the w32api package.
00007  *
00008  * Contributors:
00009  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
00010  *
00011  * THIS SOFTWARE IS NOT COPYRIGHTED
00012  *
00013  * This source code is offered for use in the public domain. You may
00014  * use, modify or distribute it freely.
00015  *
00016  * This code is distributed in the hope that it will be useful but
00017  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00018  * DISCLAIMED. This includes but is not limited to warranties of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020  *
00021  */
00022 
00023 #pragma once
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 #define DD_KEYBOARD_DEVICE_NAME           "\\Device\\KeyboardClass"
00030 #define DD_KEYBOARD_DEVICE_NAME_U         L"\\Device\\KeyboardClass"
00031 
00032 #define IOCTL_KEYBOARD_QUERY_ATTRIBUTES \
00033   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
00034 
00035 #define IOCTL_KEYBOARD_QUERY_INDICATORS \
00036   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
00037 
00038 #define IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION \
00039   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0020, METHOD_BUFFERED, FILE_ANY_ACCESS)
00040 
00041 #define IOCTL_KEYBOARD_QUERY_TYPEMATIC \
00042   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
00043 
00044 #define IOCTL_KEYBOARD_SET_TYPEMATIC \
00045   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0001, METHOD_BUFFERED, FILE_ANY_ACCESS)
00046 
00047 #define IOCTL_KEYBOARD_SET_INDICATORS \
00048   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0002, METHOD_BUFFERED, FILE_ANY_ACCESS)
00049 
00050 #define IOCTL_KEYBOARD_INSERT_DATA \
00051   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0040, METHOD_BUFFERED, FILE_ANY_ACCESS)
00052 
00053 #define IOCTL_KEYBOARD_QUERY_IME_STATUS \
00054   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0400, METHOD_BUFFERED, FILE_ANY_ACCESS)
00055 
00056 #define IOCTL_KEYBOARD_SET_IME_STATUS \
00057   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0401, METHOD_BUFFERED, FILE_ANY_ACCESS)
00058 
00059 DEFINE_GUID(GUID_DEVINTERFACE_KEYBOARD, \
00060   0x884b96c3, 0x56ef, 0x11d1, 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd);
00061 
00062 #define GUID_CLASS_KEYBOARD GUID_DEVINTERFACE_KEYBOARD /* Obsolete */
00063 
00064 #define KEYBOARD_ERROR_VALUE_BASE         10000
00065 
00066 /* KEYBOARD_INPUT_DATA.MakeCode constants */
00067 #define KEYBOARD_OVERRUN_MAKE_CODE     0xFF
00068 
00069 /* KEYBOARD_INPUT_DATA.Flags constants */
00070 #define KEY_MAKE                       0
00071 #define KEY_BREAK                      1
00072 #define KEY_E0                         2
00073 #define KEY_E1                         4
00074 #define KEY_TERMSRV_SET_LED            8
00075 #define KEY_TERMSRV_SHADOW             0x10
00076 #define KEY_TERMSRV_VKPACKET           0x20
00077 
00078 #define KEYBOARD_LED_INJECTED     0x8000
00079 #define KEYBOARD_SHADOW           0x4000
00080 #define KEYBOARD_KANA_LOCK_ON     8
00081 #define KEYBOARD_CAPS_LOCK_ON     4
00082 #define KEYBOARD_NUM_LOCK_ON      2
00083 #define KEYBOARD_SCROLL_LOCK_ON   1
00084 
00085 typedef struct _KEYBOARD_INPUT_DATA {
00086   USHORT UnitId;
00087   USHORT MakeCode;
00088   USHORT Flags;
00089   USHORT Reserved;
00090   ULONG ExtraInformation;
00091 } KEYBOARD_INPUT_DATA, *PKEYBOARD_INPUT_DATA;
00092 
00093 
00094 typedef struct _KEYBOARD_TYPEMATIC_PARAMETERS {
00095   USHORT UnitId;
00096   USHORT Rate;
00097   USHORT Delay;
00098 } KEYBOARD_TYPEMATIC_PARAMETERS, *PKEYBOARD_TYPEMATIC_PARAMETERS;
00099 
00100 typedef struct _KEYBOARD_ID {
00101   UCHAR Type;
00102   UCHAR Subtype;
00103 } KEYBOARD_ID, *PKEYBOARD_ID;
00104 
00105 #define ENHANCED_KEYBOARD(Id) ((Id).Type == 2 || (Id).Type == 4 || FAREAST_KEYBOARD(Id))
00106 #define FAREAST_KEYBOARD(Id) ((Id).Type == 7 || (Id).Type == 8)
00107 
00108 typedef struct _KEYBOARD_INDICATOR_PARAMETERS {
00109   USHORT UnitId;
00110   USHORT LedFlags;
00111 } KEYBOARD_INDICATOR_PARAMETERS, *PKEYBOARD_INDICATOR_PARAMETERS;
00112 
00113 typedef struct _INDICATOR_LIST {
00114   USHORT MakeCode;
00115   USHORT IndicatorFlags;
00116 } INDICATOR_LIST, *PINDICATOR_LIST;
00117 
00118 typedef struct _KEYBOARD_INDICATOR_TRANSLATION {
00119   USHORT NumberOfIndicatorKeys;
00120   INDICATOR_LIST IndicatorList[1];
00121 } KEYBOARD_INDICATOR_TRANSLATION, *PKEYBOARD_INDICATOR_TRANSLATION;
00122 
00123 typedef struct _KEYBOARD_ATTRIBUTES {
00124   KEYBOARD_ID KeyboardIdentifier;
00125   USHORT KeyboardMode;
00126   USHORT NumberOfFunctionKeys;
00127   USHORT NumberOfIndicators;
00128   USHORT NumberOfKeysTotal;
00129   ULONG InputDataQueueLength;
00130   KEYBOARD_TYPEMATIC_PARAMETERS KeyRepeatMinimum;
00131   KEYBOARD_TYPEMATIC_PARAMETERS KeyRepeatMaximum;
00132 } KEYBOARD_ATTRIBUTES, *PKEYBOARD_ATTRIBUTES;
00133 
00134 typedef struct _KEYBOARD_UNIT_ID_PARAMETER {
00135   USHORT UnitId;
00136 } KEYBOARD_UNIT_ID_PARAMETER, *PKEYBOARD_UNIT_ID_PARAMETER;
00137 
00138 typedef struct _KEYBOARD_IME_STATUS {
00139   USHORT UnitId;
00140   ULONG ImeOpen;
00141   ULONG ImeConvMode;
00142 } KEYBOARD_IME_STATUS, *PKEYBOARD_IME_STATUS;
00143 
00144 #ifdef __cplusplus
00145 }
00146 #endif

Generated on Sat May 26 2012 04:30:51 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.