Is there a way to switch on and switch off the num lock (alt + aA) keys programmatically in BlackBerry. There is a method set开发者_Python百科Mode() in KeyPad class would that help?
Keypad.setMode(mode) - internal method for keyboard mode indicator update (ex 0 - none, 1 - numeric, 2 - alphabets).
You can use something like
class NLEditField extends EditField {
 boolean mNumlockOn = false;
 protected boolean keyChar(char key, int status, int time) {
  if (mNumlockOn)
   key = Keypad.getAltedChar(key);  
  return super.keyChar(key, status, time);
 }
}
By using the net.rim.device.api.ui.component.BasicEditField, or subclasses, or any widget that allows you to set a net.rim.device.api.ui.text.TextFilter you can specify complex input semantics that will interpret the key presses in context of the type of input you desire: INTEGER, NUMERIC, UPPERCASE, EMAIL, URL, etc.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论