Question

I'm using Motorola MC67 with Windows Mobile 6.0 and writing in c# compact framework.

I want to disable the key repeats, so if you press long "enter" for example, i won't get more then one "enter" press. I've searched the Motorola manual, and tried the advice given here, doing:

Registry.SetValue(@"HKCU\ControlPanel\Keybd", "RepeatRate", "1000000");

but with no use.

Can anyone help me?

Just to be clear: I have access to change registry from my code, but even after i change the rate to max possible, it ignore the value in the registry.

Was it helpful?

Solution

If this key is a software button, you can disable the button:

private void btnOK_Clicked(object sender, EventArgs e) {
  btnOK.Enabled = false;
  try {
    // Your code here
  } finally {
    btnOK.Enabled = true;
  }
}

If this is for a physical key on your device, I don't really know how to go in and set the "click rate" (or whatever it is called), but you could try adding a lock around your routine.

private object m_lock = new object();

private void textbox_Changed(object sender, EventArgs e) {
  lock (m_lock) {
    // Your code here
  }
}

I don't know if that would help or not, though. I can't test, because my devices here do not seem to have that same issue.

OTHER TIPS

The hardware keyboard may not care about the registry settings, the hardware drivers are OEM specific.

The RepeatRate is a) much to high (outside specs), b) will take place after a reboot first, c) may control the Software keyboard only.

Here is a long thread that finally comes to a IOCtl solution: http://social.msdn.microsoft.com/Forums/en-US/5f322f80-1dba-477e-a77e-d667e8f2031f/keyboard-repeat-rate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top