Search code examples
.net-3.5buttoncompact-frameworkkeyboardmotorola

How to set "orange button" state on Motorola MC55


What I need is to activate "orange button" when user focus TextBox on the form. Orange button is hardware button to switch from one set of keys to another (on hardware keyboard). In this case I need to switch to numeric keys when TextBox gains focus.

Is there some API to do this? I wasn't able to find one. Or is there a way to push this hardware button programmatically?

The button is on bottom right


Solution

  • You can achieve this using P/Invokes, take a look here: http://msdn.microsoft.com/en-us/library/aa453740.aspx

    You need to find out the CLSID of the 'orange button'-keyset. This can be retrieved using SHSipInfo with SPI_GETCURRENTIM as uiAction (while this keyset is enabled).

    After retreiving this CLSID you can hard-code in your application (note that this will only work for the MC55 and not for other devices!), and set it using SPI_SETCURRENTIM as uiAction.