Added PAGEUP and PAGEDOWN key movement
This commit is contained in:
parent
8cf3de33c3
commit
8b042b2479
|
@ -142,11 +142,12 @@ func shutdown(err error) {
|
|||
exitCode := 0
|
||||
if err.Error() != "normal" {
|
||||
exitCode = 1
|
||||
} else {
|
||||
println(err.Error())
|
||||
}
|
||||
out := err.(*errors.Error).ErrorStack()
|
||||
log(fmt.Sprintf(out))
|
||||
screen.Fini()
|
||||
println(err.Error())
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
|
||||
|
|
|
@ -140,10 +140,16 @@ export default class FrameBuilder extends BaseBuilder{
|
|||
_handleSpecialKeys(input) {
|
||||
switch (input.key) {
|
||||
case 257: // up arow
|
||||
window.scrollBy(0, -20);
|
||||
window.scrollBy(0, -2 * this.char_height);
|
||||
break;
|
||||
case 258: // down arrow
|
||||
window.scrollBy(0, 20);
|
||||
window.scrollBy(0, 2 * this.char_height);
|
||||
break;
|
||||
case 266: // page up
|
||||
window.scrollBy(0, -this.tty_height * this.char_height);
|
||||
break;
|
||||
case 267: // page down
|
||||
window.scrollBy(0, this.tty_height * this.char_height);
|
||||
break;
|
||||
case 18: // CTRL+r
|
||||
window.location.reload();
|
||||
|
|
Loading…
Reference in a new issue