You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by "jmuehlner (via GitHub)" <gi...@apache.org> on 2023/08/29 23:39:04 UTC
[GitHub] [guacamole-client] jmuehlner opened a new pull request, #908: GUACAMOLE-1820: Allow newlines within key events.
jmuehlner opened a new pull request, #908:
URL: https://github.com/apache/guacamole-client/pull/908
This change ensures that newlines are rendered within individual key events.
This ensures that, for example, if you type several commands into a terminal, pressing enter after each command, these commands will render on subsequent lines in the key event viewer, rather than being compressed all into a single line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338975000
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -460,91 +253,84 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
* incomplete, as more key events might be processed before the next
* batch starts.
*
- * @returns {Guacamole.KeyEventInterpreter.KeyEventBatch}
+ * @returns {Guacamole.KeyEventInterpreter.KeyEvent[]}
* The current batch of text.
*/
- this.getCurrentBatch = function getCurrentBatch() {
- return currentBatch;
+ this.getEvents = function getEvents() {
+ return parsedEvents;
};
+
};
/**
- * A granular description of an extracted key event, including a human-readable
- * text representation of the event, whether the event is directly typed or not,
- * and the timestamp when the event occured.
+ * A definition for a known key.
*
* @constructor
- * @param {!String} text
- * A human-readable representation of the event.
- *
- * @param {!boolean} typed
- * True if this event represents a directly-typed character, or false
- * otherwise.
- *
- * @param {!Number} timestamp
- * The timestamp from the recording when this event occured.
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
*/
-Guacamole.KeyEventInterpreter.KeyEvent = function KeyEvent(text, typed, timestamp) {
+Guacamole.KeyEventInterpreter.KeyDefinition = function KeyDefinition(template) {
+
+ // Use empty object by default
+ template = template || {};
/**
- * A human-readable representation of the event. If a printable character
- * was directly typed, this will just be that character. Otherwise it will
- * be a string describing the event.
- *
- * @type {!String}
+ * The X11 keysym of the key.
+ * @type {!number}
*/
- this.text = text;
+ this.keysym = parseInt(template.keysym);
/**
- * True if this text of this event is exactly a typed character, or false
- * otherwise.
- *
- * @type {!boolean}
+ * A human-readable name for the key.
+ * @type {!String}
*/
- this.typed = typed;
+ this.name = template.name;
/**
- * The timestamp from the recording when this event occured. If a
- * `startTimestamp` value was provided to the interpreter constructor, this
- * will be relative to start of the recording. If not, it will be the raw
- * timestamp from the key event.
- *
- * @type {!Number}
+ * The value which would be typed in a typical text editor, if any. If the
+ * key is not associated with any typeable value, this will be undefined.
+ * @type {String}
*/
- this.timestamp = timestamp;
+ this.value = template.value;
};
/**
- * A series of intepreted key events, seperated by at least the configured
- * batchSeperation value from any other key events in the recording corresponding
- * to the interpreted key events. A batch will always consist of at least one key
- * event, and an associated simplified representation of the event(s).
+ * A granular description of an extracted key event, including a human-readable
+ * text representation of the event, whether the event is directly typed or not,
+ * and the timestamp when the event occured.
*
* @constructor
- * @param {!Guacamole.KeyEventInterpreter.KeyEvent[]} events
- * The interpreted key events for this batch.
- *
- * @param {!String} simpleValue
- * The simplified, human-readable value representing the key events for
- * this batch.
+ * @param {Guacamole.KeyEventInterpreter.KeyEvent|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
Review Comment:
KeyEvent*?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1310887853
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -424,6 +452,29 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var keyText;
var typed;
+ // If this key should be both printed and rendered
+ if (keyDefinition.value != null && keyDefinition.printAndRender) {
+
+ // The printed name of the key
+ var printedValue = getPrintedKeyName(keyDefinition);
+
+ // The directly rendered value
+ var renderedValue = keyDefinition.value;
+
+ // Display the name first, followed by the value
+ currentBatch.simpleValue += printedValue;
+ currentBatch.simpleValue += renderedValue;
+
+ // Add pair of key events in the same order, with the name
+ // displayed as non-typed to ensure proper styling
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ printedValue, false, relativeTimestap));
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ renderedValue, true, relativeTimestap));
Review Comment:
So currently the `KeyEventIntepreter` is documented to "produce human readable text batches".
It sounds like you're advocating removing all of the rendering logic out of this service (i.e. everything that produces the `text` or `simpleValue` fields, modifier/shortcut tracking, probably even batch separation). This would be probably all move to a service in the webapp.
I think that separation of concerns makes a lot of sense, though I was unsure how much heavy handed I should be in changing the way the interpreter works.
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -424,6 +452,29 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var keyText;
var typed;
+ // If this key should be both printed and rendered
+ if (keyDefinition.value != null && keyDefinition.printAndRender) {
+
+ // The printed name of the key
+ var printedValue = getPrintedKeyName(keyDefinition);
+
+ // The directly rendered value
+ var renderedValue = keyDefinition.value;
+
+ // Display the name first, followed by the value
+ currentBatch.simpleValue += printedValue;
+ currentBatch.simpleValue += renderedValue;
+
+ // Add pair of key events in the same order, with the name
+ // displayed as non-typed to ensure proper styling
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ printedValue, false, relativeTimestap));
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ renderedValue, true, relativeTimestap));
Review Comment:
So currently the `KeyEventIntepreter` is documented to "produce human readable text batches".
It sounds like you're advocating removing all of the rendering logic out of this service (i.e. everything that produces the `text` or `simpleValue` fields, modifier/shortcut tracking, probably even batch separation). This would be probably all move to a service in the webapp.
I think that separation of concerns makes a lot of sense, though I was unsure how heavy handed I should be in changing the way the interpreter works.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338977039
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -460,91 +253,84 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
* incomplete, as more key events might be processed before the next
* batch starts.
*
- * @returns {Guacamole.KeyEventInterpreter.KeyEventBatch}
+ * @returns {Guacamole.KeyEventInterpreter.KeyEvent[]}
* The current batch of text.
*/
- this.getCurrentBatch = function getCurrentBatch() {
- return currentBatch;
+ this.getEvents = function getEvents() {
+ return parsedEvents;
};
+
};
/**
- * A granular description of an extracted key event, including a human-readable
- * text representation of the event, whether the event is directly typed or not,
- * and the timestamp when the event occured.
+ * A definition for a known key.
*
* @constructor
- * @param {!String} text
- * A human-readable representation of the event.
- *
- * @param {!boolean} typed
- * True if this event represents a directly-typed character, or false
- * otherwise.
- *
- * @param {!Number} timestamp
- * The timestamp from the recording when this event occured.
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
*/
-Guacamole.KeyEventInterpreter.KeyEvent = function KeyEvent(text, typed, timestamp) {
+Guacamole.KeyEventInterpreter.KeyDefinition = function KeyDefinition(template) {
+
+ // Use empty object by default
+ template = template || {};
/**
- * A human-readable representation of the event. If a printable character
- * was directly typed, this will just be that character. Otherwise it will
- * be a string describing the event.
- *
- * @type {!String}
+ * The X11 keysym of the key.
+ * @type {!number}
*/
- this.text = text;
+ this.keysym = parseInt(template.keysym);
/**
- * True if this text of this event is exactly a typed character, or false
- * otherwise.
- *
- * @type {!boolean}
+ * A human-readable name for the key.
+ * @type {!String}
*/
- this.typed = typed;
+ this.name = template.name;
/**
- * The timestamp from the recording when this event occured. If a
- * `startTimestamp` value was provided to the interpreter constructor, this
- * will be relative to start of the recording. If not, it will be the raw
- * timestamp from the key event.
- *
- * @type {!Number}
+ * The value which would be typed in a typical text editor, if any. If the
+ * key is not associated with any typeable value, this will be undefined.
+ * @type {String}
*/
- this.timestamp = timestamp;
+ this.value = template.value;
};
/**
- * A series of intepreted key events, seperated by at least the configured
- * batchSeperation value from any other key events in the recording corresponding
- * to the interpreted key events. A batch will always consist of at least one key
- * event, and an associated simplified representation of the event(s).
+ * A granular description of an extracted key event, including a human-readable
+ * text representation of the event, whether the event is directly typed or not,
+ * and the timestamp when the event occured.
*
* @constructor
- * @param {!Guacamole.KeyEventInterpreter.KeyEvent[]} events
- * The interpreted key events for this batch.
- *
- * @param {!String} simpleValue
- * The simplified, human-readable value representing the key events for
- * this batch.
+ * @param {Guacamole.KeyEventInterpreter.KeyEvent|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
Review Comment:
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338981462
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -283,7 +180,8 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var name = String.fromCharCode(codepoint);
// Create and return the definition
- return new KeyDefinition({keysym: keysym, name: name, value: name, modifier: false});
+ return new Guacamole.KeyEventInterpreter.KeyDefinition({
+ keysym: keysym, name: name, value: name, modifier: false});
Review Comment:
`Guacamole.KeyEventInterpreter.KeyDefinition` does not appear to have a `modifier` property that would be copied from this template (though such a property does seem handy).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338987440
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -283,7 +180,8 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var name = String.fromCharCode(codepoint);
// Create and return the definition
- return new KeyDefinition({keysym: keysym, name: name, value: name, modifier: false});
+ return new Guacamole.KeyEventInterpreter.KeyDefinition({
+ keysym: keysym, name: name, value: name, modifier: false});
Review Comment:
Oops, indeed it doesn't. Removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1310671242
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -96,6 +96,21 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
*/
this.modifier = template.modifier || false;
+ /**
+ * Whether this key should always be printed by name AND rendered
+ * directly, if directly typed. Any directly-typed key that has this
+ * flag set to true will result in the value of the key being rendered
+ * directly, followed by the name being printed as if it was a
+ * non-printable or non-typed character.
+ *
+ * If the key was not directly typed, this flag will have no effect on
+ * behavior.
+ *
+ * @type {!boolean}
+ * @default false
+ */
+ this.printAndRender = template.printAndRender || false;
Review Comment:
Never mind - I see this is `@private` _and_ only ever feeds into the `simpleText` convenience value. Implementations are still free to do whatever they wish.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338981462
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -283,7 +180,8 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var name = String.fromCharCode(codepoint);
// Create and return the definition
- return new KeyDefinition({keysym: keysym, name: name, value: name, modifier: false});
+ return new Guacamole.KeyEventInterpreter.KeyDefinition({
+ keysym: keysym, name: name, value: name, modifier: false});
Review Comment:
`Guacamole.KeyEventInterpreter.KeyDefinition` does not appear to have a `modifier` property that would be copied from this template.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1310685970
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -424,6 +452,29 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var keyText;
var typed;
+ // If this key should be both printed and rendered
+ if (keyDefinition.value != null && keyDefinition.printAndRender) {
+
+ // The printed name of the key
+ var printedValue = getPrintedKeyName(keyDefinition);
+
+ // The directly rendered value
+ var renderedValue = keyDefinition.value;
+
+ // Display the name first, followed by the value
+ currentBatch.simpleValue += printedValue;
+ currentBatch.simpleValue += renderedValue;
+
+ // Add pair of key events in the same order, with the name
+ // displayed as non-typed to ensure proper styling
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ printedValue, false, relativeTimestap));
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ renderedValue, true, relativeTimestap));
Review Comment:
I don't think individual events should possibly be split into multiple events purely for the sake of rendering, as it's not guacamole-common-js that should dictate that rendering.
I think we should instead settle on a structure that represents both the expected typed result (if any) of a logical event and the keys pressed to produce that result, leaving it up to the implementation to decide how that is ultimately rendered.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1310661211
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -96,6 +96,21 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
*/
this.modifier = template.modifier || false;
+ /**
+ * Whether this key should always be printed by name AND rendered
+ * directly, if directly typed. Any directly-typed key that has this
+ * flag set to true will result in the value of the key being rendered
+ * directly, followed by the name being printed as if it was a
+ * non-printable or non-typed character.
+ *
+ * If the key was not directly typed, this flag will have no effect on
+ * behavior.
+ *
+ * @type {!boolean}
+ * @default false
+ */
+ this.printAndRender = template.printAndRender || false;
Review Comment:
I'm on the fence regarding this being something `Guacamole.KeyEventInterpreter` should represent and decide. My initial thinking would be that this should be an implementation decision.
Thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338874040
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -460,91 +253,85 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
* incomplete, as more key events might be processed before the next
* batch starts.
*
- * @returns {Guacamole.KeyEventInterpreter.KeyEventBatch}
+ * @returns {Guacamole.KeyEventInterpreter.KeyEvent[]}
* The current batch of text.
*/
- this.getCurrentBatch = function getCurrentBatch() {
- return currentBatch;
+ this.getEvents = function getEvents() {
+ return parsedEvents;
};
+
};
/**
- * A granular description of an extracted key event, including a human-readable
- * text representation of the event, whether the event is directly typed or not,
- * and the timestamp when the event occured.
+ * A definition for a known key.
*
* @constructor
- * @param {!String} text
- * A human-readable representation of the event.
- *
- * @param {!boolean} typed
- * True if this event represents a directly-typed character, or false
- * otherwise.
- *
- * @param {!Number} timestamp
- * The timestamp from the recording when this event occured.
+ * @private
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
*/
-Guacamole.KeyEventInterpreter.KeyEvent = function KeyEvent(text, typed, timestamp) {
+Guacamole.KeyEventInterpreter.KeyDefinition = function KeyDefinition(template) {
+
+ // Use empty object by default
+ template = template || {};
/**
- * A human-readable representation of the event. If a printable character
- * was directly typed, this will just be that character. Otherwise it will
- * be a string describing the event.
- *
- * @type {!String}
+ * The X11 keysym of the key.
+ * @type {!number}
*/
- this.text = text;
+ this.keysym = parseInt(template.keysym);
/**
- * True if this text of this event is exactly a typed character, or false
- * otherwise.
- *
- * @type {!boolean}
+ * A human-readable name for the key.
+ * @type {!String}
*/
- this.typed = typed;
+ this.name = template.name;
/**
- * The timestamp from the recording when this event occured. If a
- * `startTimestamp` value was provided to the interpreter constructor, this
- * will be relative to start of the recording. If not, it will be the raw
- * timestamp from the key event.
- *
- * @type {!Number}
+ * The value which would be typed in a typical text editor, if any. If the
+ * key is not associated with any typeable value, this will be undefined.
+ * @type {String}
*/
- this.timestamp = timestamp;
+ this.value = template.value;
};
/**
- * A series of intepreted key events, seperated by at least the configured
- * batchSeperation value from any other key events in the recording corresponding
- * to the interpreted key events. A batch will always consist of at least one key
- * event, and an associated simplified representation of the event(s).
+ * A granular description of an extracted key event, including a human-readable
+ * text representation of the event, whether the event is directly typed or not,
+ * and the timestamp when the event occured.
*
* @constructor
- * @param {!Guacamole.KeyEventInterpreter.KeyEvent[]} events
- * The interpreted key events for this batch.
- *
- * @param {!String} simpleValue
- * The simplified, human-readable value representing the key events for
- * this batch.
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
*/
-Guacamole.KeyEventInterpreter.KeyEventBatch = function KeyEventBatch(events, simpleValue) {
+Guacamole.KeyEventInterpreter.KeyEvent = function KeyEvent(template) {
+
+ // Use empty object by default
+ template = template || {};
/**
- * All key events for this batch.
+ * The key definition for the pressed key.
*
- * @type {!Guacamole.KeyEventInterpreter.KeyEvent[]}
+ * @type {!Guacamole.KeyEventInterpreter.KeyDefinition}
*/
- this.events = events || [];
+ this.definition = template.definition;
Review Comment:
Ah, right you are. It shouldn't be private.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1312305384
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -424,6 +452,29 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var keyText;
var typed;
+ // If this key should be both printed and rendered
+ if (keyDefinition.value != null && keyDefinition.printAndRender) {
+
+ // The printed name of the key
+ var printedValue = getPrintedKeyName(keyDefinition);
+
+ // The directly rendered value
+ var renderedValue = keyDefinition.value;
+
+ // Display the name first, followed by the value
+ currentBatch.simpleValue += printedValue;
+ currentBatch.simpleValue += renderedValue;
+
+ // Add pair of key events in the same order, with the name
+ // displayed as non-typed to ensure proper styling
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ printedValue, false, relativeTimestap));
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ renderedValue, true, relativeTimestap));
Review Comment:
@mike-jumper How does this look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1310661211
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -96,6 +96,21 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
*/
this.modifier = template.modifier || false;
+ /**
+ * Whether this key should always be printed by name AND rendered
+ * directly, if directly typed. Any directly-typed key that has this
+ * flag set to true will result in the value of the key being rendered
+ * directly, followed by the name being printed as if it was a
+ * non-printable or non-typed character.
+ *
+ * If the key was not directly typed, this flag will have no effect on
+ * behavior.
+ *
+ * @type {!boolean}
+ * @default false
+ */
+ this.printAndRender = template.printAndRender || false;
Review Comment:
~I'm on the fence regarding this being something `Guacamole.KeyEventInterpreter` should represent and decide. My initial thinking would be that this should be an implementation decision.~
~Thoughts?~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338994403
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -283,7 +179,8 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var name = String.fromCharCode(codepoint);
// Create and return the definition
- return new KeyDefinition({keysym: keysym, name: name, value: name, modifier: false});
+ return new Guacamole.KeyEventInterpreter.KeyDefinition({
+ keysym: keysym, name: name, value: name);
Review Comment:
```
#17 31.59 [INFO] BUILD FAILURE
#17 31.59 [INFO] ------------------------------------------------------------------------
#17 31.59 [INFO] Total time: 30.193 s
#17 31.59 [INFO] Finished at: 2023-09-27T17:49:53Z
#17 31.59 [INFO] ------------------------------------------------------------------------
#17 31.59 [ERROR] Failed to execute goal com.github.buckelieg:minify-maven-plugin:2.0.1:minify (default-minify) on project guacamole-common-js: java.lang.RuntimeException: JSCompiler errors
#17 31.59 [ERROR] all.js:8606: ERROR - [JSC_PARSE_ERROR] Parse error. '}' expected
#17 31.59 [ERROR] keysym: keysym, name: name, value: name);
#17 31.59 [ERROR] ^
#17 31.59 [ERROR]
#17 31.59 [ERROR] -> [Help 1]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338996361
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -283,7 +179,8 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var name = String.fromCharCode(codepoint);
// Create and return the definition
- return new KeyDefinition({keysym: keysym, name: name, value: name, modifier: false});
+ return new Guacamole.KeyEventInterpreter.KeyDefinition({
+ keysym: keysym, name: name, value: name);
Review Comment:
Oops, sorry. I think my IDE ate that closing brace. Should be fixed now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338997239
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -283,7 +179,8 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var name = String.fromCharCode(codepoint);
// Create and return the definition
- return new KeyDefinition({keysym: keysym, name: name, value: name, modifier: false});
+ return new Guacamole.KeyEventInterpreter.KeyDefinition({
+ keysym: keysym, name: name, value: name);
Review Comment:
😋
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -283,7 +179,8 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var name = String.fromCharCode(codepoint);
// Create and return the definition
- return new KeyDefinition({keysym: keysym, name: name, value: name, modifier: false});
+ return new Guacamole.KeyEventInterpreter.KeyDefinition({
+ keysym: keysym, name: name, value: name);
Review Comment:
😋
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1310889226
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -424,6 +452,29 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var keyText;
var typed;
+ // If this key should be both printed and rendered
+ if (keyDefinition.value != null && keyDefinition.printAndRender) {
+
+ // The printed name of the key
+ var printedValue = getPrintedKeyName(keyDefinition);
+
+ // The directly rendered value
+ var renderedValue = keyDefinition.value;
+
+ // Display the name first, followed by the value
+ currentBatch.simpleValue += printedValue;
+ currentBatch.simpleValue += renderedValue;
+
+ // Add pair of key events in the same order, with the name
+ // displayed as non-typed to ensure proper styling
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ printedValue, false, relativeTimestap));
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ renderedValue, true, relativeTimestap));
Review Comment:
It doesn't look like we've released this code yet, so it seems like it should be ok.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1310671242
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -96,6 +96,21 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
*/
this.modifier = template.modifier || false;
+ /**
+ * Whether this key should always be printed by name AND rendered
+ * directly, if directly typed. Any directly-typed key that has this
+ * flag set to true will result in the value of the key being rendered
+ * directly, followed by the name being printed as if it was a
+ * non-printable or non-typed character.
+ *
+ * If the key was not directly typed, this flag will have no effect on
+ * behavior.
+ *
+ * @type {!boolean}
+ * @default false
+ */
+ this.printAndRender = template.printAndRender || false;
Review Comment:
Never mind - I see this is part of something that's `@private` _and_ only ever feeds into the `simpleText` convenience value. Implementations are still free to do whatever they wish.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1310674524
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -317,6 +332,19 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
}
+ /**
+ * Return a formatted, display-ready name for the provided key definition.
+ *
+ * @param {KeyDefinition} keyDefinition
+ * A key definition to return the formatted name for.
+ *
+ * @returns
+ * The formatted, display-ready name of the provided key definition.
+ */
+ function getPrintedKeyName(keyDefinition) {
Review Comment:
This should be annotated `@private`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338861222
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -424,6 +452,29 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
var keyText;
var typed;
+ // If this key should be both printed and rendered
+ if (keyDefinition.value != null && keyDefinition.printAndRender) {
+
+ // The printed name of the key
+ var printedValue = getPrintedKeyName(keyDefinition);
+
+ // The directly rendered value
+ var renderedValue = keyDefinition.value;
+
+ // Display the name first, followed by the value
+ currentBatch.simpleValue += printedValue;
+ currentBatch.simpleValue += renderedValue;
+
+ // Add pair of key events in the same order, with the name
+ // displayed as non-typed to ensure proper styling
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ printedValue, false, relativeTimestap));
+ currentBatch.events.push(new Guacamole.KeyEventInterpreter.KeyEvent(
+ renderedValue, true, relativeTimestap));
Review Comment:
This looks much better to me.
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -460,91 +253,85 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
* incomplete, as more key events might be processed before the next
* batch starts.
*
- * @returns {Guacamole.KeyEventInterpreter.KeyEventBatch}
+ * @returns {Guacamole.KeyEventInterpreter.KeyEvent[]}
* The current batch of text.
*/
- this.getCurrentBatch = function getCurrentBatch() {
- return currentBatch;
+ this.getEvents = function getEvents() {
+ return parsedEvents;
};
+
};
/**
- * A granular description of an extracted key event, including a human-readable
- * text representation of the event, whether the event is directly typed or not,
- * and the timestamp when the event occured.
+ * A definition for a known key.
*
* @constructor
- * @param {!String} text
- * A human-readable representation of the event.
- *
- * @param {!boolean} typed
- * True if this event represents a directly-typed character, or false
- * otherwise.
- *
- * @param {!Number} timestamp
- * The timestamp from the recording when this event occured.
+ * @private
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
*/
-Guacamole.KeyEventInterpreter.KeyEvent = function KeyEvent(text, typed, timestamp) {
+Guacamole.KeyEventInterpreter.KeyDefinition = function KeyDefinition(template) {
+
+ // Use empty object by default
+ template = template || {};
/**
- * A human-readable representation of the event. If a printable character
- * was directly typed, this will just be that character. Otherwise it will
- * be a string describing the event.
- *
- * @type {!String}
+ * The X11 keysym of the key.
+ * @type {!number}
*/
- this.text = text;
+ this.keysym = parseInt(template.keysym);
/**
- * True if this text of this event is exactly a typed character, or false
- * otherwise.
- *
- * @type {!boolean}
+ * A human-readable name for the key.
+ * @type {!String}
*/
- this.typed = typed;
+ this.name = template.name;
/**
- * The timestamp from the recording when this event occured. If a
- * `startTimestamp` value was provided to the interpreter constructor, this
- * will be relative to start of the recording. If not, it will be the raw
- * timestamp from the key event.
- *
- * @type {!Number}
+ * The value which would be typed in a typical text editor, if any. If the
+ * key is not associated with any typeable value, this will be undefined.
+ * @type {String}
*/
- this.timestamp = timestamp;
+ this.value = template.value;
};
/**
- * A series of intepreted key events, seperated by at least the configured
- * batchSeperation value from any other key events in the recording corresponding
- * to the interpreted key events. A batch will always consist of at least one key
- * event, and an associated simplified representation of the event(s).
+ * A granular description of an extracted key event, including a human-readable
+ * text representation of the event, whether the event is directly typed or not,
+ * and the timestamp when the event occured.
*
* @constructor
- * @param {!Guacamole.KeyEventInterpreter.KeyEvent[]} events
- * The interpreted key events for this batch.
- *
- * @param {!String} simpleValue
- * The simplified, human-readable value representing the key events for
- * this batch.
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
*/
-Guacamole.KeyEventInterpreter.KeyEventBatch = function KeyEventBatch(events, simpleValue) {
+Guacamole.KeyEventInterpreter.KeyEvent = function KeyEvent(template) {
+
+ // Use empty object by default
+ template = template || {};
/**
- * All key events for this batch.
+ * The key definition for the pressed key.
*
- * @type {!Guacamole.KeyEventInterpreter.KeyEvent[]}
+ * @type {!Guacamole.KeyEventInterpreter.KeyDefinition}
*/
- this.events = events || [];
+ this.definition = template.definition;
Review Comment:
`Guacamole.KeyEventInterpreter.KeyDefinition` is marked as `@private`, but this property is public.
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -460,91 +253,85 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
* incomplete, as more key events might be processed before the next
* batch starts.
*
- * @returns {Guacamole.KeyEventInterpreter.KeyEventBatch}
+ * @returns {Guacamole.KeyEventInterpreter.KeyEvent[]}
* The current batch of text.
*/
- this.getCurrentBatch = function getCurrentBatch() {
- return currentBatch;
+ this.getEvents = function getEvents() {
+ return parsedEvents;
};
+
};
/**
- * A granular description of an extracted key event, including a human-readable
- * text representation of the event, whether the event is directly typed or not,
- * and the timestamp when the event occured.
+ * A definition for a known key.
*
* @constructor
- * @param {!String} text
- * A human-readable representation of the event.
- *
- * @param {!boolean} typed
- * True if this event represents a directly-typed character, or false
- * otherwise.
- *
- * @param {!Number} timestamp
- * The timestamp from the recording when this event occured.
+ * @private
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
*/
-Guacamole.KeyEventInterpreter.KeyEvent = function KeyEvent(text, typed, timestamp) {
+Guacamole.KeyEventInterpreter.KeyDefinition = function KeyDefinition(template) {
+
+ // Use empty object by default
+ template = template || {};
/**
- * A human-readable representation of the event. If a printable character
- * was directly typed, this will just be that character. Otherwise it will
- * be a string describing the event.
- *
- * @type {!String}
+ * The X11 keysym of the key.
+ * @type {!number}
*/
- this.text = text;
+ this.keysym = parseInt(template.keysym);
/**
- * True if this text of this event is exactly a typed character, or false
- * otherwise.
- *
- * @type {!boolean}
+ * A human-readable name for the key.
+ * @type {!String}
*/
- this.typed = typed;
+ this.name = template.name;
/**
- * The timestamp from the recording when this event occured. If a
- * `startTimestamp` value was provided to the interpreter constructor, this
- * will be relative to start of the recording. If not, it will be the raw
- * timestamp from the key event.
- *
- * @type {!Number}
+ * The value which would be typed in a typical text editor, if any. If the
+ * key is not associated with any typeable value, this will be undefined.
+ * @type {String}
*/
- this.timestamp = timestamp;
+ this.value = template.value;
};
/**
- * A series of intepreted key events, seperated by at least the configured
- * batchSeperation value from any other key events in the recording corresponding
- * to the interpreted key events. A batch will always consist of at least one key
- * event, and an associated simplified representation of the event(s).
+ * A granular description of an extracted key event, including a human-readable
+ * text representation of the event, whether the event is directly typed or not,
+ * and the timestamp when the event occured.
*
* @constructor
- * @param {!Guacamole.KeyEventInterpreter.KeyEvent[]} events
- * The interpreted key events for this batch.
- *
- * @param {!String} simpleValue
- * The simplified, human-readable value representing the key events for
- * this batch.
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
Review Comment:
`Guacamole.KeyEventInterpreter.KeyEvent`*?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #908:
URL: https://github.com/apache/guacamole-client/pull/908#discussion_r1338870385
##########
guacamole-common-js/src/main/webapp/modules/KeyEventInterpreter.js:
##########
@@ -460,91 +253,85 @@ Guacamole.KeyEventInterpreter = function KeyEventInterpreter(batchSeperation, st
* incomplete, as more key events might be processed before the next
* batch starts.
*
- * @returns {Guacamole.KeyEventInterpreter.KeyEventBatch}
+ * @returns {Guacamole.KeyEventInterpreter.KeyEvent[]}
* The current batch of text.
*/
- this.getCurrentBatch = function getCurrentBatch() {
- return currentBatch;
+ this.getEvents = function getEvents() {
+ return parsedEvents;
};
+
};
/**
- * A granular description of an extracted key event, including a human-readable
- * text representation of the event, whether the event is directly typed or not,
- * and the timestamp when the event occured.
+ * A definition for a known key.
*
* @constructor
- * @param {!String} text
- * A human-readable representation of the event.
- *
- * @param {!boolean} typed
- * True if this event represents a directly-typed character, or false
- * otherwise.
- *
- * @param {!Number} timestamp
- * The timestamp from the recording when this event occured.
+ * @private
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
+ * The object whose properties should be copied within the new
+ * KeyDefinition.
*/
-Guacamole.KeyEventInterpreter.KeyEvent = function KeyEvent(text, typed, timestamp) {
+Guacamole.KeyEventInterpreter.KeyDefinition = function KeyDefinition(template) {
+
+ // Use empty object by default
+ template = template || {};
/**
- * A human-readable representation of the event. If a printable character
- * was directly typed, this will just be that character. Otherwise it will
- * be a string describing the event.
- *
- * @type {!String}
+ * The X11 keysym of the key.
+ * @type {!number}
*/
- this.text = text;
+ this.keysym = parseInt(template.keysym);
/**
- * True if this text of this event is exactly a typed character, or false
- * otherwise.
- *
- * @type {!boolean}
+ * A human-readable name for the key.
+ * @type {!String}
*/
- this.typed = typed;
+ this.name = template.name;
/**
- * The timestamp from the recording when this event occured. If a
- * `startTimestamp` value was provided to the interpreter constructor, this
- * will be relative to start of the recording. If not, it will be the raw
- * timestamp from the key event.
- *
- * @type {!Number}
+ * The value which would be typed in a typical text editor, if any. If the
+ * key is not associated with any typeable value, this will be undefined.
+ * @type {String}
*/
- this.timestamp = timestamp;
+ this.value = template.value;
};
/**
- * A series of intepreted key events, seperated by at least the configured
- * batchSeperation value from any other key events in the recording corresponding
- * to the interpreted key events. A batch will always consist of at least one key
- * event, and an associated simplified representation of the event(s).
+ * A granular description of an extracted key event, including a human-readable
+ * text representation of the event, whether the event is directly typed or not,
+ * and the timestamp when the event occured.
*
* @constructor
- * @param {!Guacamole.KeyEventInterpreter.KeyEvent[]} events
- * The interpreted key events for this batch.
- *
- * @param {!String} simpleValue
- * The simplified, human-readable value representing the key events for
- * this batch.
+ * @param {Guacamole.KeyEventInterpreter.KeyDefinition|object} [template={}]
Review Comment:
Yes!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [guacamole-client] mike-jumper merged pull request #908: GUACAMOLE-1820: Allow newlines within key events.
Posted by "mike-jumper (via GitHub)" <gi...@apache.org>.
mike-jumper merged PR #908:
URL: https://github.com/apache/guacamole-client/pull/908
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org