Custom Soft Input Panel (SIP) for Pocket PC


As this is my first post on the WindowsMobile blog an introduction is probably in order: My name is Marcus Perryman and I have worked for Microsoft in the UK for 8 years now. The last 5 years have been concentrating on Pocket PC development (also WindowsCE, XPe and for the last couple of years, Smartphone), providing advice on mobile app development to customers across Europe. I have my own blog here, but James Pratt invited me to cross post onto this alias so I thought I would give it a try! 

 

SIP - Soft Input Panel is the term used to describe the popup software keyboard provided on Pocket PC devices to simplify input. SIP's are generally 80 pixels high and shown at the bottom of the screen just above the menu bar.

'Can I write and install a custom SIP?' - I haven't had this question for some time so I thought it would be interesting to post about it. This was one of my very first bits of code for Pocket PC way back in 2000 and it still works now: ok, so I had to rebuild the project structure around it to support eVC 4.0, but no code changes. Right now you can only write custom SIP panels in native C++ code, and I would recommend using ATL as it will provide all the nasty COM plumbing for you (plus I always like to see lots of multiple inheritance in my code - makes me feel superior 🙂 ).

Soft Input Panels are just COM objects that implement the IInputMethod interface and optionally the IInputMethod2 interface. Check out this MSDN article for more detailed information on the interface methods. The component registration is done by adding a new string value to the class registration details: CLSID\{MYGUID}\IsSIPInputMethod="1". No need to reboot the device, just go into setings|Personal|Input and select the new input method from the list.

I have put my sample project in zip form up here (code is provided "AS IS" with no warranties, and confer no rights). You will need EVC 4.0 (SP2 to target Pocket PC 2003, SP3 to target PPC 2003 Second Edition) installed on your dev machine to compile this. It works just as well in the emulator. There are a couple of minor drawing issues with the code I have seen, maybe I will get round to fixing them up sometime.

Marcus


Comments (59)

  1. Mike Dimmick says:

    The Pocket PC 2002 and 2003 SDKs come with the Dvorak SIP sample in SamplesATLDvoraksip. Combined with the information and sample in Doug Boling's Programming Windows CE, Third Edition, I was able to successfully implement a SIP input method.

    Gratuitous plug: http://www.handango.com/PlatformProductDetail.jsp?productId=92315. Not pretty, nor a particularly good repertoire, but you can use it with a finger, and that's what matters to our customers.

    It probably doesn't work too well with VGA devices, though!

  2. Marcus says:

    Good point about the VGA device Mike:

    Because the SIP dll is loaded by a system process there is no dot pitch emulation taking place so your SIP panel will show 'real' pixel sizes on a VGA device. So in my example code it will show a very small calculator panel justified bottom left. To deal with VGA will require a small amount of code to detect dot pitch / resolution, and a bunch more resources at the higher dot pitch.

    I will try and grab some time to update the calc sample for HiRes...

    Marcus

  3. Bahadir says:

    Hi,

    i want to develop my SIP with C#.

    Is it possible?

    But i want to create my SIP like a nokia phone.

  4. marcpe says:

    Bahadir,

    No you can’t develop the SIP replacement in C#, it has to be in native code. This is because your SIP DLL needs to be loaded by a system process and that process in turn is a native component. Compact Framework can not currently be hosted by another process in this way, so you must use a native code compiler like C++ to build your SIP.

    Marcus

  5. Justin says:

    I just got my lovely new T-Mobile MDA Vario (aka HTC Wizard) a few  weeks ago, moving myself out of the land of WM 2003 into WM 5.  So far, it is a welcome improvement, except...

    I can't get ANY 3rd party SIPs to work on this thing!  They install, and they appear on the SIP menu (although that menu takes FOREVER to display).  However, as soon as I select a SIP I've installed, it will not work, but simply reverts to the default keyboard SIP.

    Clearly something on the device is messed up, as it has been doing this since the day I got it.

    Did a DLL or registry setting get corrupted?   What gives?

  6. Tom says:

    Testing

    MIS

  7. Suzuki says:

    I was able to try out a bunch of third-party SIPs on my HTC Wizard (Cingular 8125). However, the input menu slowed waaay down as soon as I started loading these things. Other users with HTC Wizard devices report similar problems, as on the Resco Keyboard Pro forum. However, my problems were caused by other programs, and Resco KP didn't make them any worse. I am a little suspicious of the HTC Phone Pad Input SIP, which is probably common to all HTC Wizards....

    Most alternative SIP's load without much trouble--after a few resets, they're usually good to go. However, none of them uninstall cleanly. Even the best-behaved (Resco Keyboard Pro) required me to hunt down files, delete them manually, and do several resets. Surprisingly (to me), the most stubborn of all was Fitaly....

    (For the record, Resco KP gives users of the "modder" variety an easy way to design keyboard look, layout, and keyshapes from the ground up--i.e., it does much more than advertised. Its primary drawbacks are lack of predictive text and no two-byte character support....)

    Speaking of which, I sure wish there were a Japanese IME for English WM5--Bagoj IME sort of works, but on my device, it acts weird, generating multiple floating language bars, (one per program?) And CE-Star for WM5 might be good for Chinese, but is, (at least aesthetically), unacceptable for Japanese. I have installed "Let's Japan No.5" from that nut Asukal--this gem lets me view Japanese in a decent font (MS Gothic)....

  8. E Wiebe says:

    PDA (Pocket PC) and Windows Mobile 5.0

    Visual Studio 2005

    Build your SIP for WM5  -> copy and register SIP -> restart PDA -> write a small Program with function SipSetCurrentIM(MyClsid_of_SIP)->It will not change.

  9. Faruq says:

    Hello!

    My device Qtek S200,I work By interkey keyboard.

    Please help me How can I set interkey as default?

    I tried easy tweak and tweak2k2,but sorry don't work.

  10. Faruq says:

    Hello!

    My device Qtek S200,I work By interkey keyboard.

    Please help me How can I set interkey as default?

    I tried easy tweak and tweak2k2,but sorry don't work.

  11. CriitySizer says:

    Shame with all your "knowledge" you could not answer a simple question about why other keyboards won't work in WM5!

  12. SIPtyper says:

    Phraze-It® is a finger typing on-screen keyboard for Pocket PCs that works with the Pocket PC SIP. Phraze-It® has large typing keys and enough text display area to display several lines of text that have been entered for review and editing. You can type with your index fingers, or thumb with one hand or two.

    It is a full function keyboard that provides the functionality of a computer keyboard to the Pocket PC. Phraze-It® also features keystroke reduction, 8 keyboard layouts and supports 7 languages. The premium version comes bundled with the Phraze-It® Game for decoding over 1,000 word puzzles. Phraze-It®  supports VGA and works with Pocket PC 2003 and Windows Mobile (r) 5 versions.

  13. josh neal says:

    Since you work for MS, can you tell me whether it would be possible to transfer the ime from the chinese pocket pc os to english os. from looking at a friends chinese pocket pc i feel like that ime is far better than any third party one that i have seen...

  14. eXilius333 says:

    I'm also curious if you can transfer the Chinese IME because I am in need of it on my English PPC... it's VERY powerful

  15. joannaex says:

    It seems that no matter what value I set to the HKCUControl PanelSIPDefault IM, after AKU2, WM5 completely ignores this setting.  This is really annoying since I cannot seem to set the default SIP to the one of my choice. (no selecting it from the input methods didn't fly well either)

    So the question is exactly what is WM5 using now to define the defaultIM??? Please this is driving me nuts!

    Joanna

  16. AndreyB says:

    I need to send a string into the input buffer, so any program, which has an input focus, can read the input. It's not exactly about custom SIP, but quite close.

    Could anyone advise me on this topic?

    chatlove@ukr.net

  17. MikeCal says:

    Sorry to anyone asking SIP questions.  I don't know much of anything about the SIP.  But I do know an answer to Andrey's question.  

    Andrey, the easiest way to do what you want is to simulate keypresses.  There are two APIs for doing this, and you can find more information about them in the SDK docs.

    keybd_event

    This lets you send VK_ codes and is useful for commands that don't require letters to show up in a text box (arrow keys, softkeys, etc).  Basically, if the application needs to get a WM_KEYDOWN/WM_KEYUP this API will let you send it.  (Note that you can set the bScan parameter 0.  We don't use scan codes on CE.)

    PostKeybdMessage

    This lets you send both VK_ codes and Unicode characters.  That lets you send text strings.  The application will get both WM_KEYDOWN/WM_KEYUP and WM_CHAR messages.  So I think this is the api you really want.  

    Mike

  18. AndreyB says:

    Thanks Mike!

  19. joannaex says:

    Anyone care to venture a guess? Any guess?

  20. Try finger typing or thumbing input on the Phraze-It keyboard for the Pocket PC. Phraze-It (r) includes 8 keyboard layouts for easy, comfortable, efficient and accurate finger typing right on your Pocket PC. You input while standing, sitting or even walking with one hand or two.

    Phraze-it (R) is a full-functionality soft keyboard that enables you to finger type on full size on-screen keys, yet the Phraze-It keyboard only takes up a fraction of the Pocket PC screen, allowing you to read and edit many lines of text. Its great for one-handed thumbing or one or two finger typists.

    Phraze-It is a great keyboard that lets type on the go by extending the input capabilities of your PC to your Pocket PC.

  21. Karo says:

    Hi

    I've made a custom SIP that is 90 wide and 90 high, displayed in the lower right corner (not resizing the screen). On PPC2003 the area on left of the SIP was seethrough. With PPC2003SE and WM5.0 this area is no longer seethrough with my code. What has changed, and how can I fix this.

  22. Luc Tremblay says:

    I'm currently trying to develop a custom SIP for my Axim x51v.

    I got my basic input and bitmap displaying. However, I wish to have 50% of my screen dedicated to my SIP in order to have larger keys. Is that possible or is there a limitation to the SIP size imposed by Windows Mobile 5.0?

  23. rashmi says:

    I have my codebase in smart phone 5.0, can i get the SIP state or EnableChanged event there by any means. As we are planning to keep same codebase, also apart from this proble all other things are just running fine with same cab as that of smartphone in PPC. Please suggest if it is possible or not.

    rashmi

  24. Ravi says:

    Hi, I tried different keyboards and they are all still on my Pocket PC (Dell Axim X51v). And now when I try to select the key board, it takes a while to load all the installed key boards. Is there a way to remove all the keyborads from the list and keep only those that I use.

    Thanks.

    Ravi.

  25. woogyman says:

    I need to find a good soft phones for windows mobile 5.0 can anibody sugest one thanks in advance

  26. safisoft13 says:

    I'm developping a new keyboard for PDA. I'd like to do it in C#, are you sure it is not possible?

    I tried with c++ but ther is not a lot doc on the net. embedded tools 3.0 dosen't work correctly with XP.

    can someone helpe me?

    think's

  27. Tiago Teixeira says:

    How can i disable completly the SIP feature or just hide the icon in my application? For instance, in a splash form there is no need to have a sip icon at the menubar and in other forms as well.

    Any ideas?

    Thanks in adavance,

    Tiago Teixeira

  28. Mark Emery says:

    Hi, I've just FIXED my WM5 SIP problems. With the help of this page: http://wiki.xda-developers.com/index.php?pagename=WM5_Tweaks_Other I was able to find the Registry strings for the NullKB SIP method and remove them. I'd removed the SIP via remove programs, but it hadn't removed the Registry entries. This stopped all other custom SIPs from working.  Now I've cleaned it out I can pick RipBoard or TenGo Free as I wish without problems!

    I hope this helps!

    Regards,

    Mark

  29. Tiago Teixeira says:

    Hi,

    I'll give a look more close to the link you suggested me.

    Thanks for share your experience.

    Best Regards,

    Tiago Teixeira

  30. emerym says:

    Hi,

    I did more testing after the TenGO free SIP failed to load after a soft reset. I've found that if I use all custom SIP's BEFORE getting to the Today Screen they'll work. As I have a password enabled on the PDA this is quick and easy to do. Can any Microsoft people comment? It sounds like some SIP have a problem loading their DLL after today screen is loaded.

    Mark

  31. emerym says:

    I hope this is my last entry! After getting both SIPs working by using them at the password prompt I found that my Softick Card Export II wouldn't load. If I didn't fix the SIPs it would. So it does look like there's a resource starvation issue. I removed the battery and comms mgr icons from the Task Tray as per http://wiki.xda-developers.com/index.php?pagename=Hermes_Registry as I don't use them and can now get all three working fine.

    MS is there a resource that can be monitored? This reminds me of the system (GDI) resource drainage in Win98.

  32. Rio says:

    ..seems that my own sip-panel works now well on CE5, by deleting ThreadModel Variable for InProcServer32 for that CLSID in registry.

  33. ForceFoxFive says:

    Can anyone recommend a SIP for the P3600/SPV M700??? Have been downloading various incarnations of Phone Pad...but to no avial.

  34. Dhiraj says:

    Hi to all,

    I just wanted to know if it is possible to register 2 SIP on the same device. If it is possible then what will be the CLSID of the second SIP?

  35. beny says:

    Affter i install 4 different sip i see all of then in the sip menu list but after loadig 2 of them (they work) but the third not load and i get the defualt keybord !!!

    In HTC device with MUI langague the first didnt load.

    what can i do ????

    (i have 32M free RAM )

  36. andreas1 says:

    As it has been said, that it is not possible to create a custom SIP using .NET.

    Is it possible to use embedded VB?

    How about this article below?

    http://msdn2.microsoft.com/en-us/library/microsoft.windowsce.forms.inputpanel(VS.80).aspx

  37. joule says:

    andreas, that component is used to control the current sip, not to create a new one. With that, you can see the size of the sip, and tell it to open/close, which is quite useful if you need to develop an application that shows lots of info, and only has some editable forms.

  38. donmain says:

    I want my smartphone to support touch panel , Is it possbile to use sip on smartphone 5.0?and how can i use it

  39. 尉迟方 says:

    作者:兔毛猫链接:http://www.2maomao.com/blog/pocketpc-sip-how-to/

    很多人问,写个专帖:

    WindowsMobilePocketPC上暂时还...

  40. Sanjay says:

    Hi Guys,

    I am new to SIP and do not know anythink about it.

    My basic question is: Is it possible to have application specific custom SIP?

    Thanks

    Sanjay

  41. Sandy says:

    Hello,

    Please, how can I resize my SIP in order to have larger keys?

    Thanks,

    Sandy

  42. Wendy says:

    Is it possible to hide SIP button all the time in your app and yet still display the menu? The SHFullScreen can only set the z-order of the SIP button lower than the forground window to hide it. However, only you click on the menu, the SIP button comes back again.

    Thanks

  43. amine says:

    Hello is it possible to move the sip ,because i had problem moving it with the setWindowPos funtion ...!?

  44. Kaustubh Deshpande says:

    Hey,

    I wanted to know whether I can hide SIP Icon

    for some time in my C#.Net application and still displaying the Menu?

    If yes how?

    Please mail me if anyone knows the solution.

    My id is kaustubh123@yahoo.co.in

  45. prathvi says:

    Hello,

    I had downloaded the code & tried to build it. But I couldn't build it.

    The error what i got is Can't convert LPWSTR into unsigned short.

    Can anyone tell me how to use it?

  46. ilan keshet says:

    I'm trying to find a way to block the SIP option triangle icon from appearing on windows mobile 5.

    one of my application demands is that the user could not go out of the application and i am able to 'hack' my way out using the mentioned above method and then accessing the start menu > setting> memory> close all running processes.

    a. how can i prevent access to SIP options and settings?

    b. is the SIP option a built-in part of the SIP or of the operating system?

    ilankeshet_gmail_com

    to contact me swap underscores in Email address with the appropriate punctuality.

    thanks you all

  47. simonjin says:

    how to debug sip, i can't set breakpoint

  48. mjb5406 says:

    I am a user, not a developer, of custom SIPs. I. like a previous poster, am frustrated by the inability to retain a custom SIP setting through a soft reset. I am running Windows Mobile 6.1 on an HTC Touch Diamond. Oddly enough, though, the HTC-supplied custom SIPs (Full QWERTY, Compact QWERTY and Dial Pad) ARE persistent over a soft reset, yet no third-party SIP (i.e. Resco Keyboar Pro or TouchPal) are retained as the default SIP when the device is soft reset. What "magic" is HTC doing to enable its custom SIPs to "stick"? Is it some registry setting, or some certificate setting. or merely some "agreement" with Microsoft's developers that WM won't replace the HTC custom SIPs with the default keyboard, but will with anyone elses? This is very frustrating since the HTC keyboards are, by and large, not the best finger-touch solution available. After spending abou a week Googling the solution, maybe an answer straight from the source would help. I hope there won't be some "dance around" answer citing confidentiality agreements!

  49. sadeesh says:

    Hi all,

    I am new to this can any one send me sample code for "SIP Dialer"

    please is very urgent

  50. Rahul singh says:

    Hi Marcus ->

    As You are very professional in this area.

    I have a doubt in my application

    Can i launch my application or start my application automatically when an incoming call occurs.

    Please help me out on this

    I need ur help.

  51. rahul here says:

    how to do this programatically or during creation of cab file help me out man

  52. sadeesh says:

    Hi marcus,

       I am new to the windows mobile application,now I want to develop soft phone in windows mobile.

    I having wm5.0,active syn4.0,visual studio2003,and I want to developing in native code

    I know Its possible to develop in native code.

    can you suggest the SIP call flow and please give some documents and sample code for SOFTPHONE.

  53. Eugine says:

    Hi all - I have a problem accessing the soft keyboard on a Touch-Diamond smart phone whereby I have writen a basic application with a few text boxes and deployed it to my device, I have updated the the .Net Framework and the app runs OK but I cannot enter any data as the soft keyboard isn't available.

    I am a newbe to all this and I am using VB.Net 2003 and I need a solution in VB - can any one help please?

  54. Problems with SIP says:

    Hello!

    I use a tablet and I can only use the input panel when I'm browsing to a catalog or file. So i can't use it in any applications, what could be the trouble?

  55. Please,

    How to change the position of the SIP to up, not bottom?

    Thanks

    darioajr@gmail.com

  56. Please,

    How to change the position of the SIP to up, not bottom?

    Thanks

    darioajr@gmail.com

  57. arothor2 says:

    u said earlier (jan 08)that u cant use c# to create and use a keyboard on a mobile using sip is it still true 2day??

Skip to main content