Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

fekbd.c File Reference

#include "precomp.h"

Go to the source code of this file.

Defines

#define NLS_CLEAR_VK(Vk)   ((Vk) &= (KBDEXT|KBDMULTIVK|KBDSPECIAL|KBDNUMPAD|KBDBREAK))
#define NLS_CLEAR_VK_AND_ATTR(Vk)   ((Vk) &= (KBDEXT|KBDMULTIVK|KBDSPECIAL|KBDNUMPAD))
#define GEN_KANA_AWARE   0x1
#define GEN_VK_END   0x2
#define GEN_VK_HOME   0x4
#define IS_KANA_AWARE()   (fNlsKbdConfiguration & GEN_KANA_AWARE)
#define IS_SEND_VK_END()   (fNlsKbdConfiguration & GEN_VK_END)
#define IS_SEND_VK_HOME()   (fNlsKbdConfiguration & GEN_VK_HOME)
#define NLSKBD_CONFIG_PATH   L"WOW\\keyboard"

Functions

BOOL NlsTestKeyStateToggle (BYTE Vk)
VOID NlsSetKeyStateToggle (BYTE Vk)
VOID NlsClearKeyStateToggle (BYTE Vk)
BYTE NlsGetCurrentInputMode (BYTE *QueryMode)
BOOL NlsNullProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsSendBaseVk (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsSendParamVk (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsLapseProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsAlphanumericModeProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsKatakanaModeProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsHiraganaModeProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsSbcsDbcsToggleProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsRomanToggleProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsCodeInputToggleProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsKanaModeToggleProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsHelpOrEndProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsHomeOrClearProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsNumpadModeProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsKanaEventProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL NlsConvOrNonConvProc (PKE pKe, ULONG_PTR dwExtraInfo, ULONG dwParam)
BOOL GenerateNlsVkKey (PVK_F pVkToF, WORD nMod, PKE pKe, ULONG_PTR dwExtraInfo)
BOOL GenerateNlsVkAltKey (PVK_F pVkToF, WORD nMod, PKE pKe, ULONG_PTR dwExtraInfo)
BOOL KbdNlsFuncTypeDummy (PVK_F pVkToF, PKE pKe, ULONG_PTR dwExtraInfo)
BOOL KbdNlsFuncTypeNormal (PVK_F pVkToF, PKE pKe, ULONG_PTR dwExtraInfo)
BOOL KbdNlsFuncTypeAlt (PVK_F pVkToF, PKE pKe, ULONG_PTR dwExtraInfo)
BOOL xxxKENLSProcs (PKE pKe, ULONG_PTR dwExtraInfo)
VOID NlsKbdSendIMENotification (DWORD dwImeOpen, DWORD dwImeConversion)
VOID NlsKbdSendIMEProc (DWORD dwImeOpen, DWORD dwImeConversion)
VOID NlsKbdInitializePerSystem (VOID)

Variables

BYTE NlsAlphaNumMode [] = {VK_DBE_ALPHANUMERIC,VK_DBE_HIRAGANA,VK_DBE_KATAKANA,0}
BYTE NlsSbcsDbcsMode [] = {VK_DBE_SBCSCHAR,VK_DBE_DBCSCHAR,0}
BYTE NlsRomanMode [] = {VK_DBE_NOROMAN,VK_DBE_ROMAN,0}
BYTE NlsCodeInputMode [] = {VK_DBE_NOCODEINPUT,VK_DBE_CODEINPUT,0}
VK_TO_BIT aVkToBits_NLSKBD []
MODIFIERS Modifiers_NLSKBD
BYTE fNlsKbdConfiguration = GEN_KANA_AWARE | GEN_VK_END | GEN_VK_HOME
NLSKEPROC aNLSKEProc []
NLSVKFPROC aNLSVKFProc []


Define Documentation

#define GEN_KANA_AWARE   0x1
 

Definition at line 63 of file fekbd.c.

Referenced by NlsKbdInitializePerSystem().

#define GEN_VK_END   0x2
 

Definition at line 64 of file fekbd.c.

Referenced by NlsKbdInitializePerSystem().

#define GEN_VK_HOME   0x4
 

Definition at line 65 of file fekbd.c.

Referenced by NlsKbdInitializePerSystem().

 
#define IS_KANA_AWARE  )     (fNlsKbdConfiguration & GEN_KANA_AWARE)
 

Definition at line 67 of file fekbd.c.

Referenced by NlsHelpOrEndProc().

 
#define IS_SEND_VK_END  )     (fNlsKbdConfiguration & GEN_VK_END)
 

Definition at line 68 of file fekbd.c.

Referenced by NlsHelpOrEndProc().

 
#define IS_SEND_VK_HOME  )     (fNlsKbdConfiguration & GEN_VK_HOME)
 

Definition at line 69 of file fekbd.c.

Referenced by NlsHomeOrClearProc().

#define NLS_CLEAR_VK Vk   )     ((Vk) &= (KBDEXT|KBDMULTIVK|KBDSPECIAL|KBDNUMPAD|KBDBREAK))
 

Definition at line 18 of file fekbd.c.

Referenced by NlsAlphanumericModeProc(), NlsCodeInputToggleProc(), NlsHelpOrEndProc(), NlsHiraganaModeProc(), NlsHomeOrClearProc(), NlsKanaEventProc(), NlsKatakanaModeProc(), NlsNumpadModeProc(), NlsRomanToggleProc(), NlsSbcsDbcsToggleProc(), and NlsSendParamVk().

#define NLS_CLEAR_VK_AND_ATTR Vk   )     ((Vk) &= (KBDEXT|KBDMULTIVK|KBDSPECIAL|KBDNUMPAD))
 

Definition at line 24 of file fekbd.c.

Referenced by NlsKanaModeToggleProc().

#define NLSKBD_CONFIG_PATH   L"WOW\\keyboard"
 

Definition at line 1082 of file fekbd.c.

Referenced by NlsKbdInitializePerSystem().


Function Documentation

BOOL GenerateNlsVkAltKey PVK_F  pVkToF,
WORD  nMod,
PKE  pKe,
ULONG_PTR  dwExtraInfo
 

Definition at line 875 of file fekbd.c.

References aNLSKEProc, BOOL, BYTE, and DWORD.

Referenced by KbdNlsFuncTypeAlt().

00876 { 00877 BYTE iFuncIndex; 00878 DWORD dwParam; 00879 00880 iFuncIndex = pVkToF->NLSFEProcAlt[nMod].NLSFEProcIndex; 00881 dwParam = pVkToF->NLSFEProcAlt[nMod].NLSFEProcParam; 00882 00883 return((aNLSKEProc[iFuncIndex])(pKe,dwExtraInfo,dwParam)); 00884 }

BOOL GenerateNlsVkKey PVK_F  pVkToF,
WORD  nMod,
PKE  pKe,
ULONG_PTR  dwExtraInfo
 

Definition at line 864 of file fekbd.c.

References aNLSKEProc, BOOL, BYTE, and DWORD.

Referenced by KbdNlsFuncTypeAlt(), and KbdNlsFuncTypeNormal().

00865 { 00866 BYTE iFuncIndex; 00867 DWORD dwParam; 00868 00869 iFuncIndex = pVkToF->NLSFEProc[nMod].NLSFEProcIndex; 00870 dwParam = pVkToF->NLSFEProc[nMod].NLSFEProcParam; 00871 00872 return((aNLSKEProc[iFuncIndex])(pKe, dwExtraInfo, dwParam)); 00873 }

BOOL KbdNlsFuncTypeAlt PVK_F  pVkToF,
PKE  pKe,
ULONG_PTR  dwExtraInfo
 

Definition at line 940 of file fekbd.c.

References BOOL, FALSE, gafRawKeyState, GenerateNlsVkAltKey(), GenerateNlsVkKey(), GetModificationNumber(), GetModifierBits(), Modifiers_NLSKBD, and NULL.

00941 { 00942 WORD nMod; 00943 BOOL fRet = FALSE; 00944 00945 if (pKe == NULL) { 00946 /* 00947 * Clear state and deactivate this key processor 00948 */ 00949 return FALSE; 00950 } 00951 00952 nMod = GetModificationNumber(&Modifiers_NLSKBD, 00953 GetModifierBits(&Modifiers_NLSKBD, 00954 gafRawKeyState)); 00955 00956 if (nMod != SHFT_INVALID) { 00957 if (!(pKe->usFlaggedVk & KBDBREAK)) { 00958 if (pVkToF->NLSFEProcCurrent == KBDNLS_INDEX_ALT) { 00959 fRet = GenerateNlsVkAltKey(pVkToF, nMod, pKe, dwExtraInfo); 00960 } else { 00961 fRet = GenerateNlsVkKey(pVkToF, nMod, pKe, dwExtraInfo); 00962 } 00963 if (pVkToF->NLSFEProcSwitch & (1 << nMod)) { 00964 TAGMSG0(DBGTAG_IMM, "USERKM:FEKBD Switching Alt table\n"); 00965 /* 00966 * Switch to "alt". 00967 */ 00968 pVkToF->NLSFEProcCurrent = KBDNLS_INDEX_ALT; 00969 } 00970 } else { 00971 if (pVkToF->NLSFEProcCurrent == KBDNLS_INDEX_ALT) { 00972 fRet = GenerateNlsVkAltKey(pVkToF, nMod, pKe, dwExtraInfo); 00973 /* 00974 * Back to "normal" 00975 */ 00976 pVkToF->NLSFEProcCurrent = KBDNLS_INDEX_NORMAL; 00977 } else { 00978 fRet = GenerateNlsVkKey(pVkToF, nMod, pKe, dwExtraInfo); 00979 } 00980 } 00981 } 00982 return fRet; 00983 }

BOOL KbdNlsFuncTypeDummy PVK_F  pVkToF,
PKE  pKe,
ULONG_PTR  dwExtraInfo
 

Definition at line 893 of file fekbd.c.

References BOOL, and TRUE.

00894 { 00895 UNREFERENCED_PARAMETER(pVkToF); 00896 UNREFERENCED_PARAMETER(pKe); 00897 UNREFERENCED_PARAMETER(dwExtraInfo); 00898 00899 /* 00900 * We don't need to modify Original data. 00901 */ 00902 return TRUE; 00903 }

BOOL KbdNlsFuncTypeNormal PVK_F  pVkToF,
PKE  pKe,
ULONG_PTR  dwExtraInfo
 

Definition at line 912 of file fekbd.c.

References BOOL, FALSE, gafRawKeyState, GenerateNlsVkKey(), GetModificationNumber(), GetModifierBits(), Modifiers_NLSKBD, and NULL.

00913 { 00914 WORD nMod; 00915 00916 if (pKe == NULL) { 00917 /* 00918 * Clear state and deactivate this key processor 00919 */ 00920 return FALSE; 00921 } 00922 00923 nMod = GetModificationNumber(&Modifiers_NLSKBD, 00924 GetModifierBits(&Modifiers_NLSKBD, 00925 gafRawKeyState)); 00926 00927 if (nMod != SHFT_INVALID) { 00928 return(GenerateNlsVkKey(pVkToF, nMod, pKe, dwExtraInfo)); 00929 } 00930 return FALSE; 00931 }

BOOL NlsAlphanumericModeProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 230 of file fekbd.c.

References BOOL, BYTE, FALSE, gdwIMEOpenStatus, NLS_CLEAR_VK, NlsAlphaNumMode, NlsClearKeyStateToggle(), NlsGetCurrentInputMode(), NlsKbdSendIMEProc(), NlsLapseProc(), NlsTestKeyStateToggle(), TRUE, USHORT, and xxxKeyEvent().

00231 { 00232 if (!(pKe->usFlaggedVk & KBDBREAK)) { 00233 /* 00234 * We are in 'make' sequence. 00235 */ 00236 /* 00237 * Clear Virtual code. 00238 */ 00239 NLS_CLEAR_VK(pKe->usFlaggedVk); 00240 00241 if (!NlsTestKeyStateToggle(VK_DBE_ALPHANUMERIC)) { 00242 /* 00243 * Query current mode. 00244 */ 00245 BYTE CurrentMode = NlsGetCurrentInputMode(NlsAlphaNumMode); 00246 /* 00247 * Off toggle for previous key mode. 00248 */ 00249 NlsClearKeyStateToggle(CurrentMode); 00250 /* 00251 * We are not in 'AlphaNumeric' mode, before enter 'AlphaNumeric' 00252 * mode, we should send 'break' for previous key mode. 00253 */ 00254 xxxKeyEvent((USHORT)(pKe->usFlaggedVk | CurrentMode | KBDBREAK), 00255 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00256 } 00257 /* 00258 * Switch to 'AlphaNumeric' mode. 00259 */ 00260 pKe->usFlaggedVk |= VK_DBE_ALPHANUMERIC; 00261 00262 /* 00263 * Call i/o control. 00264 */ 00265 if ((!gdwIMEOpenStatus) && NlsTestKeyStateToggle(VK_KANA)) { 00266 NlsKbdSendIMEProc(TRUE, IME_CMODE_KATAKANA); 00267 } 00268 } else { 00269 return NlsLapseProc(pKe,dwExtraInfo,dwParam); 00270 } 00271 return TRUE; 00272 }

VOID NlsClearKeyStateToggle BYTE  Vk  ) 
 

Definition at line 110 of file fekbd.c.

References ClearAsyncKeyStateToggle, ClearKeyStateToggle, gpqForeground, and VOID().

Referenced by NlsAlphanumericModeProc(), NlsCodeInputToggleProc(), NlsHiraganaModeProc(), NlsKatakanaModeProc(), NlsRomanToggleProc(), and NlsSbcsDbcsToggleProc().

00111 { 00112 if (gpqForeground) 00113 ClearKeyStateToggle(gpqForeground,Vk); 00114 ClearAsyncKeyStateToggle(Vk); 00115 }

BOOL NlsCodeInputToggleProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 495 of file fekbd.c.

References BOOL, BYTE, FALSE, NLS_CLEAR_VK, NlsClearKeyStateToggle(), NlsCodeInputMode, NlsGetCurrentInputMode(), NlsLapseProc(), TRUE, USHORT, and xxxKeyEvent().

00496 { 00497 if (!(pKe->usFlaggedVk & KBDBREAK)) { 00498 /* 00499 * We are in 'make' sequence. 00500 */ 00501 /* 00502 * Query current 'CodeInput'/'NoCodeInput' mode. 00503 */ 00504 BYTE CurrentMode = NlsGetCurrentInputMode(NlsCodeInputMode); 00505 /* 00506 * Clear Virtual code. 00507 */ 00508 NLS_CLEAR_VK(pKe->usFlaggedVk); 00509 /* 00510 * Off toggle for previous key mode. 00511 */ 00512 NlsClearKeyStateToggle(CurrentMode); 00513 00514 switch (CurrentMode) { 00515 case VK_DBE_NOCODEINPUT: 00516 /* 00517 * We are in 'NoCodeInput' mode, let us send 'break key' for that. 00518 */ 00519 xxxKeyEvent((USHORT)(pKe->usFlaggedVk|VK_DBE_NOCODEINPUT|KBDBREAK), 00520 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00521 /* 00522 * Then, switch to 'CodeInput' mode. 00523 */ 00524 pKe->usFlaggedVk |= VK_DBE_CODEINPUT; 00525 break; 00526 case VK_DBE_CODEINPUT: 00527 /* 00528 * We are in 'CodeInput' mode, let us send 'break key' for that. 00529 */ 00530 xxxKeyEvent((USHORT)(pKe->usFlaggedVk|VK_DBE_CODEINPUT|KBDBREAK), 00531 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00532 /* 00533 * Then, switch to 'NoCodeInput' mode. 00534 */ 00535 pKe->usFlaggedVk |= VK_DBE_NOCODEINPUT; 00536 break; 00537 } 00538 } else { 00539 return(NlsLapseProc(pKe,dwExtraInfo,dwParam)); 00540 } 00541 return TRUE; 00542 }

BOOL NlsConvOrNonConvProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 821 of file fekbd.c.

References BOOL, FALSE, gdwIMEOpenStatus, NlsKbdSendIMEProc(), NlsTestKeyStateToggle(), and TRUE.

00822 { 00823 UNREFERENCED_PARAMETER(pKe); 00824 UNREFERENCED_PARAMETER(dwExtraInfo); 00825 UNREFERENCED_PARAMETER(dwParam); 00826 /* 00827 * 00828 */ 00829 if ((!gdwIMEOpenStatus) && (!(NlsTestKeyStateToggle(VK_KANA)))) { 00830 NlsKbdSendIMEProc(FALSE, IME_CMODE_ALPHANUMERIC); 00831 } 00832 /* 00833 * We don't need to modify Original data. 00834 */ 00835 return TRUE; 00836 }

BYTE NlsGetCurrentInputMode BYTE QueryMode  ) 
 

Definition at line 124 of file fekbd.c.

References BYTE, and NlsTestKeyStateToggle().

Referenced by NlsAlphanumericModeProc(), NlsCodeInputToggleProc(), NlsHiraganaModeProc(), NlsKatakanaModeProc(), NlsRomanToggleProc(), and NlsSbcsDbcsToggleProc().

00125 { 00126 BYTE *VkTable = QueryMode; 00127 BYTE VkDefault; 00128 /* 00129 * Get VkDefault, we will return this, if no bit is toggled. 00130 */ 00131 VkDefault = *VkTable; 00132 00133 while (*VkTable) { 00134 if (NlsTestKeyStateToggle(*VkTable)) { 00135 return *VkTable; 00136 } 00137 VkTable++; 00138 } 00139 00140 /* Something error */ 00141 return VkDefault; 00142 }

BOOL NlsHelpOrEndProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 600 of file fekbd.c.

References BOOL, IS_KANA_AWARE, IS_SEND_VK_END, NLS_CLEAR_VK, NlsTestKeyStateToggle(), and TRUE.

00601 { 00602 UNREFERENCED_PARAMETER(dwExtraInfo); 00603 UNREFERENCED_PARAMETER(dwParam); 00604 00605 if (!(pKe->usFlaggedVk & KBDNUMPAD)) { 00606 /* 00607 * Clear Virtual code. 00608 */ 00609 NLS_CLEAR_VK(pKe->usFlaggedVk); 00610 00611 if (!IS_KANA_AWARE()) { 00612 /* 00613 * We don't care 'kana' status. just check VK_END or VK_HELP. 00614 */ 00615 if (IS_SEND_VK_END()) { 00616 pKe->usFlaggedVk |= VK_END; 00617 } else { 00618 pKe->usFlaggedVk |= VK_HELP; 00619 } 00620 } else { 00621 /* 00622 * We care 'kana' status. 00623 */ 00624 if (IS_SEND_VK_END()) { 00625 if (NlsTestKeyStateToggle(VK_KANA)) { 00626 pKe->usFlaggedVk |= VK_HELP; 00627 } else { 00628 pKe->usFlaggedVk |= VK_END; 00629 } 00630 } else { 00631 if (NlsTestKeyStateToggle(VK_KANA)) { 00632 pKe->usFlaggedVk |= VK_END; 00633 } else { 00634 pKe->usFlaggedVk |= VK_HELP; 00635 } 00636 } 00637 } 00638 } 00639 return TRUE; 00640 }

BOOL NlsHiraganaModeProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 332 of file fekbd.c.

References BOOL, BYTE, FALSE, gdwIMEOpenStatus, NLS_CLEAR_VK, NlsAlphaNumMode, NlsClearKeyStateToggle(), NlsGetCurrentInputMode(), NlsKbdSendIMEProc(), NlsLapseProc(), NlsTestKeyStateToggle(), TRUE, USHORT, and xxxKeyEvent().

00333 { 00334 if (!(pKe->usFlaggedVk & KBDBREAK)) { 00335 /* 00336 * We are in 'make' sequence. 00337 */ 00338 /* 00339 * Clear Virtual code. 00340 */ 00341 NLS_CLEAR_VK(pKe->usFlaggedVk); 00342 00343 if (!NlsTestKeyStateToggle(VK_DBE_HIRAGANA)) { 00344 /* 00345 * Query current mode. 00346 */ 00347 BYTE CurrentMode = NlsGetCurrentInputMode(NlsAlphaNumMode); 00348 /* 00349 * Off toggle for previous key mode. 00350 */ 00351 NlsClearKeyStateToggle(CurrentMode); 00352 /* 00353 * We are not in 'Hiragana' mode, yet. Before enter 'Hiragana' 00354 * mode, we should make 'break key' for previous key. 00355 */ 00356 xxxKeyEvent((USHORT)(pKe->usFlaggedVk | CurrentMode | KBDBREAK), 00357 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00358 } 00359 /* 00360 * Switch to 'Hiragana' mode. 00361 */ 00362 pKe->usFlaggedVk |= VK_DBE_HIRAGANA; 00363 00364 /* 00365 * Call i/o control. 00366 */ 00367 if ((!gdwIMEOpenStatus) && (!(NlsTestKeyStateToggle(VK_KANA)))) { 00368 NlsKbdSendIMEProc(FALSE, IME_CMODE_ALPHANUMERIC); 00369 } 00370 } else { 00371 return(NlsLapseProc(pKe,dwExtraInfo,dwParam)); 00372 } 00373 return TRUE; 00374 }

BOOL NlsHomeOrClearProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 649 of file fekbd.c.

References BOOL, IS_SEND_VK_HOME, NLS_CLEAR_VK, and TRUE.

00650 { 00651 UNREFERENCED_PARAMETER(dwExtraInfo); 00652 UNREFERENCED_PARAMETER(dwParam); 00653 00654 if (!(pKe->usFlaggedVk & KBDNUMPAD)) { 00655 /* 00656 * Clear virtual code. 00657 */ 00658 NLS_CLEAR_VK(pKe->usFlaggedVk); 00659 00660 if (IS_SEND_VK_HOME()) { 00661 pKe->usFlaggedVk |= VK_HOME; 00662 } else { 00663 pKe->usFlaggedVk |= VK_CLEAR; 00664 } 00665 } 00666 return TRUE; 00667 }

BOOL NlsKanaEventProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 783 of file fekbd.c.

References BOOL, BYTE, FALSE, NLS_CLEAR_VK, NlsKbdSendIMEProc(), NlsTestKeyStateToggle(), and TRUE.

00784 { 00785 UNREFERENCED_PARAMETER(dwExtraInfo); 00786 /* 00787 * Clear Virtual code. 00788 */ 00789 NLS_CLEAR_VK(pKe->usFlaggedVk); 00790 00791 /* 00792 * Set parameter as new VK key. 00793 */ 00794 pKe->usFlaggedVk |= (BYTE)dwParam; 00795 00796 /* 00797 * Send notification to kernel mode keyboard driver. 00798 */ 00799 if (!(pKe->usFlaggedVk & KBDBREAK)) { 00800 if (NlsTestKeyStateToggle(VK_KANA)) { 00801 /* 00802 * Call i/o control. 00803 */ 00804 NlsKbdSendIMEProc(FALSE, IME_CMODE_ALPHANUMERIC); 00805 } else { 00806 /* 00807 * Call i/o control. 00808 */ 00809 NlsKbdSendIMEProc(TRUE, IME_CMODE_KATAKANA); 00810 } 00811 } 00812 return TRUE; 00813 }

BOOL NlsKanaModeToggleProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 551 of file fekbd.c.

References BOOL, NLS_CLEAR_VK_AND_ATTR, NlsLapseProc(), NlsTestKeyStateToggle(), and TRUE.

00552 { 00553 /* 00554 * Check this is 'make' or 'break'. 00555 */ 00556 BOOL bMake = !(pKe->usFlaggedVk & KBDBREAK); 00557 /* 00558 * Check we are in 'kana' mode or not. 00559 */ 00560 BOOL bKana = NlsTestKeyStateToggle(VK_KANA); 00561 /* 00562 * Clear virtual code and key attributes. 00563 */ 00564 NLS_CLEAR_VK_AND_ATTR(pKe->usFlaggedVk); 00565 00566 if (bMake) { 00567 /* 00568 * We are in 'make' sequence. 00569 */ 00570 if (bKana) { 00571 /* 00572 * Make 'break' for VK_KANA. 00573 */ 00574 pKe->usFlaggedVk |= (VK_KANA|KBDBREAK); 00575 } else { 00576 /* 00577 * Not yet in 'kana' mode, Let generate 'make' for VK_KANA... 00578 */ 00579 pKe->usFlaggedVk |= VK_KANA; 00580 } 00581 return TRUE; 00582 } else { 00583 /* 00584 * We will keep 'down' & 'toggled' in 'kana' mode, 00585 * then don't need to generate 'break' for VK_KANA. 00586 * when next time generate 'make' for this, we will generate 00587 * 'break' for this. 00588 */ 00589 return(NlsLapseProc(pKe,dwExtraInfo,dwParam)); 00590 } 00591 }

BOOL NlsKatakanaModeProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 281 of file fekbd.c.

References BOOL, BYTE, FALSE, gdwIMEOpenStatus, NLS_CLEAR_VK, NlsAlphaNumMode, NlsClearKeyStateToggle(), NlsGetCurrentInputMode(), NlsKbdSendIMEProc(), NlsLapseProc(), NlsTestKeyStateToggle(), TRUE, USHORT, and xxxKeyEvent().

00282 { 00283 if (!(pKe->usFlaggedVk & KBDBREAK)) { 00284 /* 00285 * We are in 'make' sequence. 00286 */ 00287 /* 00288 * Clear Virtual code. 00289 */ 00290 NLS_CLEAR_VK(pKe->usFlaggedVk); 00291 00292 if (!NlsTestKeyStateToggle(VK_DBE_KATAKANA)) { 00293 /* 00294 * Query current mode. 00295 */ 00296 BYTE CurrentMode = NlsGetCurrentInputMode(NlsAlphaNumMode); 00297 /* 00298 * Off toggle for previous key mode. 00299 */ 00300 NlsClearKeyStateToggle(CurrentMode); 00301 /* 00302 * We are not in 'Katakana' mode, yet. Before enter 'Katakana' 00303 * mode, we should make 'break key' for previous mode. 00304 */ 00305 xxxKeyEvent((USHORT)(pKe->usFlaggedVk | CurrentMode | KBDBREAK), 00306 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00307 } 00308 /* 00309 * Switch to 'Katakana' mode. 00310 */ 00311 pKe->usFlaggedVk |= VK_DBE_KATAKANA; 00312 00313 /* 00314 * Call i/o control. 00315 */ 00316 if ((!gdwIMEOpenStatus) && (!(NlsTestKeyStateToggle(VK_KANA)))) { 00317 NlsKbdSendIMEProc(FALSE, IME_CMODE_ALPHANUMERIC); 00318 } 00319 } else { 00320 return(NlsLapseProc(pKe,dwExtraInfo,dwParam)); 00321 } 00322 return TRUE; 00323 }

VOID NlsKbdInitializePerSystem VOID   ) 
 

Definition at line 1092 of file fekbd.c.

References EndString, fNlsKbdConfiguration, GEN_KANA_AWARE, GEN_VK_END, GEN_VK_HOME, L, NLSKBD_CONFIG_PATH, NlsSetKeyStateToggle(), NoString, NT_SUCCESS, NTSTATUS(), NULL, RtlEqualUnicodeString(), RtlInitUnicodeString(), RtlQueryRegistryValues(), TRUE, and VOID().

Referenced by LW_DriversInit().

01093 { 01094 RTL_QUERY_REGISTRY_TABLE QueryTable[4]; 01095 01096 UNICODE_STRING EndString, HelpString; 01097 UNICODE_STRING YesString, NoString; 01098 UNICODE_STRING HomeString, ClearString; 01099 01100 UNICODE_STRING HelpKeyString; 01101 UNICODE_STRING KanaHelpString; 01102 UNICODE_STRING ClearKeyString; 01103 01104 NTSTATUS status; 01105 01106 // 01107 // Set default VK_DBE_xxx status. 01108 // 01109 // 01110 // AlphaNumeric input mode. 01111 // 01112 NlsSetKeyStateToggle(VK_DBE_ALPHANUMERIC); 01113 // 01114 // Single byte character input mode. 01115 // 01116 NlsSetKeyStateToggle(VK_DBE_SBCSCHAR); 01117 // 01118 // No roman input mode. 01119 // 01120 NlsSetKeyStateToggle(VK_DBE_NOROMAN); 01121 // 01122 // No code input mode. 01123 // 01124 NlsSetKeyStateToggle(VK_DBE_NOCODEINPUT); 01125 01126 // 01127 // From Here, below code is for compatibility for Windows NT 3.xx 01128 // for NEC PC-9800 verion. 01129 // 01130 01131 // 01132 // Initialize default strings. 01133 // 01134 RtlInitUnicodeString(&EndString, L"end"); 01135 RtlInitUnicodeString(&HelpString,L"help"); 01136 01137 RtlInitUnicodeString(&YesString,L"yes"); 01138 RtlInitUnicodeString(&NoString, L"no"); 01139 01140 RtlInitUnicodeString(&HomeString, L"home"); 01141 RtlInitUnicodeString(&ClearString,L"clear"); 01142 01143 // 01144 // Initialize recieve buffer. 01145 // 01146 RtlInitUnicodeString(&HelpKeyString,NULL); 01147 RtlInitUnicodeString(&KanaHelpString,NULL); 01148 RtlInitUnicodeString(&ClearKeyString,NULL); 01149 01150 // 01151 // Initalize query tables. 01152 // 01153 // ValueName : "helpkey" 01154 // ValueData : if "end" VK_END, otherwise VK_HELP 01155 // 01156 QueryTable[0].QueryRoutine = NULL; 01157 QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT; 01158 QueryTable[0].Name = (PWSTR) L"helpkey", 01159 QueryTable[0].EntryContext = (PVOID) &HelpKeyString; 01160 QueryTable[0].DefaultType = REG_SZ; 01161 QueryTable[0].DefaultData = &EndString; 01162 QueryTable[0].DefaultLength = 0; 01163 01164 // 01165 // ValueName : "KanaHelpKey" 01166 // ValueData : if "yes" if kana on switch VK_HELP and VK_END 01167 // 01168 QueryTable[1].QueryRoutine = NULL; 01169 QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT; 01170 QueryTable[1].Name = (PWSTR) L"KanaHelpKey", 01171 QueryTable[1].EntryContext = (PVOID) &KanaHelpString; 01172 QueryTable[1].DefaultType = REG_SZ; 01173 QueryTable[1].DefaultData = &YesString; 01174 QueryTable[1].DefaultLength = 0; 01175 01176 // 01177 // ValueName : "clrkey" 01178 // ValueData : if "home" VK_HOME, otherwise VK_CLEAR 01179 // 01180 QueryTable[2].QueryRoutine = NULL; 01181 QueryTable[2].Flags = RTL_QUERY_REGISTRY_DIRECT; 01182 QueryTable[2].Name = (PWSTR) L"clrkey", 01183 QueryTable[2].EntryContext = (PVOID) &ClearKeyString; 01184 QueryTable[2].DefaultType = REG_SZ; 01185 QueryTable[2].DefaultData = &HomeString; 01186 QueryTable[2].DefaultLength = 0; 01187 01188 QueryTable[3].QueryRoutine = NULL; 01189 QueryTable[3].Flags = 0; 01190 QueryTable[3].Name = NULL; 01191 01192 status = RtlQueryRegistryValues( 01193 RTL_REGISTRY_WINDOWS_NT, 01194 NLSKBD_CONFIG_PATH, 01195 QueryTable, NULL, NULL); 01196 01197 if (!NT_SUCCESS(status)) { 01198 RIPMSG1(RIP_WARNING, "FEKBD:RtlQueryRegistryValues fails (%x)\n", status); 01199 return; 01200 } 01201 01202 if (RtlEqualUnicodeString(&HelpKeyString,&HelpString,TRUE)) { 01203 /* 01204 * Generate VK_HELP, when NLSKBD_HELP_OR_END is called. 01205 */ 01206 fNlsKbdConfiguration &= ~GEN_VK_END; 01207 } 01208 01209 if (RtlEqualUnicodeString(&KanaHelpString,&NoString,TRUE)) { 01210 /* 01211 * In case of "yes": 01212 * If 'kana' is on, when NLSKBD_HELP_OR_END is called, switch VK_END and VK_HELP. 01213 * Else, in case of "no": 01214 * Doesn't generate by 'kana' toggle state. 01215 */ 01216 fNlsKbdConfiguration &= ~GEN_KANA_AWARE; 01217 } 01218 01219 if (RtlEqualUnicodeString(&ClearKeyString,&ClearString,TRUE)) { 01220 /* 01221 * Generate VK_CLEAR, when KBDNLS_HOME_OR_CLEAR is called. 01222 */ 01223 fNlsKbdConfiguration &= ~GEN_VK_HOME; 01224 } 01225 01226 return; 01227 }

VOID NlsKbdSendIMENotification DWORD  dwImeOpen,
DWORD  dwImeConversion
 

Definition at line 1034 of file fekbd.c.

References BEGINATOMICDEVICEINFOLISTCHECK, DEVICE_TYPE_KEYBOARD, ENDATOMICDEVICEINFOLISTCHECK, EnterDeviceInfoListCrit(), GDIAF_IME_STATUS, gKbdImeStatus, gpDeviceInfoList, gpKbdNlsTbl, LeaveDeviceInfoListCrit(), NULL, RequestDeviceChange(), TRUE, and VOID().

Referenced by NlsKbdSendIMEProc(), and xxxNotifyIMEStatus().

01035 { 01036 PKBDNLSTABLES pKbdNlsTable = gpKbdNlsTbl; 01037 01038 if (pKbdNlsTable == NULL) { 01039 /* 01040 * 'Active' layout driver does not have NLSKBD table. 01041 */ 01042 return; 01043 } 01044 01045 /* 01046 * Let us send notification to kernel mode keyboard driver, if nessesary. 01047 */ 01048 if ((pKbdNlsTable->LayoutInformation) & NLSKBD_INFO_SEND_IME_NOTIFICATION) { 01049 PDEVICEINFO pDeviceInfo; 01050 01051 /* 01052 * Fill up the KEYBOARD_IME_STATUS structure. 01053 */ 01054 gKbdImeStatus.UnitId = 0; 01055 gKbdImeStatus.ImeOpen = dwImeOpen; 01056 gKbdImeStatus.ImeConvMode = dwImeConversion; 01057 01058 EnterDeviceInfoListCrit(); 01059 BEGINATOMICDEVICEINFOLISTCHECK(); 01060 for (pDeviceInfo = gpDeviceInfoList; pDeviceInfo; pDeviceInfo = pDeviceInfo->pNext) { 01061 if ((pDeviceInfo->type == DEVICE_TYPE_KEYBOARD) && (pDeviceInfo->handle)) { 01062 RequestDeviceChange(pDeviceInfo, GDIAF_IME_STATUS, TRUE); 01063 } 01064 } 01065 ENDATOMICDEVICEINFOLISTCHECK(); 01066 LeaveDeviceInfoListCrit(); 01067 } 01068 return; 01069 }

VOID NlsKbdSendIMEProc DWORD  dwImeOpen,
DWORD  dwImeConversion
 

Definition at line 1071 of file fekbd.c.

References GetAppImeCompatFlags(), gpqForeground, NlsKbdSendIMENotification(), NULL, tagQ::ptiKeyboard, and VOID().

Referenced by NlsAlphanumericModeProc(), NlsConvOrNonConvProc(), NlsHiraganaModeProc(), NlsKanaEventProc(), and NlsKatakanaModeProc().

01072 { 01073 if (gpqForeground != NULL && gpqForeground->ptiKeyboard != NULL && 01074 (!(GetAppImeCompatFlags(gpqForeground->ptiKeyboard) & IMECOMPAT_HYDRACLIENT))) { 01075 NlsKbdSendIMENotification(dwImeOpen, dwImeConversion); 01076 } 01077 }

BOOL NlsLapseProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 211 of file fekbd.c.

References BOOL, and FALSE.

Referenced by NlsAlphanumericModeProc(), NlsCodeInputToggleProc(), NlsHiraganaModeProc(), NlsKanaModeToggleProc(), NlsKatakanaModeProc(), NlsRomanToggleProc(), and NlsSbcsDbcsToggleProc().

00212 { 00213 UNREFERENCED_PARAMETER(pKe); 00214 UNREFERENCED_PARAMETER(dwExtraInfo); 00215 UNREFERENCED_PARAMETER(dwParam); 00216 00217 /* 00218 * Just throw away this event. 00219 */ 00220 return FALSE; 00221 }

BOOL NlsNullProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 151 of file fekbd.c.

References BOOL, and TRUE.

00152 { 00153 UNREFERENCED_PARAMETER(pKe); 00154 UNREFERENCED_PARAMETER(dwExtraInfo); 00155 UNREFERENCED_PARAMETER(dwParam); 00156 00157 /* 00158 * Actually we should not get here... 00159 */ 00160 return TRUE; 00161 }

BOOL NlsNumpadModeProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 676 of file fekbd.c.

References BOOL, BYTE, LOBYTE, NLS_CLEAR_VK, NlsTestKeyStateToggle(), TestRawKeyDown, and TRUE.

00677 { 00678 /* 00679 * Get current Virtual key. 00680 */ 00681 BYTE Vk = LOBYTE(pKe->usFlaggedVk); 00682 00683 UNREFERENCED_PARAMETER(dwExtraInfo); 00684 UNREFERENCED_PARAMETER(dwParam); 00685 00686 if(!NlsTestKeyStateToggle(VK_NUMLOCK)) { 00687 /* 00688 * Clear virtual code. 00689 */ 00690 NLS_CLEAR_VK(pKe->usFlaggedVk); 00691 00692 switch (Vk) { 00693 case VK_NUMPAD0: 00694 pKe->usFlaggedVk |= VK_INSERT; 00695 break; 00696 case VK_NUMPAD1: 00697 pKe->usFlaggedVk |= VK_END; 00698 break; 00699 case VK_NUMPAD2: 00700 pKe->usFlaggedVk |= VK_DOWN; 00701 break; 00702 case VK_NUMPAD3: 00703 pKe->usFlaggedVk |= VK_NEXT; 00704 break; 00705 case VK_NUMPAD4: 00706 pKe->usFlaggedVk |= VK_LEFT; 00707 break; 00708 case VK_NUMPAD5: 00709 pKe->usFlaggedVk |= VK_CLEAR; 00710 break; 00711 case VK_NUMPAD6: 00712 pKe->usFlaggedVk |= VK_RIGHT; 00713 break; 00714 case VK_NUMPAD7: 00715 pKe->usFlaggedVk |= VK_HOME; 00716 break; 00717 case VK_NUMPAD8: 00718 pKe->usFlaggedVk |= VK_UP; 00719 break; 00720 case VK_NUMPAD9: 00721 pKe->usFlaggedVk |= VK_PRIOR; 00722 break; 00723 case VK_DECIMAL: 00724 pKe->usFlaggedVk |= VK_DELETE; 00725 break; 00726 } 00727 00728 } else if (TestRawKeyDown(VK_SHIFT)) { 00729 /* 00730 * Clear virtual code. 00731 */ 00732 NLS_CLEAR_VK(pKe->usFlaggedVk); 00733 00734 switch (Vk) { 00735 case VK_NUMPAD0: 00736 pKe->usFlaggedVk |= VK_INSERT; 00737 break; 00738 case VK_NUMPAD1: 00739 pKe->usFlaggedVk |= VK_END; 00740 break; 00741 case VK_NUMPAD2: 00742 pKe->usFlaggedVk |= VK_DOWN; 00743 break; 00744 case VK_NUMPAD3: 00745 pKe->usFlaggedVk |= VK_NEXT; 00746 break; 00747 case VK_NUMPAD4: 00748 pKe->usFlaggedVk |= VK_LEFT; 00749 break; 00750 case VK_NUMPAD5: 00751 pKe->usFlaggedVk |= VK_CLEAR; 00752 break; 00753 case VK_NUMPAD6: 00754 pKe->usFlaggedVk |= VK_RIGHT; 00755 break; 00756 case VK_NUMPAD7: 00757 pKe->usFlaggedVk |= VK_HOME; 00758 break; 00759 case VK_NUMPAD8: 00760 pKe->usFlaggedVk |= VK_UP; 00761 break; 00762 case VK_NUMPAD9: 00763 pKe->usFlaggedVk |= VK_PRIOR; 00764 break; 00765 case VK_DECIMAL: 00766 pKe->usFlaggedVk |= VK_DELETE; 00767 break; 00768 } 00769 } else { 00770 /* 00771 * Otherwise, just pass through... 00772 */ 00773 } 00774 return TRUE; 00775 }

BOOL NlsRomanToggleProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 439 of file fekbd.c.

References BOOL, BYTE, FALSE, NLS_CLEAR_VK, NlsClearKeyStateToggle(), NlsGetCurrentInputMode(), NlsLapseProc(), NlsRomanMode, TRUE, USHORT, and xxxKeyEvent().

00440 { 00441 if (!(pKe->usFlaggedVk & KBDBREAK)) { 00442 /* 00443 * We are in 'make' sequence. 00444 */ 00445 /* 00446 * Query current 'Roman'/'NoRoman' mode. 00447 */ 00448 BYTE CurrentMode = NlsGetCurrentInputMode(NlsRomanMode); 00449 /* 00450 * Clear Virtual code. 00451 */ 00452 NLS_CLEAR_VK(pKe->usFlaggedVk); 00453 /* 00454 * Off toggle for previous key mode. 00455 */ 00456 NlsClearKeyStateToggle(CurrentMode); 00457 00458 switch (CurrentMode) { 00459 case VK_DBE_NOROMAN: 00460 /* 00461 * We are in 'NoRoman' mode, let us send 'break key' for that. 00462 */ 00463 xxxKeyEvent((USHORT)(pKe->usFlaggedVk|VK_DBE_NOROMAN|KBDBREAK), 00464 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00465 /* 00466 * Then, switch to 'Roman' mode. 00467 */ 00468 pKe->usFlaggedVk |= VK_DBE_ROMAN; 00469 break; 00470 case VK_DBE_ROMAN: 00471 /* 00472 * We are in 'Roman' mode, let us send 'break key' for that. 00473 */ 00474 xxxKeyEvent((USHORT)(pKe->usFlaggedVk|VK_DBE_ROMAN|KBDBREAK), 00475 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00476 /* 00477 * Then, switch to 'NoRoman' mode. 00478 */ 00479 pKe->usFlaggedVk |= VK_DBE_NOROMAN; 00480 break; 00481 } 00482 } else { 00483 return(NlsLapseProc(pKe,dwExtraInfo,dwParam)); 00484 } 00485 return TRUE; 00486 }

BOOL NlsSbcsDbcsToggleProc PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 383 of file fekbd.c.

References BOOL, BYTE, FALSE, NLS_CLEAR_VK, NlsClearKeyStateToggle(), NlsGetCurrentInputMode(), NlsLapseProc(), NlsSbcsDbcsMode, TRUE, USHORT, and xxxKeyEvent().

00384 { 00385 if (!(pKe->usFlaggedVk & KBDBREAK)) { 00386 /* 00387 * We are in 'make' sequence. 00388 */ 00389 /* 00390 * Query current 'Sbcs'/'Dbcs' mode. 00391 */ 00392 BYTE CurrentMode = NlsGetCurrentInputMode(NlsSbcsDbcsMode); 00393 /* 00394 * Clear Virtual code. 00395 */ 00396 NLS_CLEAR_VK(pKe->usFlaggedVk); 00397 /* 00398 * Off toggle for previous key mode. 00399 */ 00400 NlsClearKeyStateToggle(CurrentMode); 00401 00402 switch (CurrentMode) { 00403 case VK_DBE_SBCSCHAR: 00404 /* 00405 * We are in 'SbcsChar' mode, let us send 'break key' for that. 00406 */ 00407 xxxKeyEvent((USHORT)(pKe->usFlaggedVk|VK_DBE_SBCSCHAR|KBDBREAK), 00408 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00409 /* 00410 * Then, switch to 'DbcsChar' mode. 00411 */ 00412 pKe->usFlaggedVk |= VK_DBE_DBCSCHAR; 00413 break; 00414 case VK_DBE_DBCSCHAR: 00415 /* 00416 * We are in 'DbcsChar' mode, let us send 'break key' for that. 00417 */ 00418 xxxKeyEvent((USHORT)(pKe->usFlaggedVk|VK_DBE_DBCSCHAR|KBDBREAK), 00419 pKe->bScanCode, pKe->dwTime, dwExtraInfo, FALSE); 00420 /* 00421 * Then, switch to 'SbcsChar' mode. 00422 */ 00423 pKe->usFlaggedVk |= VK_DBE_SBCSCHAR; 00424 break; 00425 } 00426 } else { 00427 return(NlsLapseProc(pKe,dwExtraInfo,dwParam)); 00428 } 00429 return TRUE; 00430 }

BOOL NlsSendBaseVk PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 170 of file fekbd.c.

References BOOL, and TRUE.

00171 { 00172 UNREFERENCED_PARAMETER(pKe); 00173 UNREFERENCED_PARAMETER(dwExtraInfo); 00174 UNREFERENCED_PARAMETER(dwParam); 00175 00176 /* 00177 * We don't need to modify Original data. 00178 */ 00179 return TRUE; 00180 }

BOOL NlsSendParamVk PKE  pKe,
ULONG_PTR  dwExtraInfo,
ULONG  dwParam
 

Definition at line 189 of file fekbd.c.

References BOOL, BYTE, NLS_CLEAR_VK, and TRUE.

00190 { 00191 UNREFERENCED_PARAMETER(dwExtraInfo); 00192 00193 /* 00194 * Clear Virtual code. 00195 */ 00196 NLS_CLEAR_VK(pKe->usFlaggedVk); 00197 /* 00198 * Set parameter as new VK key. 00199 */ 00200 pKe->usFlaggedVk |= (BYTE)dwParam; 00201 return TRUE; 00202 }

VOID NlsSetKeyStateToggle BYTE  Vk  ) 
 

Definition at line 96 of file fekbd.c.

References gpqForeground, SetAsyncKeyStateToggle, SetKeyStateToggle, and VOID().

Referenced by NlsKbdInitializePerSystem().

00097 { 00098 if (gpqForeground) 00099 SetKeyStateToggle(gpqForeground,Vk); 00100 SetAsyncKeyStateToggle(Vk); 00101 }

BOOL NlsTestKeyStateToggle BYTE  Vk  ) 
 

Definition at line 80 of file fekbd.c.

References BOOL, gpqForeground, TestAsyncKeyStateToggle, and TestKeyStateToggle.

Referenced by NlsAlphanumericModeProc(), NlsConvOrNonConvProc(), NlsGetCurrentInputMode(), NlsHelpOrEndProc(), NlsHiraganaModeProc(), NlsKanaEventProc(), NlsKanaModeToggleProc(), NlsKatakanaModeProc(), and NlsNumpadModeProc().

00081 { 00082 if (gpqForeground) { 00083 return (TestKeyStateToggle(gpqForeground,Vk)); 00084 } else { 00085 return (TestAsyncKeyStateToggle(Vk)); 00086 } 00087 }

BOOL xxxKENLSProcs PKE  pKe,
ULONG_PTR  dwExtraInfo
 

Definition at line 1004 of file fekbd.c.

References aNLSVKFProc, BOOL, CheckCritIn, gpKbdNlsTbl, LOBYTE, NULL, TRUE, and UINT.

Referenced by xxxProcessKeyEvent().

01005 { 01006 01007 CheckCritIn(); 01008 01009 if (gpKbdNlsTbl != NULL) { 01010 PVK_F pVkToF = gpKbdNlsTbl->pVkToF; 01011 UINT iNumVk = gpKbdNlsTbl->NumOfVkToF; 01012 01013 while(iNumVk) { 01014 if (pVkToF[iNumVk-1].Vk == LOBYTE(pKe->usFlaggedVk)) { 01015 return((aNLSVKFProc[pVkToF[iNumVk-1].NLSFEProcType]) 01016 (&(pVkToF[iNumVk-1]),pKe,dwExtraInfo)); 01017 } 01018 iNumVk--; 01019 } 01020 } 01021 /* 01022 * Other special Key Event processors 01023 */ 01024 return TRUE; 01025 }


Variable Documentation

NLSKEPROC aNLSKEProc[]
 

Initial value:

Definition at line 845 of file fekbd.c.

Referenced by GenerateNlsVkAltKey(), and GenerateNlsVkKey().

NLSVKFPROC aNLSVKFProc[]
 

Initial value:

Definition at line 992 of file fekbd.c.

Referenced by xxxKENLSProcs().

VK_TO_BIT aVkToBits_NLSKBD[]
 

Initial value:

{ { VK_SHIFT, KBDSHIFT}, { VK_CONTROL, KBDCTRL}, { VK_MENU, KBDALT}, { 0, 0} }

Definition at line 38 of file fekbd.c.

BYTE fNlsKbdConfiguration = GEN_KANA_AWARE | GEN_VK_END | GEN_VK_HOME
 

Definition at line 71 of file fekbd.c.

Referenced by NlsKbdInitializePerSystem().

MODIFIERS Modifiers_NLSKBD
 

Initial value:

{ &aVkToBits_NLSKBD[0], 7, { 0, 1, 2, 3, 4, 5, 6, 7, } }

Definition at line 45 of file fekbd.c.

Referenced by KbdNlsFuncTypeAlt(), and KbdNlsFuncTypeNormal().

BYTE NlsAlphaNumMode[] = {VK_DBE_ALPHANUMERIC,VK_DBE_HIRAGANA,VK_DBE_KATAKANA,0}
 

Definition at line 30 of file fekbd.c.

Referenced by NlsAlphanumericModeProc(), NlsHiraganaModeProc(), and NlsKatakanaModeProc().

BYTE NlsCodeInputMode[] = {VK_DBE_NOCODEINPUT,VK_DBE_CODEINPUT,0}
 

Definition at line 33 of file fekbd.c.

Referenced by NlsCodeInputToggleProc().

BYTE NlsRomanMode[] = {VK_DBE_NOROMAN,VK_DBE_ROMAN,0}
 

Definition at line 32 of file fekbd.c.

Referenced by NlsRomanToggleProc().

BYTE NlsSbcsDbcsMode[] = {VK_DBE_SBCSCHAR,VK_DBE_DBCSCHAR,0}
 

Definition at line 31 of file fekbd.c.

Referenced by NlsSbcsDbcsToggleProc().


Generated on Sat May 15 19:43:39 2004 for test by doxygen 1.3.7