isawred2 / hackerskeyboard

Automatically exported from code.google.com/p/hackerskeyboard
1 stars 0 forks source link

CTRL crashing typing #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I have problem in Terminal Emulator and Better Terminal Emulator (the latest 
version), when I press the key ctrl, so after that typing does not produce text 
on screen. 

What version of Hacker's Keyboard are you using? (See top of the app's
Settings menu.) On what phone or tablet?

I use the latest version from market and I have the tablet Asus Eee Pad 
Transformer with Honeycomb 3.2.

If applicable, does this affect the 4-row or 5-row layout, or both? Which
language(s)?

Please provide any additional information below.

Sorry for my english :)

Original issue reported on code.google.com by brozi...@gmail.com on 17 Jan 2012 at 10:52

GoogleCodeExporter commented 9 years ago
I'm assuming you're not just talking about the next character, you're getting 
Ctrl applied to all following characters?

Does the indicator light on the Ctrl key remain on? Can you fix it by pressing 
Ctrl again?

Original comment by Klaus.We...@gmail.com on 17 Jan 2012 at 11:29

GoogleCodeExporter commented 9 years ago
http://www.youtube.com/watch?v=6QS6dJtpveU&feature=youtu.be

The indicator light is off and no, I cant.

Original comment by brozi...@gmail.com on 18 Jan 2012 at 12:23

GoogleCodeExporter commented 9 years ago
I suspect this is likely to be an application bug, where the input recipient 
loses track of the key press/release events. I can't reproduce this with the 
Market version of ConnectBot where the Ctrl key works as expected, or with a 
key tester program. If the indicator light is off, this should mean that the 
keyboard is sending key events without Ctrl modifier.

Try multitouch Ctrl - press and hold the Ctrl key, press and release the key to 
be modified, and release Ctrl. Does that behave differently?

Another thing to try would be to get the application into the confused state, 
force terminate Hacker's Keyboard from the application list (via system 
settings), and seeing if the problem persists for this terminal session once 
the input method is restarted.

Also, can you try turning off the "ConnectBot tab hack" in settings to see if 
this makes a difference?

Lastly, do you by any chance happen to have a Bluetooth keyboard, or a USB 
keyboard if you have a USB host adapter plug for your device? It would be 
interesting if the same behavior also happens with a hardware keyboard.

Original comment by Klaus.We...@gmail.com on 18 Jan 2012 at 2:17

GoogleCodeExporter commented 9 years ago
"Try multitouch Ctrl- ..."
Yes, it does good with multitouch (ctrl+any key).

"Another thing to try ..."
No, the problem is still same.

"Also, can you try ..."
No, it doesn't helped.

I tried switch the input's keyboard, but without effect.

Original comment by brozi...@gmail.com on 18 Jan 2012 at 9:12

GoogleCodeExporter commented 9 years ago
I'm still unsure what's going on here, but I've added a slightly experimental 
workaround in revision f9d7119a7796 under the assumption that the underlying 
KeyCharacterMap based event handling code is getting confused. 

Can you please try version 1.30rc1 (or later) from 
http://code.google.com/p/hackerskeyboard/downloads/list and let me know if that 
fixes your issue?

Original comment by Klaus.We...@gmail.com on 21 Jan 2012 at 5:19

GoogleCodeExporter commented 9 years ago
Unfortunately, the problem is not resolved. I tested rc1 and rc2.

I tested other ROM, busybox, but the problem was everywhere.

I have one news, the ConnectBot works properly.

Original comment by brozi...@gmail.com on 21 Jan 2012 at 11:28

GoogleCodeExporter commented 9 years ago
Hi,

I have a new investigation. When I press the CTRL key, then I press some other 
key, the keyboard isn't responding. But when I press CTRL again, it will unlock 
and I can write normally. It seems that CTRL don't recognize when some key 
without defined action was pressed, the indicator light dissapear, but keyboard 
looks like the CTRL is still down.

Original comment by brozi...@gmail.com on 25 Jan 2012 at 5:46

GoogleCodeExporter commented 9 years ago
Thanks for the updates and for testing. I have a theory about what's going on, 
but unfortunately it may be a lot of work to fix.

The modifier key handling in Android is rather complicated, and involves 
redundant state tracking in three places - inside the keyboard, inside the 
input connection details managed by the system libraries, and inside the 
application receiving input. When these get out of sync, you run into problems 
like this one.

The Ctrl key's indicator light is supposed to be a reliable indication of the 
internal keyboard state, but I suspect that the system libraries get confused 
managing the input connection. See 
http://developer.android.com/reference/android/view/KeyCharacterMap.html#getModi
fierBehavior() for details, apparently some keymaps support toggle behavior for 
modifiers in addition to chorded behavior, and misinterpreting the key events 
sent by the keyboard which assumes normal (chorded) key behavior.

Unfortunately I'm not aware of a compatible way to influence the 
KeyCharacterMap translation layer, and this appears to be an area where 
vendor-specific changes confuse things.

I'm thinking about rewriting the key event handling to remove the dependency on 
the system library translation layer, but that's not easy, and I worry about 
introducing additional incompatibilities where the vendor changes are more 
extensive.

Anyway, a few more things to test:

- you said earlier that multitouch (chorded) Ctrl has the same problem. Can you 
confirm that this is also the case if you *only* use chorded Ctrl for a 
session? I don't expect it to fix a wedged input connection, but I wonder if it 
would prevent the problem if you never use the toggle Ctrl method.

- I uploaded a simple keyboard tester app, would you be willing to try that? To 
simulate the terminal emulator behavior, turn off the "Focus" checkbox and tap 
the "Keys" button to bring up the keyboard. Then it should show key events for 
the keys you press, newest on top. Can you replicate the problem there? The 
thing to look for would be if key events still show the CTRL modifier when the 
keyboard's Ctrl LED is off. 
http://code.google.com/p/hackerskeyboard/downloads/detail?name=KeytestActivity-d
ebug.apk

Original comment by Klaus.We...@gmail.com on 25 Jan 2012 at 6:23

GoogleCodeExporter commented 9 years ago
Just to add, I have the exact same problem, with the Terminal Emulator app. It 
does not happen in ConnectBot, but for the application I am using (Ubuntu 
console mode), Terminal Emulator works better (better handling of TERMINFO, 
editors works flawlessly).

Original comment by rangels...@gmail.com on 25 Jan 2012 at 7:42

GoogleCodeExporter commented 9 years ago
It seems that more people are having this problem in Terminal Emulator, see 
thread:

https://github.com/jackpal/Android-Terminal-Emulator/issues/73

Original comment by rangels...@gmail.com on 25 Jan 2012 at 7:49

GoogleCodeExporter commented 9 years ago
The information from the Android-Terminal-Emulator bug helps, especially that 
it appears to happen with hardware keyboards too. I may be able to work around 
the problem in Hacker's Keyboard, but it does sound as if this is an OS level 
problem.

Original comment by Klaus.We...@gmail.com on 25 Jan 2012 at 7:59

GoogleCodeExporter commented 9 years ago
Key tester output ‒ looks fine to me…

Tapping Ctrl causes corresponding key-down & key-up events.
Tapping A causes Ctrl down, A down, A up, Ctrl up;  all with 
‘meta=CTRL|CTRL_LEFT’.
Tapping A again causes A down, A up;  meta=.

Ctrl-A (multitouch) causes Ctrl down, A down, A up, Ctrl up;  all with 
‘meta=CTRL|CTRL_LEFT’.
Tapping A again causes A down, A up;  meta=.

Tapping Ctrl causes corresponding key-down & key-up events.
Ctrl-A (multitouch) causes Ctrl down, A down, A up, Ctrl up;  all with 
‘meta=CTRL|CTRL_LEFT’.
Tapping A again causes A down, A up;  meta=.

Original comment by justanot...@googlemail.com on 25 Jan 2012 at 9:21

GoogleCodeExporter commented 9 years ago
That was with 1.29 (with a few compose-related patches); 1.30rc2 behaves 
identically.

Original comment by justanot...@googlemail.com on 25 Jan 2012 at 9:26

GoogleCodeExporter commented 9 years ago
Thanks for the updates, I've been able to reproduce it with 
Android-Terminal-Emulator and have a brand-new workaround in revision 
7307574f2e2f.

Please try v1.30rc3 (or later) from 
http://code.google.com/p/hackerskeyboard/downloads/list and let me know if this 
improves things. It adds new options for the key events generated by standalone 
Ctrl and Alt keys, by default these are now ignored and only applied when 
modifying other keys.

Original comment by Klaus.We...@gmail.com on 25 Jan 2012 at 9:56

GoogleCodeExporter commented 9 years ago
Looks like that's working here… ☺

Original comment by justanot...@googlemail.com on 25 Jan 2012 at 10:45

GoogleCodeExporter commented 9 years ago
Version hackerskeyboard-v1030rc3.apk works perfectly :)

Thx for your work.

Original comment by brozi...@gmail.com on 26 Jan 2012 at 12:00

GoogleCodeExporter commented 9 years ago
I installed this version, it fixed some problems, but not everything for me.

For example, using nano, to save I do "Ctrl-o <return>", but after doing
Ctrl-O, I need to press another Ctrl otherwise <return> does not work.
Also exiting with Ctrl-x after saving, previously I needed to use ctrl 2
times now it seems to work with only 1, but when getting back to the
terminal, ctrl is still pressed, pressing "c" yelds a Ctrl-c.

Original comment by rangels...@gmail.com on 26 Jan 2012 at 1:00

GoogleCodeExporter commented 9 years ago
rangelspam, that's odd. Can you check settings to make sure you have the new 
"Ctrl key code" option set to "None"? Also, if you're using 
Android-Terminal-Emulator, try yesterday's new version of that which is 
supposed to fix the underlying issue.

If you're still having the issue, can you please describe in detail which keys 
you are pressing and releasing, and what state the Ctrl indicator shows on the 
keyboard? I can't tell from your description if you are using Ctrl in chording 
(multitouch) mode or as a sticky key that modifies the next one.

Original comment by Klaus.We...@gmail.com on 26 Jan 2012 at 9:08

GoogleCodeExporter commented 9 years ago
[bulk bug update]

The changes from the 1.30rcX prerelease series are included in version 1.31 as 
published on Android Market, and this bug should be fixed. If it's still not 
working for you, please reopen or file a new bug. Thanks to everyone who helped 
with finding bugs and testing!

Original comment by Klaus.We...@gmail.com on 24 Feb 2012 at 6:23

GoogleCodeExporter commented 9 years ago
Thx for your hard job, but the problem with the ctrl there is still.

If I press ctrl + "s", the terminal full broke and I must close the window and 
run next the terminal again.

Original comment by brozi...@gmail.com on 25 Feb 2012 at 10:46

GoogleCodeExporter commented 9 years ago
brozikcz, can you please check the following items:

- ensure you're running v1.30rc5 or v1.31, see the version at the bottom of the 
settings menu
- "Ctrl key code" and "Alt key code" should be set to "None"

Also, which terminal program are you using? Does Ctrl get stuck in other 
programs too? Which device and Android version?

And are you using multitouch Ctrl or using keys in sequence?

Original comment by Klaus.We...@gmail.com on 26 Feb 2012 at 12:04

GoogleCodeExporter commented 9 years ago
I have latest version from market - 1.31.
"Ctrl key code" and "Alt key code" are set to none.

I use latest Terminal Emulator and ConnectBot in ICS 4.0.3 (device TF101) and 
are stoped work with multitouch and also with in sequence.

Original comment by brozi...@gmail.com on 26 Feb 2012 at 12:32

GoogleCodeExporter commented 9 years ago
i would like to press Ctrl+Shift+i+k together but does not work, for some reason

Original comment by pdwag...@gmail.com on 17 Apr 2013 at 5:24