Emulator softkeys

I recently upgraded to VS 2005 FC1 and now I have a problem. For some reason, the Windows Mobile 5 Emulator's softkeys are mapped to numeric keys. For example, pressing the left softkey while in the home view will result in a '1' being entered instead of display the start menu. Pressing the right softkey will result in a '2'. Pressing the home and back buttons work. Pressing the Green phone button will result in a '3' and the red phone button in a '4'. All the other real numeric buttons appear to be ok.

This only happens with the WM5 emulators (all of them) but the 2003 emulators work fine.

Has anyone seen this and have any idea how to resolve
Thanks,
//Ray


Answer this question

Emulator softkeys

  • Community Builder

    To clear up any confusion, the only thing that is different is the emulator.  If you got SK1/SK2 handling (as hotkeys, anyway) to work in beta2, it still works the same way.  You have to hard reset your emulator image, and to be sure, also exit out of the emulator manager.  Simply clearing the state did nothing here (except waste a few hours of my time on a snipe hunt).  Ever after a hard reset the SKs still generated a '1' and a '2', in a Lawrence Welk fasion, so exit the emulation manager and start from scratch.  I did not de/install any SDK.  I really thought this stuff would have been cleared out before, since everything was uninstalled before putting rc1 on.

  • riwan

    Well, strangely enough, it just started working. Weird.
  • kadir43244

    A year's salary bonus would have been nice. Here is the more detailed information about the keycodes. Between Beta 2 and RC1, I found a bug in the keyboard driver - there was a collision between two different keycodes VK_MATRIX_FN and VK_APP_LAUNCH1. Due to that conflict the soft key 1 on Pocket PC always opened the Start Menu. The key code sequence for that key should be:

    VK_LWIN (down) + VK_APP_LAUNCH1(down/up) + VK_LWIN (up)

    Instead the sequence was interpreted by the driver as:

    VK_LWIN (down) + VK_MATRIX_FN(down/up) + VK_LWIN (up)  = VK_LWIN (down/up)

    Since VK_MATRIX_FN is a special key on SMDK2410 that is used to multiplex between Fx and numeric keys - it does nothing in the above sequence so you end with Start Menu all the time. The fix included both image and emulator updates - a different VK_MATRIX_FN is passed by the emulator and a different code is expected by the image. However old saved states and images still expect the old key code. So the following sequence (which is used for soft key 1 on SP):

    VK_MATRIX_FN(down) + VK_1(down/up) + VK_MATRIX_FN(up)  should be VK_F1(down/up)

    instead becomes VK_1(down/up).

    The only way to see this problem is if you use Beta 2 image or saved state with RC1. Hard reseting the emulator doesn't help because the same image is still loaded. When you install RC1 there are two directories which are not cleared for you:

    "\Documents and Settings\<user name>\Application Data\Microsoft\Device Emulator" (contains user saved state files)

    "\Documents and Settings\<user name>\Local Settings\Application Data\Microsoft\CoreCon\1.0" (contains the user connectivity settings)

    You can delete the contents of these directories or you can use Device Emulator Manager to clear the saved state. Note that you have to restart the emulator after clearing the saved state in order to get the desired effect. The new images contain quite a few fixes other than the keycode, so once you use the new image you'll get these as well.

    ------------------------ Read below this line only if you need the old saved states --------------------------
    If you have a lot vested in the current user saved state and would prefer to use this old saved state for some time that is possible to get the keys working with the RC1 emulator, by causing it to send the old keycode. The algorithm is four steps:

    1) Figure out the VMID of the emulator instance you want to work. For custom platfroms you can do this by openning "\Documents and Settings\<user name>\Local Settings\Application Data\Microsoft\CoreCon\1.0\conman_ds_platform.xsl" and looking for <xsl:element name="DEVICE"> and finding an entry with name that matches the name for your platform.
    Once you have the DEVICE entry look for VMID under it. For stock 2003 platforms here are the VMIDs:
    PPC 2003 - {DE425A95-FBB8-46CB-8DFD-89867130F732}
    SP 2003 - {5F2AD043-32BE-4874-B5B1-B16758EC1B1D}
    2) Backup the new global saved state from "\Documents and Settings\All Users\Application Data\Microsoft\Device Emulator\%VMID%.dess" to another location
    3) Move the old user saved you want to use to the global saved state directory:
    mv  "\Documents and Settings\<user name>\Application Data\Microsoft\Device Emulator\%VMID%.dess"  "\Documents and Settings\All Users\Application Data\Microsoft\Device Emulator\%VMID%.dess"
    4) Configure this emulator entry to send a special command line parameter to change the key code to the old value by adding the following:
    <PROPERTY ID="AdditionalParameters" Protected="false">/funckey 192</PROPERTY>
    to the emulator configuration for that device entry in  "\Documents and Settings\<user name>\Local Settings\Application Data\Microsoft\CoreCon\1.0\conman_ds_platform.xsl". You can add it next to any of the emulator configuration options such as VMID or Zoom.

    Thanks,

    Vladimir




  • CHC1

     Vladimir Fedorov wrote:
    The problem was that you had a user saved state created with Beta 2. The RC emulator sends a different key code that is not recognized by the older images.
    I looked that up in the dictionary, and it had a picture of Homer Simpson next to it.

  • jchau

    I hit it just right - at least the emulator manager has all the images back.  Turns out I zapped

    \Documents and Settings\All Users\Application Data\Microsoft\corecon\1.0

    and maybe shouldn't have (I put it back and it works; I take it out and it doesn't). 

    From the looks of it, though, this is all beta2 stuff, at least going by those dates (or are those dates for rc1 ).  Here's a list, what is not supposed to be there (as in old/stale)

     Directory of C:\Documents and Settings\All Users\Application Data\Microsoft\corecon\1.0

    05 09 17  17:50    <DIR>          .
    05 09 17  17:50    <DIR>          ..
    05 09 17  18:00    <DIR>          1033
    05 09 17  19:50    <DIR>          addons
    04 07 01  02:00               364 conman_ds_addonsinstalled.xsl
    04 07 01  02:00               352 conman_ds_debugger.xsl
    04 07 01  02:00               348 conman_ds_device.xsl
    04 07 01  02:00               342 conman_ds_file.xsl
    04 07 01  02:00               348 conman_ds_osimage.xsl
    04 07 01  02:00               348 conman_ds_package.xsl
    04 07 01  02:00               350 conman_ds_platform.xsl
    04 07 01  02:00               350 conman_ds_property.xsl
    04 07 01  02:00               366 conman_ds_servicecategory.xsl
    04 07 01  02:00               294 conman_ds_typemap.xsl
    05 08 31  01:00            18,690 conman_ds_validator.xsd
    05 08 31  01:00            23,523 emulatorimagetemplate.xsl
    05 08 31  01:00            60,943 rolledsdktemplate.xsl
                  13 File(s)        106,618 bytes


  • Erem

    The files under Device Emulator directory can all be deleted safely if you don't care about old saved state files. The files in C:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\CoreCon\1.0 are part of the per user connectivity datastore. It contains the per user configuration changes that you made via Tools\Options\Devices. The master copy is at C:\Documents and Settings\All Users\Application Data\Microsoft\CoreCon\1.0 and the per user datastore is automatically regenerated if you delete it. Since your per user datastore is from Beta 2, it is a good idea to clear it out unless you have configuration changes that are valuable.

    Thanks,

    Vladimir

  • Jens K. Suessmeyer

    It's not my doing.  I can't change the colors. in any meaning full way.  I normally have Accessibility options to ignore colors, fonts, and whatever else.  When I turn that on, it's black on black, sure enough.  You can probably select the text and get a readable inverse scheme.

    Anyway, I don't know how to fix this colors thing.  Haha!  At the top it says

    normal, 3, Arial, black white

    Why can't I just use plain text, nothing fancy but sure to work


    I can sort of guess what's going on, and it's pretty stupid.  I can change the colors, but only if I select teh text, then change them.  I'm typng this blind right now.


  • Marco Casamento

    The problem was that you had a user saved state created with Beta 2. The RC emulator sends a different key code that is not recognized by the older images. Deleting the saved state takes care of it. In rare instances you may need to reinstall the WM5.0 SDK.

    Thanks,

    Vladimir

  • JavaBoy

    Well it's fubared.  The emulator manager list is empty except for "datastore" and "others" (both empty).  I started up the last project and it threw up a whole lotta messageboxes about "The parameter is incorrect".  It threw up the same lot when I closed the solution.  Maybe I can hit it just right and it'll start working again.  (ho!)
  • Steve Collins

    These all can/should be deleted if I don't care about the old image states  

    I noticed that all the .dess files are gone, but I wasn't looking in corecon for what changed when I reset (from the emulator manager).  This below looks to be more than throw-awayable stuff, though.  All can go without problems

     Directory of C:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\CoreCon\1.0

    05 07 24  02:55    <DIR>          notification
    05 09 17  19:51    <DIR>          .
    05 09 17  19:51    <DIR>          ..
    04 07 01  02:00             8,718 Microsoft.PlatformBuilder.ServiceCategory.xsl
    04 07 01  02:00             2,747 Microsoft.PlatformBuilder.TypeMap.xsl
    04 07 01  02:00             2,820 Microsoft.PlatformBuilder500.servicecategory.xsl
    04 11 07  23:06            43,141 Microsoft.RemoteTools.Packages.xsl
    05 07 15  20:43            45,390 Microsoft.SQLCE.3.0.xsl
    05 08 03  09:51            37,179 Microsoft.NetCF.1.0.xsl
    05 08 24  21:06            72,977 Microsoft.NetCF.2.0.xsl
    05 08 31  01:00             4,245 Microsoft.ServiceCategories.8.0.xsl
    05 08 31  01:00             4,222 Microsoft.TypeMaps.8.0.xsl
    05 08 31  01:00            25,115 Microsoft.VisualStudio.Debugging.8.0.xsl
    05 08 31  01:00             1,221 Microsoft.VisualStudio.ServiceCategories.8.0.xsl
    05 08 31  01:00            10,918 Microsoft.WindowsCE.2.0.xsl
    05 08 31  01:00            59,456 Microsoft.WindowsMobile.PocketPC.2.0.xsl
    05 08 31  01:00            34,241 Microsoft.WindowsMobile.SmartPhone.1.0.xsl
    05 09 17  19:46           199,618 4118C335-430C-497f-BE48-11C3316B135E.xsl
    05 09 17  19:50             3,928 conman_ds_typemap.xsl
    05 09 17  19:50            21,722 conman_ds_debugger.xsl
    05 09 17  19:50               389 conman_ds_device.xsl
    05 09 17  19:50               294 conman_ds_osimage.xsl
    05 09 17  19:50           196,521 conman_ds_package.xsl
    05 09 17  19:50            14,619 conman_ds_servicecategory.xsl
    05 09 17  19:50            67,292 BD0CC567-F6FD-4ca3-99D2-063EFDFC0A39.xsl
    05 09 17  19:51            40,986 conman_ds_file.xsl
    05 09 28  09:35             2,613 conman_ds_addonsinstalled.xsl
    05 09 28  09:35           234,906 conman_ds_platform.xsl
    05 09 28  09:35             1,554 conman_ds_property.xsl
                  26 File(s)      1,136,832 bytes
                   3 Dir(s)  205,650,321,408 bytes free

     


  • Jenga

    The last post is not readable (black text on black background ). After deleting the per user data store (make sure not instances of VS are running at the time), launch VS and it will regenerate the per user datastore. DeviceEmulator manager will not regenerate it.

    Thanks,

    Vladimir

  • 2020

    However, I don't get VK_F23 (0x86) for the action key, not from the emulator joypad, anyway.  WM_KEYDOWN only gets a 0x0D, which I'd expect in the later WM_CHAR, but not the keydown.  I don't know if this is the new plan, a mistake, the emulator image, or what.  The PPC/SP SDKs were installed fresh with the RC1.  I've hard reset the images, and the softkeys are now working as I'd expect (though contrary to the published docs, which say you can't override SK1 and SK2 on PPC), but frankly, the emulator has dropped a few points on my appreciate scale.  Before, I was all for giving them a year's salary bonus, but now I think I'll go with Balmer and just say, "Get back to work." haha
  • Dan Stevens

    >> normal, 3, Arial, black white

    Actually, it was normal, 3, Arial, black, black

    Now, as I look at this one, it says (I have fonts/colors turned off on the browser)

    Nornal, 3, Arial, Color, Black

    Let's see... (or not)

    Well, I enabled fonts/colors again, and it says Normal, 3, VBerdana, Black, Black, at the top.  I have no idea why it oes that, other than I keep my IE BG black (text whote).  I am typui (typing) this blinkd, which is easy to do uintil yo uhave to edit.  haha.

  • Emulator softkeys