diff --git a/jssrc/term_input.js b/jssrc/term_input.js
index 2d4277f..2224a32 100644
--- a/jssrc/term_input.js
+++ b/jssrc/term_input.js
@@ -22,6 +22,7 @@ var Input = (function() {
mt_click: false,
mt_move: false,
no_keys: false,
+ crlf_mode: false,
};
/** Send a literal message */
@@ -53,7 +54,7 @@ var Input = (function() {
var keymap = {
'tab': '\x09',
'backspace': '\x08',
- 'enter': '\x0d',
+ 'enter': opts.crlf_mode ? '\x0d\x0a' : '\x0d',
'ctrl+enter': '\x0a',
'esc': '\x1b',
'up': ca('\x1bOA', '\x1b[A'),
@@ -205,11 +206,12 @@ var Input = (function() {
sendString: sendStrMsg,
/** Enable alternate key modes (cursors, numpad, fn) */
- setAlts: function(cu, np, fn) {
- if (opts.cu_alt != cu || opts.np_alt != np || opts.fn_alt != fn) {
+ setAlts: function(cu, np, fn, crlf) {
+ if (opts.cu_alt != cu || opts.np_alt != np || opts.fn_alt != fn || opts.crlf_mode != crlf) {
opts.cu_alt = cu;
opts.np_alt = np;
opts.fn_alt = fn;
+ opts.crlf_mode = crlf;
// rebind keys - codes have changed
_bindFnKeys();
diff --git a/jssrc/term_screen.js b/jssrc/term_screen.js
index a20a5c8..bfbc4ad 100644
--- a/jssrc/term_screen.js
+++ b/jssrc/term_screen.js
@@ -226,15 +226,15 @@ var Screen = (function () {
// console.log("Cursor at ",num, num2);
// Attributes
- num = parse2B(str, i); i += 2; // fg bg attribs
+ num = parse3B(str, i); i += 3;
cursor.hidden = !(num & (1<<0)); // DEC opt "visible"
cursor.hanging = !!(num & (1<<1));
- // console.log("Attributes word ",num.toString(16)+'h');
Input.setAlts(
!!(num & (1<<2)), // cursors alt
!!(num & (1<<3)), // numpad alt
- !!(num & (1<<4)) // fn keys alt
+ !!(num & (1<<4)), // fn keys alt
+ !!(num & (1<<12)) // crlf mode
);
var mt_click = !!(num & (1<<5));
@@ -250,6 +250,8 @@ var Screen = (function () {
$('.x-term-conf-btn').toggleClass('hidden', !show_config_links);
$('#action-buttons').toggleClass('hidden', !show_buttons);
+ // bits 9-11 are cursor shape (not implemented)
+
fg = 7;
bg = 0;
attrs = 0;
diff --git a/lang/en.php b/lang/en.php
index 3e63611..e099ce2 100644
--- a/lang/en.php
+++ b/lang/en.php
@@ -51,6 +51,7 @@ return [
'term.default_fg_bg' => 'Text / background',
'term.buttons' => 'Button labels',
'term.theme' => 'Color scheme',
+ 'term.cursor_shape' => 'Cursor style',
'term.parser_tout_ms' => 'Parser timeout',
'term.display_tout_ms' => 'Redraw delay',
'term.display_cooldown_ms' => 'Redraw cooldown',
@@ -58,8 +59,16 @@ return [
'term.show_config_links' => 'Show nav links',
'term.show_buttons' => 'Show buttons',
'term.loopback' => 'Local Echo',
+ 'term.crlf_mode' => 'Enter sends CR+LF',
'term.button_msgs' => 'Button codes
(ASCII, dec, CSV)',
+ 'cursor.block_blink' => 'Block, blinking',
+ 'cursor.block_steady' => 'Block, steady',
+ 'cursor.underline_blink' => 'Underline, blinking',
+ 'cursor.underline_steady' => 'Underline, steady',
+ 'cursor.bar_blink' => 'I-bar, blinking',
+ 'cursor.bar_steady' => 'I-bar, steady',
+
// terminal color labels
'color.0' => 'Black',
'color.1' => 'Red',
diff --git a/pages/cfg_term.php b/pages/cfg_term.php
index 5f38f25..10ed719 100644
--- a/pages/cfg_term.php
+++ b/pages/cfg_term.php
@@ -108,6 +108,18 @@
+