* Some SyncTERM / EtherTerm key support for new key system

* Break long words for word wrap if required
* Lots of cursor movement improvements for MultiLineEditText2
* Code cleanup
This commit is contained in:
Bryan Ashby 2015-06-06 00:33:59 -06:00
parent f2a61828aa
commit feab2e0233
6 changed files with 99 additions and 197 deletions

View file

@ -19,14 +19,12 @@ function ButtonView(options) {
util.inherits(ButtonView, TextView);
ButtonView.prototype.onKeyPress = function(key, isSpecial) {
ButtonView.super_.prototype.onKeyPress.call(this, key, isSpecial);
// allow spacebar to 'click' buttons
// :TODO: need to check configurable mapping here
if(' ' === key) {
ButtonView.prototype.onKeyPress = function(ch, key) {
if(' ' === ch) {
this.emit('action', 'accept');
}
ButtonView.super_.prototype.onKeyPress.call(this, ch, key);
};
ButtonView.prototype.getData = function() {