Cannot Switch the Hangul/English Key By Using the RDP Client (320005)



The information in this article applies to:

  • Microsoft Windows CE .NET Operating System

This article was previously published under Q320005

SYMPTOMS

When you are using a Windows CE .NET RDP client with a Korean language terminal server, the Hangul/English key does not change the input mode of the input method editor (IME). This prevents you from typing Hangul or English characters in the remote program.

CAUSE

The Korean keyboard has two keys that require special consideration in software because they do not generate virtual key codes when they are released. The previous RDP code did not handle this circumstance correctly.

RESOLUTION

A supported fix is now available from Microsoft as Windows CE Core OS QFE . To resolve this problem immediately, search for the keyword "QFE" on the following Microsoft Web site:NOTE: See the "More Information: section for additional manual changes that are necessary.

The English version of this package should have the following file attributes or later:
   Size         File name
   -----------------------------------------------
   7,772,504    020509_armv4i_wce40-q320005.exe
   7,731,544    020509_armv4t_wce40-q320005.exe
   7,768,408    020509_armv4_wce40-q320005.exe
   7,235,928    020509_mips16_wce40-q320005.exe
   7,940,440    020509_mipsii_fp_wce40-q320005.exe
   7,915,864    020509_mipsii_wce40-q320005.exe
   8,132,952    020509_mipsiv_fp_wce40-q320005.exe
   8,104,280    020509_mipsiv_wce40-q320005.exe
   7,391,576    020509_sh3_wce40-q320005.exe
   7,391,576    020509_sh4_wce40-q320005.exe
   6,596,952    020509_x86_wce40-q320005.exe

				
The English version of this fix should contain the following files, with the listed file attributes or later:
   Date         Time  Size          File name    Platform
   ---------------------------------------------------------------
   05-Apr-2002  12:43  3,276,908    Mstsc.lib    armv4\debug
   05-Apr-2002  12:43    192,512    Mstsc.pdb    armv4\debug
   05-Apr-2002  12:42 12,894,534    Mstscax.lib  armv4\debug
   05-Apr-2002  12:42    356,352    Mstscax.pdb  armv4\debug
   05-Apr-2002  12:38  2,005,014    Mstsc.lib    armv4\retail
   05-Apr-2002  12:38    176,128    Mstsc.pdb    armv4\retail
   05-Apr-2002  12:37  7,510,562    Mstscax.lib  armv4\retail
   05-Apr-2002  12:37    331,776    Mstscax.pdb  armv4\retail
   05-Apr-2002  13:02  3,282,224    Mstsc.lib    armv4i\debug
   05-Apr-2002  13:02    192,512    Mstsc.pdb    armv4i\debug
   05-Apr-2002  13:01 12,915,718    Mstscax.lib  armv4i\debug
   05-Apr-2002  13:01    356,352    Mstscax.pdb  armv4i\debug
   05-Apr-2002  12:58  2,008,630    Mstsc.lib    armv4i\retail
   05-Apr-2002  12:58    176,128    Mstsc.pdb    armv4i\retail
   05-Apr-2002  12:56  7,527,354    Mstscax.lib  armv4i\retail
   05-Apr-2002  12:56    331,776    Mstscax.pdb  armv4i\retail
   05-Apr-2002  12:53  3,174,486    Mstsc.lib    armv4t\debug
   05-Apr-2002  12:53    192,512    Mstsc.pdb    armv4t\debug
   05-Apr-2002  12:52 12,288,732    Mstscax.lib  armv4t\debug
   05-Apr-2002  12:52    356,352    Mstscax.pdb  armv4t\debug
   05-Apr-2002  12:48  1,987,168    Mstsc.lib    armv4t\retail
   05-Apr-2002  12:48    176,128    Mstsc.pdb    armv4t\retail
   05-Apr-2002  12:47  7,491,664    Mstscax.lib  armv4t\retail
   05-Apr-2002  12:47    331,776    Mstscax.pdb  armv4t\retail
   05-Apr-2002  13:31  3,048,890    Mstsc.lib    mips16\debug
   05-Apr-2002  13:31    192,512    Mstsc.pdb    mips16\debug
   05-Apr-2002  13:30 12,205,230    Mstscax.lib  mips16\debug
   05-Apr-2002  13:30    356,352    Mstscax.pdb  mips16\debug
   05-Apr-2002  13:26  1,819,304    Mstsc.lib    mips16\retail
   05-Apr-2002  13:26    176,128    Mstsc.pdb    mips16\retail
   05-Apr-2002  13:25  7,097,812    Mstscax.lib  mips16\retail
   05-Apr-2002  13:25    331,776    Mstscax.pdb  mips16\retail
   05-Apr-2002  13:12  3,329,410    Mstsc.lib    mipsii\debug
   05-Apr-2002  13:12    192,512    Mstsc.pdb    mipsii\debug
   05-Apr-2002  13:11 13,400,124    Mstscax.lib  mipsii\debug
   05-Apr-2002  13:11    356,352    Mstscax.pdb  mipsii\debug
   05-Apr-2002  13:07  2,027,304    Mstsc.lib    mipsii\retail
   05-Apr-2002  13:07    176,128    Mstsc.pdb    mipsii\retail
   05-Apr-2002  13:06  7,927,506    Mstscax.lib  mipsii\retail
   05-Apr-2002  13:06    331,776    Mstscax.pdb  mipsii\retail
   05-Apr-2002  13:41  3,330,144    Mstsc.lib    mipsII_fp\debug
   05-Apr-2002  13:41    192,512    Mstsc.pdb    mipsII_fp\debug
   05-Apr-2002  13:40 13,416,068    Mstscax.lib  mipsII_fp\debug
   05-Apr-2002  13:40    356,352    Mstscax.pdb  mipsII_fp\debug
   05-Apr-2002  13:36  2,027,870    Mstsc.lib    mipsII_fp\retail
   05-Apr-2002  13:36    176,128    Mstsc.pdb    mipsII_fp\retail
   05-Apr-2002  13:35  7,942,486    Mstscax.lib  mipsII_fp\retail
   05-Apr-2002  13:35    331,776    Mstscax.pdb  mipsII_fp\retail
   05-Apr-2002  13:22  3,367,070    Mstsc.lib    mipsiv\debug
   05-Apr-2002  13:22    192,512    Mstsc.pdb    mipsiv\debug
   05-Apr-2002  13:20 13,627,610    Mstscax.lib  mipsiv\debug
   05-Apr-2002  13:20    356,352    Mstscax.pdb  mipsiv\debug
   05-Apr-2002  13:17  2,049,708    Mstsc.lib    mipsiv\retail
   05-Apr-2002  13:17    176,128    Mstsc.pdb    mipsiv\retail
   05-Apr-2002  13:16  8,102,302    Mstscax.lib  mipsiv\retail
   05-Apr-2002  13:16    331,776    Mstscax.pdb  mipsiv\retail
   05-Apr-2002  13:51  3,367,804    Mstsc.lib    mipsiv_fp\debug
   05-Apr-2002  13:51    192,512    Mstsc.pdb    mipsiv_fp\debug
   05-Apr-2002  13:49 13,645,888    Mstscax.lib  mipsiv_fp\debug
   05-Apr-2002  13:49    356,352    Mstscax.pdb  mipsiv_fp\debug
   05-Apr-2002  13:46  2,050,286    Mstsc.lib    mipsiv_fp\retail
   05-Apr-2002  13:46    176,128    Mstsc.pdb    mipsiv_fp\retail
   05-Apr-2002  13:45  8,117,484    Mstscax.lib  mipsiv_fp\retail
   05-Apr-2002  13:45    331,776    Mstscax.pdb  mipsiv_fp\retail
   05-Apr-2002  12:24  2,995,730    Mstsc.lib    sh3\debug
   05-Apr-2002  12:24    192,512    Mstsc.pdb    sh3\debug
   05-Apr-2002  12:23 11,663,800    Mstscax.lib  sh3\debug
   05-Apr-2002  12:23    356,352    Mstscax.pdb  sh3\debug
   05-Apr-2002  12:19  1,899,264    Mstsc.lib    sh3\retail
   05-Apr-2002  12:19    176,128    Mstsc.pdb    sh3\retail
   05-Apr-2002  12:18  7,053,384    Mstscax.lib  sh3\retail
   05-Apr-2002  12:18    331,776    Mstscax.pdb  sh3\retail
   05-Apr-2002  12:33  2,995,178    Mstsc.lib    sh4\debug
   05-Apr-2002  12:33    192,512    Mstsc.pdb    sh4\debug
   05-Apr-2002  12:32 11,664,598    Mstscax.lib  sh4\debug
   05-Apr-2002  12:32    356,352    Mstscax.pdb  sh4\debug
   05-Apr-2002  12:29  1,897,640    Mstsc.lib    sh4\retail
   05-Apr-2002  12:29    176,128    Mstsc.pdb    sh4\retail
   05-Apr-2002  12:27  7,044,136    Mstscax.lib  sh4\retail
   05-Apr-2002  12:27    331,776    Mstscax.pdb  sh4\retail
   05-Apr-2002  12:14  2,826,590    Mstsc.lib    x86\debug
   05-Apr-2002  12:14    200,704    Mstsc.pdb    x86\debug
   05-Apr-2002  12:13 10,997,096    Mstscax.lib  x86\debug
   05-Apr-2002  12:13    356,352    Mstscax.pdb  x86\debug
   05-Apr-2002  12:10  1,777,352    Mstsc.lib    x86\retail
   05-Apr-2002  12:10    176,128    Mstsc.pdb    x86\retail
   05-Apr-2002  12:09  6,595,872    Mstscax.lib  x86\retail
   05-Apr-2002  12:09    331,776    Mstscax.pdb  x86\retail
				

MORE INFORMATION

The following entry is also necessary in the Rdp.reg file:

IF LOCALE=0412
; Fill in correct keyboard type and subtype values depending on the keyboard

[HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client]

"Keyboard Type"=dword:8

"Keyboard SubType"=dword:2

"Keyboard FunctionKeys"=dword:c

"Keyboard Layout"="0x00000412"

ENDIF

You may also have to update the keyboard driver that is located in the public\common\oak\csp\HD64465\keymse2\ps2keybd.cpp file if you use a platform that includes it. The following section is the section you have to change. The modified section is delineated by "BEGIN CHANGE"/"END CHANGE" comments.
DEBUGMSG(ZONE_SCANCODES, (TEXT("ps2keybd.cpp: ScanCode: %02X\r\n"), ui8ScanCode));

        if ( ui8ScanCode == 0xf0 )
                {
                tfKeyUp = TRUE;
                }
        else if ( ui8ScanCode == scE0Extended )
                {
                scInProgress = 0xe000;
                }
    else if ( ui8ScanCode == scE1Extended )
                {
                scInProgress = 0xe10000;
                }
    else if ( scInProgress == 0xe10000 )
                {
                scInProgress |= ui8ScanCode << 8;
                }
    else
                {
                scInProgress |= ui8ScanCode;

                if ( ( scInProgress == scPrevious ) && ( tfKeyUp == FALSE ) )
                            {
                            // mdd handles auto-repeat so ignore auto-repeats from keybd
                            RETAILMSG(1, (TEXT("ScanCode:%02X\r\n"), scPrevious));
                            
                            }
                else // Not a repeated key. This is the real thing.
                            {

/* --- BEGIN CHANGE ---

The Korean keyboard has two keys that generate a single scan code when
pressed. The keys do n0t auto-repeat or generate a scan code on release. 
The scan codes are 0xf1 and 0xf2.

If it is one of the Korean keys, drop the previous scan code. If it is not, the earlier test to ignore auto-repeating keys would prevent 
this key from working two times consecutively. This occurs because the key does not generate a scan code on release.
*/ 
                           if ( ( scInProgress == 0xf1 ) ||
                                ( scInProgress == 0xf2 ) )
                                        {

                                        KeyStateFlags = KeyStateDownFlag;
                                        scPrevious = 0;
                                        }
                            else if ( tfKeyUp == TRUE )

                            /* if ( tfKeyUp == TRUE ) */ 
/* --- END CHANGE --- */ 
                                        {

                                        KeyStateFlags = 0;
                                        scPrevious = 0x00000000;
                                        }
                            else
                                        {

                                        KeyStateFlags = KeyStateDownFlag;
                                        scPrevious = scInProgress;
                                        }
                            cEvents = ScanCodeToVKeyEx(scInProgress, KeyStateFlags, VKeyBuf, ScanCodeBuf, KeyStateFlagsBuf);

                            }
                scInProgress = 0;
                tfKeyUp = FALSE;
                }

    v_pp2k -> m_pp2p -> KeybdInterruptEnable();

    return(cEvents);

}
				
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site: For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MinorLast Reviewed:7/22/2003
Keywords:kbbug kbenv kbfix kbQFE kbui KB320005