diff --git a/WHATSNEW.md b/WHATSNEW.md index dcf4af4d..f6dd1fc0 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -10,6 +10,7 @@ This document attempts to track **major** changes and additions in ENiGMA½. For * The `message` arg used by `msg_list` has been deprecated. Please starting using `messageIndex` for this purpose. Support for `message` will be removed in the future. * Added ability to export/download messages. This is enabled in the default menu. See `messageAreaViewPost` in [the default message base template](./misc/menu_templates/message_base.in.hjson) and look for the download options (`@method:addToDownloadQueue`, etc.) for details on adding to your system! * The Gopher server has had a revamp! Standard `gophermap` files are now served along with any other content you configure for your Gopher Hole! A default [gophermap](https://en.wikipedia.org/wiki/Gopher_(protocol)#Source_code_of_a_menu) can be found [in the misc directory](./misc/gophermap) that behaves like the previous implementation. See [Gopher docs](./docs/servers/gopher.md) for more information. +* Default file browser up/down/pageUp/pageDown scrolls description (e.g. FILE_ID.DIZ) ## 0.0.11-beta * Upgraded from `alpha` to `beta` -- The software is far along and mature enough at this point! diff --git a/art/themes/luciano_blocktronics/FBHELP.ANS b/art/themes/luciano_blocktronics/FBHELP.ANS index 5dc95322..08ea5885 100644 Binary files a/art/themes/luciano_blocktronics/FBHELP.ANS and b/art/themes/luciano_blocktronics/FBHELP.ANS differ diff --git a/art/themes/luciano_blocktronics/FBRWSE.ANS b/art/themes/luciano_blocktronics/FBRWSE.ANS index 52db95e0..c2b617db 100644 Binary files a/art/themes/luciano_blocktronics/FBRWSE.ANS and b/art/themes/luciano_blocktronics/FBRWSE.ANS differ diff --git a/core/file_area_list.js b/core/file_area_list.js index a62271ca..12abfd0d 100644 --- a/core/file_area_list.js +++ b/core/file_area_list.js @@ -144,7 +144,10 @@ exports.getModule = class FileAreaList extends MenuModule { }, displayHelp : (formData, extraArgs, cb) => { return this.displayHelpPage(cb); - } + }, + movementKeyPressed : (formData, extraArgs, cb) => { + return this._handleMovementKeyPress(_.get(formData, 'key.name'), cb); + }, }; } @@ -505,6 +508,23 @@ exports.getModule = class FileAreaList extends MenuModule { ); } + _handleMovementKeyPress(keyName, cb) { + const descView = this.viewControllers.browse.getView(MciViewIds.browse.desc); + if (!descView) { + return cb(null); + } + + switch (keyName) { + case 'down arrow' : descView.scrollDocumentUp(); break; + case 'up arrow' : descView.scrollDocumentDown(); break; + case 'page up' : descView.keyPressPageUp(); break; + case 'page down' : descView.keyPressPageDown(); break; + } + + this.viewControllers.browse.switchFocus(MciViewIds.browse.navMenu); + return cb(null); + } + fetchAndDisplayWebDownloadLink(cb) { const self = this; diff --git a/misc/menu_templates/file_base.in.hjson b/misc/menu_templates/file_base.in.hjson index 572abf97..afd497d0 100644 --- a/misc/menu_templates/file_base.in.hjson +++ b/misc/menu_templates/file_base.in.hjson @@ -73,6 +73,7 @@ mci: { MT1: { mode: preview + acceptsFocus: false } HM2: { @@ -152,6 +153,10 @@ keys: [ "?" ] action: @method:displayHelp } + { + keys: [ "down arrow", "up arrow", "page up", "page down" ] + action: @method:movementKeyPressed + } ] }