com.jniwrapper.win32.ie
Class KeyFilter.KeyEvent

java.lang.Object
  extended by com.jniwrapper.win32.ie.KeyFilter.KeyEvent
Enclosing interface:
KeyFilter

public static class KeyFilter.KeyEvent
extends java.lang.Object

Key pressed event.


Constructor Summary
KeyFilter.KeyEvent(int keyCode)
          Creates key event by key code.
KeyFilter.KeyEvent(com.jniwrapper.win32.Msg msg)
          Creates key event by message.
 
Method Summary
 int getKeyCode()
          Returns key code.
 int getRepeatCount()
          Specifies the repeat count for the current message.
 int getScanCode()
          Returns key scan code.
 boolean isAltPressed()
          Returns true if ALT key is pressed during key event.
 boolean isControlPressed()
          Returns true if control is pressed during key event.
 boolean isExtended()
          Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard.
static boolean isPressed(int virtualKey)
          Returns true if specified key is pressed
 boolean isShiftPressed()
          Returns true if shift is pressed during key event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyFilter.KeyEvent

public KeyFilter.KeyEvent(int keyCode)
Creates key event by key code.

Parameters:
keyCode - key code

KeyFilter.KeyEvent

public KeyFilter.KeyEvent(com.jniwrapper.win32.Msg msg)
Creates key event by message.

Parameters:
msg - event message
Method Detail

getKeyCode

public int getKeyCode()
Returns key code.

Returns:
key code

isControlPressed

public boolean isControlPressed()
Returns true if control is pressed during key event.

Returns:
true if control pressed

isShiftPressed

public boolean isShiftPressed()
Returns true if shift is pressed during key event.

Returns:
true if shift pressed

isAltPressed

public boolean isAltPressed()
Returns true if ALT key is pressed during key event.

Returns:
true if ALT is pressed

isPressed

public static boolean isPressed(int virtualKey)
Returns true if specified key is pressed

Parameters:
virtualKey - key
Returns:
true if specified key is pressed

getScanCode

public int getScanCode()
Returns key scan code.

Returns:
key scan code

isExtended

public boolean isExtended()
Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is true if it is an extended key; otherwise, it is false.

Returns:
The value is true if it is an extended key; otherwise, it is false.

getRepeatCount

public int getRepeatCount()
Specifies the repeat count for the current message.

Returns:
the repeat count for the current message