From 1aff59b62f29796a10834bc2e054d75b5d902c5e Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Sat, 31 Aug 2019 15:36:00 -0500 Subject: [PATCH] keyboard cancel mouse window move/size --- src/jexer/TWindow.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index e0a20734..58195c91 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -608,6 +608,15 @@ public class TWindow extends TWidget { @Override public void onKeypress(final TKeypressEvent keypress) { + if (inWindowMove || inWindowResize) { + // ESC or ENTER - Exit size/move + if (keypress.equals(kbEsc) || keypress.equals(kbEnter)) { + inWindowMove = false; + inWindowResize = false; + return; + } + } + if (inKeyboardResize) { // ESC or ENTER - Exit size/move -- 2.27.0