Class SoKeyboardEvent

    • Constructor Detail

      • SoKeyboardEvent

        public SoKeyboardEvent()
        Constructor.
    • Method Detail

      • setKey

        public void setKey​(SoKeyboardEvent.Keys whichKey)
        Sets which key generated the event.
      • isKeyPressEvent

        public static boolean isKeyPressEvent​(SoEvent e,
                                              SoKeyboardEvent.Keys whichKey)
        Returns whether the passed event is a keyboard press event of the passed key. When SoKeyboardEvent.ANY is passed, this returns true if the event represents a keyboard press of any key.
      • isKeyReleaseEvent

        public static boolean isKeyReleaseEvent​(SoEvent e,
                                                SoKeyboardEvent.Keys whichKey)
        Returns whether the passed event is a keyboard release event of the passed key. When SoKeyboardEvent.ANY is passed, this returns true if the event represents a keyboard release of any key.
      • getPrintableCharacter

        public byte getPrintableCharacter()
        Convenience routine that returns the character representing the key, if it's printable. If not, this returns NULL ('\0').