X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fevent%2FTKeypressEvent.java;h=bdf5e84283ace79ea5b41f75afdb4c2ef8ab3194;hb=0525b2ed026e0d510fdf23f6d8f4cb4562a17e0b;hp=4243a795821100f585258b82136b1595bebd1eee;hpb=e16dda65585466c8987bd1efd718431450a96605;p=nikiroo-utils.git diff --git a/src/jexer/event/TKeypressEvent.java b/src/jexer/event/TKeypressEvent.java index 4243a79..bdf5e84 100644 --- a/src/jexer/event/TKeypressEvent.java +++ b/src/jexer/event/TKeypressEvent.java @@ -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"), @@ -33,7 +33,7 @@ import jexer.TKeypress; /** * This class encapsulates a keyboard input event. */ -public final class TKeypressEvent extends TInputEvent { +public class TKeypressEvent extends TInputEvent { /** * Keystroke received. @@ -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. *