fxw505645833 / connectbot

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

DPAD_LEFT, RIGHT, UP, DOWN keycodes have no effects #549

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make a new soft keyboard (IME)
(I made a new keyboard for connectBot with escape, tab, and ctrl-keys. 
It is implemented by sending KeyEvent.KEYCODE_DPAD_CENTER to connectBot - no 
problems at all)
2. Make a 'cursor left key' which sends:
getCurrentInputConnection().sendKeyEvent(               new KeyEvent(KeyEvent.ACTION_DOWN, 
KeyEvent.KEYCODE_DPAD_LEFT));
getCurrentInputConnection().sendKeyEvent(               new KeyEvent(KeyEvent.ACTION_UP, 
KeyEvent.KEYCODE_DPAD_LEFT));
(The cursor movement keys are implemented the same way, and they work Ok with 
mostly other apps - but not with connectBot)
3. connect to Unix server
4. type som characters on command line and hit 'left cursor key'

What is the expected output? What do you see instead?
Expected: cursor moves to the left - BUT nothing happens

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

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

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 pro-server 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 
i686 GNU/Linux

Please provide any additional information below.

Original issue reported on code.google.com by hhe...@gmail.com on 12 Jan 2012 at 9:23

GoogleCodeExporter commented 8 years ago
I realized the problem was not in connectBot. In my keyboard app I made a 
check, to see if the cursor was at the end of the field by using: 
getCurrentInputConnection().getTextAfterCursor(1, MODE_APPEND).length(). This 
call always returns 0 with connectBot.
When I removed that check everything was OK.
If somone is interested in the keyboard it can be bought in Android Market - 
Just search for 'MaxiKeys'. You need both the keyboard engine: 'MaxiKeys' and 
the layout: 'Maxikeys layout -connectBot'.

Original comment by hhe...@gmail.com on 13 Jan 2012 at 6:38