corentin-soriano commented on code in PR #642:
URL: https://github.com/apache/guacamole-server/pull/642#discussion_r2917051922


##########
src/terminal/terminal.c:
##########
@@ -1551,7 +1576,7 @@ static int __guac_terminal_send_key(guac_terminal* term, 
int keysym, int pressed
                 return guac_terminal_send_string(term, backspace_str);
             }
             if (keysym == 0xFF09 || keysym == 0xFF89) return 
guac_terminal_send_string(term, "\x09"); /* Tab */
-            if (keysym == 0xFF0A) return guac_terminal_send_string(term, 
"\x0A");                     /* Line Feed */
+            if (keysym == 0xFF0A) return guac_terminal_send_string(term, 
"\x0D");                     /* Line Feed -> CR */

Review Comment:
   Can we use this existing constant?
   `src/terminal/terminal/terminal.h:395:#define GUAC_TERMINAL_ASCII_CR         
        "\x0D"`



##########
src/protocols/rdp/keyboard.c:
##########
@@ -643,6 +643,11 @@ void guac_rdp_keyboard_update_modifiers(guac_rdp_keyboard* 
keyboard,
 int guac_rdp_keyboard_update_keysym(guac_rdp_keyboard* keyboard,
         int keysym, int pressed, guac_rdp_key_source source) {
 
+    /* Map LF to CR: LF has no RDP equivalent so it would fall through to
+     * UnicodeKeyboardEvent() which maps LF to 'J'. */
+    if (keysym == 0xFF0A)
+        keysym = 0xFF0D;

Review Comment:
   It might be good to define a constant here.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to