diff options
author | Florrie <towerofnix@gmail.com> | 2018-05-30 23:55:45 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-05-30 23:55:45 -0300 |
commit | 553bbf486e043f206bb8f2c92c943fd688f8fedc (patch) | |
tree | 08366f0c8f9b0624f6b19d4e932fd286a1cab0f1 /ui/form/FocusElement.js | |
parent | f782f7395cd287d4767c1f3ffd20a72a51007595 (diff) |
Un-selectable inputs
Diffstat (limited to 'ui/form/FocusElement.js')
-rw-r--r-- | ui/form/FocusElement.js | 9 |
1 files changed, 8 insertions, 1 deletions
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 } |