Package xyz.cp74.evdev
Class Event
- java.lang.Object
-
- xyz.cp74.evdev.Event
-
public class Event extends Object
The Event- Author:
- Christian Paul
-
-
Constructor Summary
Constructors Constructor Description Event()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()Get the code of the eventEventTypegetEventType()Get the type of the eventlonggetMicroseconds()Get the microseconds part of the timestamplonggetSeconds()Get the seconds part of the timestampDategetTimestamp()Get the java timestamp of the eventintgetType()Get the type of the eventprotected intgetTypeCode()Get the type and code of the event as one valueprotected static intgetTypeCode(EventType type, int code)Get the type and code of the event as one valueintgetValue()Get the value of the eventbooleanisPressed()Check, if key is pressed.booleanisReleased()Check, if key is released.StringtoString()
-
-
-
Method Detail
-
getType
public int getType()
Get the type of the event- Returns:
- type as Integer
-
getCode
public int getCode()
Get the code of the event- Returns:
- code as Integer
-
getValue
public int getValue()
Get the value of the event- Returns:
- value as Integer
-
getTypeCode
protected static int getTypeCode(EventType type, int code)
Get the type and code of the event as one value- Parameters:
type-code-- Returns:
- typecode
-
getTypeCode
protected int getTypeCode()
Get the type and code of the event as one value- Returns:
- typecode
-
getEventType
public EventType getEventType()
Get the type of the event- Returns:
- type of the event as EventType
-
getSeconds
public long getSeconds()
Get the seconds part of the timestamp- Returns:
- seconds
-
getMicroseconds
public long getMicroseconds()
Get the microseconds part of the timestamp- Returns:
- microseconds
-
getTimestamp
public Date getTimestamp()
Get the java timestamp of the event- Returns:
- timestamp as Date
-
isPressed
public boolean isPressed()
Check, if key is pressed.- Returns:
- true, if key is pressed or value has the value 1
-
isReleased
public boolean isReleased()
Check, if key is released.- Returns:
- true, if key is released or value has the value 0
-
-