From 553bbf486e043f206bb8f2c92c943fd688f8fedc Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 30 May 2018 23:55:45 -0300 Subject: Un-selectable inputs --- ui/form/FocusElement.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ui/form/FocusElement.js') diff --git a/ui/form/FocusElement.js b/ui/form/FocusElement.js index 18f13bf..79a8afc 100644 --- a/ui/form/FocusElement.js +++ b/ui/form/FocusElement.js @@ -25,11 +25,18 @@ module.exports = class FocusElement extends DisplayElement { this.isFocused = false } + get selectable() { + // Should be overridden if you want to make the element unselectable + // (according to particular conditions). + + return true + } + keyPressed(keyBuf) { // Do something with a buffer containing the key pressed (that is, // telnet data sent). Should be overridden in subclasses. // - // Keyboard characters are sent as a buffer in the form of + // Arrow keys are sent as a buffer in the form of // ESC[# where # is A, B, C or D. See more here: // http://stackoverflow.com/a/11432632/4633828 } -- cgit 1.3.0-6-gf8a5