larrypham / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Enter key sends LF instead of CR #402

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Hit the Enter key on the hardware keyboard

What is the expected output? What do you see instead?
Should send \r (0x0d) but it sends \n (0x0a) instead

What version of the product are you using (you can see this by using Menu
-> About in the Host List)?
commit 8ac74bbf10799cbb1e0dadeff275b871b59f6365

What type of system are you trying to connect to?
Linux

If you are able to connect, what is the output of "echo $TERM", "uname -a",
and any other relevant information on the host?
screen, Linux

Please provide any additional information below.

The new logic in 8ac74bb doesn't work right for KEYCODE_ENTER.

event.getUnicodeChar returns 10 for Enter which is non-zero so printing will be 
set to true and the ASCII 10 will be sent literally instead of going through 
the KEYCODE_ENTER handling later in the code.

Possible fix attached

Original issue reported on code.google.com by istvan.m...@gmail.com on 19 Dec 2010 at 1:30

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I think this issue is affecting me when I'm composing an email message in Pine 
or Alpine via ssh, because those email programs interpret ^J (0x0a) as a 
command (to attach a file, or to justify text). Typing Ctrl-M instead of Enter 
works as a workaround, but it's inconvenient.

Original comment by mikemorr.com on 17 Jan 2011 at 5:56

GoogleCodeExporter commented 8 years ago
I hit this same issue using Emacs via SSH and testing various versions with 
'git bisect' revealed that the same commit you mentioned caused my problems too 
(it's a shame I didn't find this issue until afterwards :)

I modified my version by moving the "if (printing) {" block to the very end of 
that method, so all of the checks for special chars take precedence, but I'm 
not sure what the right answer is here.  I'm happy to enlist as a tester if I 
can be of any use, though.

Original comment by mark.h.t...@gmail.com on 18 Sep 2011 at 5:43

GoogleCodeExporter commented 8 years ago
Yeah, this bug is really annoying.  I compiled a version with the suggested 
patch, and things are working well so far.

Original comment by 4WayneD on 17 Oct 2011 at 3:57

GoogleCodeExporter commented 8 years ago
Issue 462 has been merged into this issue.

Original comment by kenny@the-b.org on 20 Oct 2011 at 6:31

GoogleCodeExporter commented 8 years ago
Hi, Id install connectbot on my android 2.2 phone and everything work great but 
when I run my company app the enter key doesnt work. If I work on linux 
everything works great but when I run my company app everything work but the 
enter key. 

Original comment by abel.bra...@gmail.com on 23 Dec 2011 at 6:36

GoogleCodeExporter commented 8 years ago
I wonder if this has anything to do with 
http://code.google.com/p/connectbot/issues/detail?id=436 ?

Original comment by mauso...@gmail.com on 22 Aug 2012 at 11:27

GoogleCodeExporter commented 8 years ago
Same problem for me: using alpine email client under linux is impossible, 
because ^J is mapped to many other functions different from the standard ENTER 
key.

Original comment by giovanni...@gmail.com on 23 Aug 2012 at 4:46

GoogleCodeExporter commented 8 years ago
Switching to Irssi Connectbot fixed this problem. Is Connectbot development 
dead ?

Original comment by giovanni...@gmail.com on 23 Aug 2012 at 5:20