[pve-devel] [PATCH manager] www: monitor: support page up/down, home/end

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Apr 11 14:25:54 CEST 2016


to scroll the textbox while keeping focus in the inputbox
---

I've been meaning to do this for months now...

 www/manager6/qemu/Monitor.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/www/manager6/qemu/Monitor.js b/www/manager6/qemu/Monitor.js
index cd8e6ec..4a3f37b 100644
--- a/www/manager6/qemu/Monitor.js
+++ b/www/manager6/qemu/Monitor.js
@@ -100,6 +100,14 @@ Ext.define('PVE.qemu.Monitor', {
 				var cmd = f.getValue();
 				f.setValue('');
 				executeCmd(cmd);
+			    } else if (e.getKey() === e.PAGE_UP) {
+				textbox.scrollBy(0, -0.9*textbox.getHeight(), false);
+			    } else if (e.getKey() === e.PAGE_DOWN) {
+				textbox.scrollBy(0, 0.9*textbox.getHeight(), false);
+			    } else if (e.getKey() === e.HOME) {
+				textbox.scrollTo(0, 0, false);
+			    } else if (e.getKey() === e.END) {
+				scrollToEnd();
 			    }
 			}
 		    }
-- 
2.1.4





More information about the pve-devel mailing list