aboutsummaryrefslogtreecommitdiff
path: root/xP
diff options
context:
space:
mode:
Diffstat (limited to 'xP')
-rw-r--r--xP/public/xP.js21
1 files changed, 17 insertions, 4 deletions
diff --git a/xP/public/xP.js b/xP/public/xP.js
index 64fa542..5dd578d 100644
--- a/xP/public/xP.js
+++ b/xP/public/xP.js
@@ -1013,10 +1013,23 @@ let Input = {
} else if (!event.altKey && !event.ctrlKey && !event.metaKey &&
!event.shiftKey) {
handled = true
- switch (event.keyCode) {
- case 9: success = Input.complete(b, textarea); break
- case 13: success = Input.submit(b, textarea); break
- default: handled = false
+ switch (event.key) {
+ case 'PageUp':
+ Array.from(document.getElementsByClassName('buffer'))
+ .forEach(b => b.scrollBy(0, -b.clientHeight))
+ break
+ case 'PageDown':
+ Array.from(document.getElementsByClassName('buffer'))
+ .forEach(b => b.scrollBy(0, +b.clientHeight))
+ break
+ case 'Tab':
+ success = Input.complete(b, textarea);
+ break
+ case 'Enter':
+ success = Input.submit(b, textarea);
+ break
+ default:
+ handled = false
}
}
if (!success)