📄 kbd.h
字号:
/*
* Characters
*/
PVK_TO_WCHAR_TABLE pVkToWcharTable; // ptr to tbl of ptrs to tbl
/*
* Diacritics
*/
PDEADKEY pDeadKey;
/*
* Names of Keys
*/
PVSC_LPWSTR pKeyNames;
PVSC_LPWSTR pKeyNamesExt;
WCHAR *KBD_LONG_POINTER *KBD_LONG_POINTER pKeyNamesDead;
/*
* Scan codes to Virtual Keys
*/
USHORT *KBD_LONG_POINTER pusVSCtoVK;
BYTE bMaxVSCtoVK;
PVSC_VK pVSCtoVK_E0; // Scancode has E0 prefix
PVSC_VK pVSCtoVK_E1; // Scancode has E1 prefix
/*
* Locale-specific special processing
*/
DWORD fLocaleFlags;
/*
* Ligatures
*/
BYTE nLgMax;
BYTE cbLgEntry;
PLIGATURE1 pLigature;
/*
* Type and subtype. These are optional.
*/
DWORD dwType; // Keyboard Type
DWORD dwSubType; // Keyboard SubType: may contain OemId
} KBDTABLES, *KBD_LONG_POINTER PKBDTABLES;
/*
* FarEast-specific special...
*/
typedef struct _VK_FUNCTION_PARAM {
BYTE NLSFEProcIndex;
ULONG NLSFEProcParam;
} VK_FPARAM, *KBD_LONG_POINTER PVK_FPARAM;
typedef struct _VK_TO_FUNCTION_TABLE {
BYTE Vk;
BYTE NLSFEProcType;
BYTE NLSFEProcCurrent;
// Index[0] : Base
// Index[1] : Shift
// Index[2] : Control
// Index[3] : Shift+Control
// Index[4] : Alt
// Index[5] : Shift+Alt
// Index[6] : Control+Alt
// Index[7] : Shift+Control+Alt
BYTE NLSFEProcSwitch; // 8 bits
VK_FPARAM NLSFEProc[8];
VK_FPARAM NLSFEProcAlt[8];
} VK_F, *KBD_LONG_POINTER PVK_F;
typedef struct tagKbdNlsLayer {
USHORT OEMIdentifier;
USHORT LayoutInformation;
UINT NumOfVkToF;
PVK_F pVkToF;
//
// The pusMouseVKey array provides a translation from the virtual key
// value to an index. The index is used to select the appropriate
// routine to process the virtual key, as well as to select extra
// information that is used by this routine during its processing.
// If this value is NULL, following default will be used.
//
// ausMouseVKey[] = {
// VK_CLEAR, // Numpad 5: Click active button
// VK_PRIOR, // Numpad 9: Up & Right
// VK_NEXT, // Numpad 3: Down & Right
// VK_END, // Numpad 1: Down & Left
// VK_HOME, // Numpad 7: Up & Left
// VK_LEFT, // Numpad 4: Left
// VK_UP, // Numpad 8: Up
// VK_RIGHT, // Numpad 6: Right
// VK_DOWN, // Numpad 2: Down
// VK_INSERT, // Numpad 0: Active button down
// VK_DELETE, // Numpad .: Active button up
// VK_MULTIPLY, // Numpad *: Select both buttons
// VK_ADD, // Numpad +: Double click active button
// VK_SUBTRACT, // Numpad -: Select right button
// VK_DEVIDE|KBDEXT, // Numpad /: Select left button
// VK_NUMLOCK|KBDEXT}; // Num Lock
//
INT NumOfMouseVKey;
USHORT *KBD_LONG_POINTER pusMouseVKey;
} KBDNLSTABLES, *KBD_LONG_POINTER PKBDNLSTABLES;
/*
* The maximum number of layout tables in a DLL
*/
#define KBDTABLE_MULTI_MAX (8)
/*
* Multiple keyboard layout table in a DLL
*/
typedef struct tagKBDTABLE_DESC {
WCHAR wszDllName[32];
DWORD dwType; // Keyboard type ID
DWORD dwSubType; // Combined SubType ID (OEMID : SubType)
} KBDTABLE_DESC, *KBD_LONG_POINTER PKBDTABLE_DESC;
typedef struct tagKBDTABLE_MULTI {
UINT nTables;
KBDTABLE_DESC aKbdTables[KBDTABLE_MULTI_MAX];
} KBDTABLE_MULTI, *KBD_LONG_POINTER PKBDTABLE_MULTI;
/*
* Format of the registry value for the Dynamic Layout Switching
*/
typedef struct tagKBD_TYPE_INFO {
DWORD dwVersion;
DWORD dwType;
DWORD dwSubType;
} KBD_TYPE_INFO, *PKBD_TYPE_INFO;
//
// Keyboard type
//
#define KEYBOARD_TYPE_GENERIC_101 (4)
//
// Keyboard Type = 7 : Japanese Keyboard
// Keyboard Type = 8 : Korean Keyboard
//
#define KEYBOARD_TYPE_JAPAN (7)
#define KEYBOARD_TYPE_KOREA (8)
// Unknown keyboard type
#define KEYBOARD_TYPE_UNKNOWN (0x51)
//
// OEM Ids - KBDNLSTABLES.OEMIdentifier
//
// PSS ID Number: Q130054
// Article last modified on 05-16-1995
//
// 3.10 1.20 | 3.50 1.20
// WINDOWS | WINDOWS NT
//
// ---------------------------------------------------------------------
// The information in this article applies to:
// - Microsoft Windows Software Development Kit (SDK) for Windows
// version 3.1
// - Microsoft Win32 Software Development Kit (SDK) version 3.5
// - Microsoft Win32s version 1.2
// ---------------------------------------------------------------------
// SUMMARY
// =======
// Because of the variety of computer manufacturers (NEC, Fujitsu, IBMJ, and
// so on) in Japan, sometimes Windows-based applications need to know which
// OEM (original equipment manufacturer) manufactured the computer that is
// running the application. This article explains how.
//
// MORE INFORMATION
// ================
// There is no documented way to detect the manufacturer of the computer that
// is currently running an application. However, a Windows-based application
// can detect the type of OEM Windows by using the return value of the
// GetKeyboardType() function.
//
// If an application uses the GetKeyboardType API, it can get OEM ID by
// specifying "1" (keyboard subtype) as argument of the function. Each OEM ID
// is listed here:
//
// OEM Windows OEM ID
// ------------------------------
// Microsoft 00H (DOS/V)
// all AX 01H
// EPSON 04H
// Fujitsu 05H
// IBMJ 07H
// Matsushita 0AH
// NEC 0DH
// Toshiba 12H
//
// Application programs can use these OEM IDs to distinguish the type of OEM
// Windows. Note, however, that this method is not documented, so Microsoft
// may not support it in the future version of Windows.
//
// As a rule, application developers should write hardware-independent code,
// especially when making Windows-based applications. If they need to make a
// hardware-dependent application, they must prepare the separated program
// file for each different hardware architecture.
//
// Additional reference words: 3.10 1.20 3.50 1.20 kbinf
// KBCategory: kbhw
// KBSubcategory: wintldev
// =============================================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
//
#define NLSKBD_OEM_MICROSOFT 0x00
#define NLSKBD_OEM_AX 0x01
#define NLSKBD_OEM_EPSON 0x04
#define NLSKBD_OEM_FUJITSU 0x05
#define NLSKBD_OEM_IBM 0x07
#define NLSKBD_OEM_MATSUSHITA 0x0A
#define NLSKBD_OEM_NEC 0x0D
#define NLSKBD_OEM_TOSHIBA 0x12
#define NLSKBD_OEM_DEC 0x18 // only NT
//
// Microsoft (default) - keyboards hardware/layout
//
#define MICROSOFT_KBD_101_TYPE 0
#define MICROSOFT_KBD_AX_TYPE 1
#define MICROSOFT_KBD_106_TYPE 2
#define MICROSOFT_KBD_002_TYPE 3
#define MICROSOFT_KBD_001_TYPE 4
#define MICROSOFT_KBD_FUNC 12
//
// AX consortium - keyboards hardware/layout
//
#define AX_KBD_DESKTOP_TYPE 1
//
// Fujitsu - keyboards hardware/layout
//
#define FMR_KBD_JIS_TYPE 0
#define FMR_KBD_OASYS_TYPE 1
#define FMV_KBD_OASYS_TYPE 2
//
// NEC - keyboards hardware/layout
//
#define NEC_KBD_NORMAL_TYPE 1
#define NEC_KBD_N_MODE_TYPE 2
#define NEC_KBD_H_MODE_TYPE 3
#define NEC_KBD_LAPTOP_TYPE 4
#define NEC_KBD_106_TYPE 5
//
// Toshiba - keyboards hardware/layout
//
#define TOSHIBA_KBD_DESKTOP_TYPE 13
#define TOSHIBA_KBD_LAPTOP_TYPE 15
//
// DEC - keyboards hardware/layout
//
#define DEC_KBD_ANSI_LAYOUT_TYPE 1 // only NT
#define DEC_KBD_JIS_LAYOUT_TYPE 2 // only NT
//
// Korean keyboard subtype
//
#define MICROSOFT_KBD_101A_TYPE MICROSOFT_KBD_101_TYPE
#define MICROSOFT_KBD_101B_TYPE 4
#define MICROSOFT_KBD_101C_TYPE 5
#define MICROSOFT_KBD_103_TYPE 6
//
// Keyboard layout information - KBDNLSTABLE.LayoutInformation
//
//
// If this flag is on, System sends notification to keyboard
// drivers (leyout/kernel mode). when IME (Input-Mehod-Editor)
// status become changed.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -