📄 process.c
字号:
/*
* This file is part of Saenaru.
*
* Copyright (C) 2003 Hye-Shik Chang. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Perky$
*/
/*++
Copyright (c) 1990-1998 Microsoft Corporation, All Rights Reserved
Module Name:
PROCESS.C
++*/
/**********************************************************************/
/* These tables are for ImeProcessKey(). And IMEProcessKey function */
/* refer this table and deside the VKey is needed for SAENARU or not. */
/* */
/**********************************************************************/
#include "windows.h"
BYTE bNoComp[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 10-1F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 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,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00-0F
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // 00-0F
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -