New preference settings to work around issues with Hacker's Keyboard #1034
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am using Hacker's Keyboard and Connectbot version 1.9.8-oss, both installed from F-Droid.
For most control characters, Hacker's Keyboard sends (optional) key-down and key-up events for the control key, followed by key-down and key-up events for the alphabetic character, the latter having the META_CTRL_LEFT_ON flag set, as expected.
Unfortunately, pressing ctrl-shift-minus in order to send ctrl-underscore causes Hacker's keyboard to send the keycode for the minus key with only the META_SHIFT flag set, and not META_CTRL. This is undoubtedly a bug in Hacker's Keyboard, but that project seems to have been abandoned by its owner. The effect in Connectbot is to send a plain underscore (0x5f) to the server, and not ctrl-underscore (0x1f).
A potential workaround would be to turn on 'meta keys are sticky' in Connectbot, so that the preceding control key-down is remembered. However, that has two weird effects:
None of this happened with version 1.9.6-oss as it received characters from Hacker's keyboard as multi-character IME input (KEYCODE_UNKNOWN) and passed them on to the server unexamined.
This patch adds two preference settings, which between them solve the problems introduced by the 'meta keys are sticky' workaround:
The latter setting does not apply to the control key on the special keyboard, which continues to work as before.
Fixes #1035