Interface SpecialKeys


  • public interface SpecialKeys
    SpecialKeys is an interface containing values for special keys and modifiers.

    Below is an example of SpecialKeys being used.

     public void onEvent(Event event)
     {
      if (event.type == KeyEvent.SPECIAL_KEY_PRESS)
      {
         KeyEvent ke = (KeyEvent)event;
         if ((ke.modifiers & SpecialKeys.CONTROL) != 0)
            ... control key was held down
         if (ke.key == SpecialKeys.PAGE_DOWN)
            ... page down key pressed
         if (ke.key == SpecialKeys.PAGE_UP)
            ... page up key pressed
     
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ACTION
      Valid only on WindowsCE.
      static int ALT
      modifier for alt key
      static int BACKSPACE
      special key.
      static int CALC
      CALC button under PalmOS, NOTES button under WindowsCE
      static int CLOCK
      Valid only on PalmOS
      static int COMMAND
      special key
      static int CONTRAST
      Valid only on PalmOS
      static int CONTROL
      modifier for control key
      static int DELETE
      special key
      static int DOWN
      special key
      static int END
      special key.
      static int ENTER
      special key.
      static int ESCAPE
      special key
      static int F1
      Used on some Windows CE devices.
      static int F10
      Used on some Windows CE devices.
      static int F11
      Used on some Windows CE devices.
      static int F12
      Used on some Windows CE devices.
      static int F13
      Used on some Windows CE devices.
      static int F14
      Used on some Windows CE devices.
      static int F15
      Used on some Windows CE devices.
      static int F16
      Used on some Windows CE devices.
      static int F17
      Used on some Windows CE devices.
      static int F18
      Used on some Windows CE devices.
      static int F19
      Used on some Windows CE devices.
      static int F2
      Used on some Windows CE devices.
      static int F20
      Used on some Windows CE devices.
      static int F3
      Used on some Windows CE devices.
      static int F4
      Used on some Windows CE devices.
      static int F5
      Used on some Windows CE devices.
      static int F6
      Used on some Windows CE devices.
      static int F7
      Used on some Windows CE devices.
      static int F8
      Used on some Windows CE devices.
      static int F9
      Used on some Windows CE devices.
      static int FIND
      Valid only on PalmOS
      static int HARD1
      Also used in Smartphones
      static int HARD2
      Also used in Smartphones
      static int HARD3
      special key
      static int HARD4
      special key
      static int HOME
      special key
      static int INSERT
      special key
      static int KEYBOARD
      special key
      static int KEYBOARD_123
      Pressed 123 in Palm OS or case convertion in Smartphones
      static int KEYBOARD_ABC
      Pressed abc in Palm OS, and the ALT key in Treo 600.
      static int LAUNCH
      Valid only on PalmOS
      static int LEFT
      special key
      static int MENU
      special key
      static int PAGE_DOWN
      special key
      static int PAGE_UP
      special key
      static int POWER_ON
      The device was turned off and now on while the application was running.
      static int RIGHT
      special key
      static int SCREEN_CHANGE
      Screen change: can be a rotation or a collapse/expand.
      static int SHIFT
      modifier for shift key
      static int SYNC
      Valid only on PalmOS.
      static int SYSTEM
      modifier used in Android that states the key came from a trusted part of the system (ie, physical keyboard)
      static int TAB
      special key
      static int UP
      special key