Rss & SiteMap

Êﺣ½ÌÓý¼¯ÍÅÂÛ̳ http://www.bjzhda.cn

Êﺣ½ÌÓý¼¯ÍÅÂÛ̳
¹²1 Ìõ¼Ç¼, ÿҳÏÔʾ 10 Ìõ, ҳǩ: [1]
[ä¯ÀÀÍêÕû°æ]

±êÌ⣺ÈçºÎΪWinCEµÄ¶¨ÖƼüÅÌдÇý¶¯

1Â¥
wangxinxin ·¢±íÓÚ£º2010-11-26 10:49:40

³£¿´µ½ÓÐÈËÎÊÔõô¸ø¶¨ÖƼüÅÌÖÆ×÷Çý¶¯³ÌÐò£¬ÔÚÕâÀï̸̸Îҵľ­Ñé¡£ÍêÕûµÄ¼üÅÌÇý¶¯Ôõôд²»ÊÇÕâƪÎÄÕµÄÄ¿µÄ£¬ÕâЩMSDNÉÏÓкÜÏêϸµÄ½éÉÜ¡£ÕâÀï̸µÄÊÇ£¬¾Ù¸öÀý×Ó£¬±ê×¼µÄÃÀ¹úÓ¢Óï¼üÅ̵ÄÊý×Ö¼üSHIFT+2Êä³ö·ûºÅ@£¬ÄãÏë¸Ä³ÉÅ·Ôª·ûºÅ¸ÃÔõô×ö£¿»òÕßÄãÏë×öÒ»¸ö·¨Óï¼üÅÌ£¬ÓÖ¸ÃÔõô×ö£¿ÓÖ»òÕßÄãÏë»ùÓÚͬÑùµÄ¼üÅÌÓ²¼þÉè¼Æ£¬Èí¼þÉÏͬʱ֧³ÖÓ¢Óï¡¢·¨Óï¡¢¶íÓïlayout£¬ÓÖ¸ÃÔõôŪ£¿

ÔÚWinCEÉÏ£¬´Ó¼üÅÌÇý¶¯µÄ½Ç¶È¿´£¬¼üÅÌÇý¶¯¶Ô°´¼ü¶¯×÷µÄÏìÓ¦¹ý³Ì´óÔ¼¿ÉÃèÊöΪ£º

°´¼ü²úÉúÖжÏ
¼üÅÌÇý¶¯¶ÁÈ¡°´¼üµÄscan code
¼üÅÌÇý¶¯°Ñscan codeÓ³Éä³Évirtual keyºÍunicode×Ö·û
¼üÅÌÇý¶¯°Ñ°´¼üÏûÏ¢·¢Ë͵½Í¼Ðδ°¿Ú×Óϵͳ£¨GWES£©¡£
¼üµÄscan codeÓÉkeyboard matrix¾ö¶¨£¬¸ú¼üÅ̵ÄÓ²¼þÉè¼ÆÓйء£Òò´Ë´ÓÈí¼þ½Ç¶È¿´£¬¼üÅ̵Äscan codeÊDz»Äܸĵġ£µ«ÊÇÓÉÓÚ°´¼ü×îÖÕÊä³öµÄÊÇ¿É´òÓ¡×Ö·û»òÕßvirtual key£¬ÕâÀïÃæ¾ÍÓиöÓ³Éä¹Øϵ£¬Õâ¸öÓ³Éä¹Øϵ¿ÉÒÔÔÚ¼üÅÌÇý¶¯ÀíÖ¸¶¨£¬ÉõÖÁ¿ÉÒÔ¶¯Ì¬Çл»¡£WinCEµÄ±ê×¼¼üÅÌÇý¶¯¿ò¼Ü¶¨ÒåÁËÁ½ÕÅÓ³Éä±í£º¼´Scan codeµ½virtual keyµÄÓ³Éä±í(Device layout)£¬ºÍvirtual keyµ½unicodeµÄÓ³Éä±í(input language)¡£Í¨¹ýÐÞ¸ÄÕâÁ½ÕÅÓ³Éä±íµÄ¶¨Ò壬ÎÒÃǾͿÉÒÔ¿ØÖƼüÅÌÉϵÄÿһ¸ö°´¼ü»òÕß°´¼ü×éºÏµÄÊä³ö¡£

 D:\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\KEYBDĿ¼ÏÂÓÐһЩÕë¶Ô±ê×¼¼üÅ̵ÄÔ´´úÂ룺DEVICELAYOUTS×ÓĿ¼ÏÂÊÇScan codeµ½virtual keyÓ³Éä±í£¬INPUTLANGS×ÓĿ¼ÏÂÊÇvirtual keyµ½unicodeÓ³Éä±í¡£¾ßÌå×öʱÖ÷ÒªÊǸÄÕâÁ½ÕÅ±í£¬¼ÓÉÏÆäËûһЩ¸¨Öú´úÂë±àÒë³ÉDLL¡£³ý´ËÖ®Í⣬WinCE»¹Ìṩһ¸ö¹¤¾ß (D:\WINCE500\PUBLIC\COMMON\OAK\BIN\I386\kbdgen.exe)£¬¿ÉÒÔ´ÓWindows XPϵͳ¼üÅÌÇý¶¯ÖÐÌáÈ¡Ó³Éä±í¡£±ÈÈçÏÂÃæÃüÁîÉú³É·¨Óï¼üÅÌÓ³Éä±íµÄÔ´´úÂ룺

kbdgen.exe kbdfr.dll -o kbd_040c -i 0000040C

½á¹ûÊä³öÈý¸öÎļþ£º

kbd_040c.reg£º×¢²á±íÎļþ
kbd_040cDL.cpp£ºscan code -> virtual keyÓ³Éä±í
kbd_040cIL.cpp£ºvirtual key -> wide characterÓ³Éä±í

¼üÅÌÇý¶¯ÃûÔÚ×¢²á±íÀï[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Keyboard Layouts]¿ÉÒԲ鵽£¬±ÈÈç·¨ÓïµÄlocaleÊÇ040C£¬ÔÚ0000040c×Ó¼üÏ¿ÉÒÔÕÒµ½Çý¶¯Îªkbdfr.dll¡£

scan codeµ½virtual key£¨¼´device layout£©ÔÚScanCodeToVKeyTableÊý×éÀﶨÒ壬һ°ã²»Óøģº

#define ScanCodeTableFirst  0x00
#define ScanCodeTableLast   0x8f
static UINT8 ScanCodeToVKeyTable[] =
{
    0,      // Scan Code 0x0
    VK_F9,  // Scan Code 0x1
    0,      // Scan Code 0x2
    VK_F5,  // Scan Code 0x3
    VK_F3,  // Scan Code 0x4
    VK_F1,  // Scan Code 0x5
    VK_F2,  // Scan Code 0x6
    VK_F12, // Scan Code 0x7
    0,      // Scan Code 0x8
    VK_F10, // Scan Code 0x9
    VK_F8,  // Scan Code 0xA
    VK_F6,  // Scan Code 0xB

};
 ÓÐʱºòÄã¿ÉÄÜÏëÖªµÀ¼üÅÌÉÏÿ¸ö¼ü¶ÔÓ¦µÄscan code£¬Äã¿ÉÒÔÔÚ¼üÅÌÇý¶¯KeybdPdd_GetEventEx2º¯ÊýÖÐÓÃRETAILMSG°Ñscan code´òÓ¡³öÀ´¡£

¶¨ÖƵÄÖصãÊÇÐÞ¸Ävirtual keyµ½unicodeÓ³Éä±í£¬¼´ aVkToWch1~aVkToWch5µÈ¼¸¸öÊý×飬ŷÖÞÓïÑÔ¼üÅÌ»¹Òª¸ÄaDeadKeyÊý×飬Õ⼸¸öÊý×é¿ØÖƸ÷ÖÖ×éºÏ°´¼üÊä³ö£¬±ÈÈçÓû§°´ÏÂA, Shift+A, Ctrl+Shift+A, Dead key+A£¬·Ö±ðÊä³öʲô¶«Î÷ ¡£

¾ÙÀýÀ´Ëµ£¬±ê×¼ÃÀÓï¼üÅÌSHIFT+2Êä³ö@£¬ÄãÏë¸Ä³ÉÅ·Ôª·ûºÅ€¡£ÏȲé³ö€µÄunicodeֵΪ20AC£¨ÀûÓÃMS OfficeµÄsymbol¶Ô»°¿ò£©£¬È»ºóÐÞ¸ÄaVkToWch2Êý×飺

static VK_TO_WCHARS2 aVkToWch2[] = {
  {'2'          ,0      ,'2'      ,0x20ac      },

};
 Èç¹ûÄãͬʱ»¹ÏëÈÃCTRL+ALT+2Êä³ö¡ì(unicode 00A7)£¬ÄÇôҪ¸ÄaVkToWch5¶ø²»ÊÇaVkToWch2£º

static VK_TO_WCHARS5 aVkToWch5[] = {
  {'2'          ,0 ,'2'      ,0x20ac      ,WCH_NONE ,0x0000   ,0xb9    },

};

Ó³Éä±íµÄÐ޸Ĺý³Ì´óÖÂÈç´Ë¡£ÓÐÁËDLL»¹ÒªÔÚ×¢²á±íÖÐ×öЩÅäÖá£ÔÚplatform.regÖÐÌí¼Ó£º

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts\0000040C]
    "Layout File"="kbd_040c.dll"
    "Layout Text"="French"
    "PS2_AT"="kbd_040c.dll"

Èç¹ûÄãͬʱ֧³ÖÓ¢ÓïºÍ·¨Óï¼üÅÌ£¬¿ÉÒÔ°Ñ·¨ÓïÉèΪµÚ¶þ¼üÅÌ£º
[HKEY_CURRENT_USER\Keyboard Layout\Preload\2]
    @="0000040C"

ÉõÖÁ»¹¿ÉÒÔÉèÖÃÈȼüÔÚÔËÐÐʱÇл»¼üÅÌ£º
;Enabling ALT+SHIFT keyboard layout toggle short cut key
;  "Hotkey"="1" => ALT+SHIFT
;  "Hotkey"="2" => CTRL+SHIFT
;  "Hotkey"="3" => None
; The toggle key is disabled even if the key is not defined.
[HKEY_CURRENT_USER\keyboard layout\toggle]
    "Hotkey"="1"

¹²1 Ìõ¼Ç¼, ÿҳÏÔʾ 10 Ìõ, ҳǩ: [1]

Copyright © 2000 - 2009 Êﺣ½ÌÓý¼¯ÍÅ
Powered By Êﺣ½ÌÓý¼¯ÍÅ Version 2.2
Processed in .01563 s, 2 queries.