TWindowBackend
[nikiroo-utils.git] / src / jexer / event / TKeypressEvent.java
index 4243a795821100f585258b82136b1595bebd1eee..32a1615888334439d9d515fdfd9c08c9909bbac7 100644 (file)
@@ -3,7 +3,7 @@
  *
  * The MIT License (MIT)
  *
- * Copyright (C) 2016 Kevin Lamonte
+ * Copyright (C) 2017 Kevin Lamonte
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -89,6 +89,16 @@ public final class TKeypressEvent extends TInputEvent {
             alt, ctrl, shift);
     }
 
+    /**
+     * Create a duplicate instance.
+     *
+     * @return duplicate intance
+     */
+    public TKeypressEvent dup() {
+        TKeypressEvent keypress = new TKeypressEvent(key.dup());
+        return keypress;
+    }
+
     /**
      * Comparison check.  All fields must match to return true.
      *