athreyahn / connectbot

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

No access to numeric symbols using Asus Transformer keyboard dock #459

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Hit either Shift key using the Asus Transformer TF101 Keyboard dock; The 
small triangle appears at the top of the cursor denoting (I'm guessing...) that 
the next character typed will be "shifted"
2. Press any of the numbered keys (0-9) to attempt to type a symbol ("!", "@", 
etc. but most importantly, "(" and ")")

What is the expected output? What do you see instead?
 Expected output: Symbol that corresponds to the numeric key pressed.
 Actual output: A tilde from numbers 5 - 9, and nothing is displayed from keys 1 - 4

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

What type of system are you trying to connect to?
 Unix machine with a bash shell

If you are able to connect, what is the output of "echo $TERM", "uname -a",
and any other relevant information on the host?
echo $TERM: "screen"
uname -a: Linux...2008 i686 athlon i386 GNU/Linux

Please provide any additional information below.
   There was one point where the keys functioned completely normally with proper shift functions. During this time period though, pressing the "shift" key did not alter the cursor the way it had before, and "alt" not did nothing (it was adding a small triangle on the bottom of the cursor). I have not been able to recreate this though.

Original issue reported on code.google.com by joeshmo...@gmail.com on 30 May 2011 at 10:16

GoogleCodeExporter commented 8 years ago
I have an Asus TF300 with the keyboard.  I cannot use "esc" or "!" or any other 
special characters (on the number keys) when using shift.  Tapping the screen 
to click "esc" is a workaround, but not being able to use symbols is a huge 
problem.

Original comment by wiriki...@gmail.com on 1 Jun 2012 at 6:22

GoogleCodeExporter commented 8 years ago
I have this issue on the Acer Iconia a500 using a standared USB keyboard. I'm 
not sure if it warrents a seperate post or not.

Additionally I'd like to see control working properly but I'm not sure these 
modded versions would work on an Iconia.

Original comment by Matthi...@gmail.com on 4 Jun 2012 at 11:55

GoogleCodeExporter commented 8 years ago
I have Transformer TF300TG, QWERTZ keyboard. 
Using the apk from the market I get the shifted symbols (over the numeric 
keys)! But CTRL, ALT and ESC don't work.
I've tried the serveral version available here and the irssi-connectbot from 
the market but the keyboard settings are worse. I even did not get the shifted 
symbols with that versions. 

Original comment by goo...@migri.de on 13 Jun 2012 at 7:53

GoogleCodeExporter commented 8 years ago
VX ConnectBot is working perfectly with TF300T. Tested. You can get it from 
market :)

Original comment by popo...@gmail.com on 13 Jul 2012 at 7:41

GoogleCodeExporter commented 8 years ago
The most helpful hint was so far to connect the hardware keyboard after 
starting connectbot.
It improve the keyboard function a lot, but I use a german keyboard and some 
special frequently used german characters still doesn't work.

I also use the Transformer TF300TG with ther german QWERTZ keyboard.

Original comment by loneu...@gmail.com on 25 Jul 2012 at 9:17

GoogleCodeExporter commented 8 years ago
I've patched the lorantkurthy version with support for any Transformer (my 
Transformer Infinity identifies itself as "ASUS Transformer Pad TF700T", so I 
made it check for "Transformer" anywhere in the Build.MODEL string), and 
uploaded it here: 
https://github.com/firetech/connectbot-transformer/connectbot-transformer_201207
29_signed.apk

Original comment by jo...@firetech.nu on 29 Jul 2012 at 7:02

GoogleCodeExporter commented 8 years ago
I've updated my version with fixed AltGr/Alt+Number characters and added back 
as an escape button (hold to go back).

https://github.com/firetech/connectbot-transformer/connectbot-transformer_201207
30_signed.apk

Original comment by jo...@firetech.nu on 30 Jul 2012 at 6:39

GoogleCodeExporter commented 8 years ago
I can't get the link you posted to work.

Original comment by lori...@gmail.com on 30 Jul 2012 at 7:42

GoogleCodeExporter commented 8 years ago
Oops. My bad. Here's a better link: 
https://github.com/downloads/firetech/connectbot-transformer/connectbot-transfor
mer_20120730_signed.apk

Original comment by jo...@firetech.nu on 31 Jul 2012 at 8:47

GoogleCodeExporter commented 8 years ago
Perfect. All keys work correctly now with Norwegian keydock layout.

Original comment by paal.nil...@gmail.com on 31 Jul 2012 at 12:18

GoogleCodeExporter commented 8 years ago
I hope to see support added for the Padfone model. I tried a couple of these 
forks, but they don't work, obviouly enough, because I'm not on a Transformer.
The entry under Settings for model number says "PadFone".

The behaviour on my Padfone is as described above, ( and ) sending ~ etc.

Original comment by pyry.ekh...@gmail.com on 3 Aug 2012 at 6:45

GoogleCodeExporter commented 8 years ago
IMHO the problem is that the forks here, while do work (the one from comment 
#109 works great on my TF300, thanks!) the suggested solution could be quite 
problematic.
Remember - this is not the Apple world where they release a single major model 
(and various different sub-models with more/less storage, 3G etc), this is 
Android and tons of manufacturers will release tablets and keyboard docs. 
Samsung just released one, they're just not pushing it enough like Asus does 
with TF300T, for example.

My suggestion is simple (if anyone is willing to implement it/change the code). 
Don't try to detect the tablet, cause there are tons of them. Instead, simply 
give an option "Tablet hardware keyboard" enable/disable, and option to select 
what will be the hot keys (the back button on my TF300T serves as ESC is a 
brilliant idea!)

Original comment by hetzbh on 11 Aug 2012 at 12:25

GoogleCodeExporter commented 8 years ago
The patches I've seen so far don't seem to solve the problem for the TF700T - 
anyone want to spin up another build for it?

Original comment by sai...@gmail.com on 19 Aug 2012 at 9:45

GoogleCodeExporter commented 8 years ago
This (
https://github.com/downloads/firetech/connectbot-transformer/connectbot-transfor
mer_20120730_signed.apk)
one works for me with Norwegian layout. What language/layout is your dock
and have you chosen the correct soft keyboard matching the dock?

Original comment by paal.nil...@gmail.com on 19 Aug 2012 at 9:48

GoogleCodeExporter commented 8 years ago
NM, got it working -- I misread above and I was expecting to see an option in 
the settings file.  Works great, thanks much.

Original comment by sai...@gmail.com on 19 Aug 2012 at 9:54

GoogleCodeExporter commented 8 years ago
Thank you for this patched version... fits nicely with my TF700T theme... NOTE 
: To use return carriage, in NANO by default (at least for me),    'crtl' + 
'enter' = return in nano.

Original comment by RDHo...@gmail.com on 2 Sep 2012 at 5:55

GoogleCodeExporter commented 8 years ago
 #109 works with the german keydock as well, at least on my tf300t. all that is left to do is to find a similar solution for the native android emacs that seems to have the exact same problem :)

Original comment by christop...@gmail.com on 6 Sep 2012 at 12:41

GoogleCodeExporter commented 8 years ago
Thanks. It works great! You save a lot of my time. Russian works great ($#114)

Original comment by lion....@gmail.com on 6 Sep 2012 at 7:45

GoogleCodeExporter commented 8 years ago
fffgggffffggggfffff112233444

ghjhghjhgggggggghhhhhhjjjj

Bac
Iq
Talent 2
 On Sep 6, 2012 4:41 PM, <connectbot@googlecode.com> wrote:

Original comment by wolfen...@gmail.com on 7 Sep 2012 at 11:32

GoogleCodeExporter commented 8 years ago
Cat on the keyboard?

Original comment by paal.nil...@gmail.com on 7 Sep 2012 at 12:30

GoogleCodeExporter commented 8 years ago
Is there a recent version of connectbot with the option in Settings to 
enable/disable the transformer keyboard instead of autodetection? I'm trying to 
run this on a Google TV and the autodetection does not recognize it.

Original comment by channin...@gmail.com on 14 Sep 2012 at 2:30

GoogleCodeExporter commented 8 years ago
Would really appreciate a manual switch as well as the Asus Padfone is not 
recognized either.

Original comment by martin.m...@gmail.com on 27 Sep 2012 at 9:46

GoogleCodeExporter commented 8 years ago
I'm very nervous of downloading people's .apk files for ssh connections that 
I'm going to use to ssh into hosts with.  Is anyone working to try and get the 
stock connectbot to pull in these patches?

Original comment by dam...@google.com on 14 Oct 2012 at 10:18

GoogleCodeExporter commented 8 years ago
I always compile it myself.  You can even use AIDE on your android device:

https://play.google.com/store/apps/details?id=com.aide.ui

Just tell it what git repo to pull, and build it from source.

Original comment by 4WayneD on 14 Oct 2012 at 11:39

GoogleCodeExporter commented 8 years ago
The version linked in comment 109 worked for me too.  TF700 (infinity) with 
dock.

Original comment by artcan...@gmail.com on 22 Oct 2012 at 2:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I am currently working to include firetech's work into vx connectbot and get vx 
to pull my changes.

Original comment by marc.gae...@gmail.com on 26 Oct 2012 at 11:45

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I tried lorantkurthy's fork 
(https://github.com/downloads/lorantkurthy/connectbot/ConnectBot.apk) for the 
TF101, and it doesn't have an option for the transformer keyboard in the 
settings area. Maybe the update to ICS broke the model detection? Can someone 
perhaps compile a version that doesn't have a hardcoded version detector, or 
otherwise provide a working fix? Thanks in advance.

This is what I see in the "User Interface" section:

http://i.imgur.com/u4nrR.png

This is a screenshot of my "about tablet" section:

http://i.imgur.com/XzitM.png

Original comment by audiosla...@gmail.com on 19 Nov 2012 at 4:00

GoogleCodeExporter commented 8 years ago
Firetech's connectbot-transformer version 
(https://github.com/downloads/firetech/connectbot-transformer/connectbot-transfo
rmer_20120730_signed.apk) seems to work perfectly on TF201 with Portuguese dock.

Original comment by dgo...@graphnode.com on 3 Jan 2013 at 8:44

GoogleCodeExporter commented 8 years ago
I have this very issue with connectbot on my asus transformer TF300. I tried 
downloading Firetech's version and while it solved the issue with numeric 
symbols, when I hit the enter key in Pico 4.1.0, it justifies the text instead 
of creating a new line.

Original comment by paballes...@gmail.com on 17 Jan 2013 at 8:45

GoogleCodeExporter commented 8 years ago
Any chance these changes will ever be incorporated in the main release of 
ConnectBot?  This is clearly a bug (by the activity on this report alone).

Original comment by robin.hi...@gmail.com on 19 Jan 2013 at 2:43

GoogleCodeExporter commented 8 years ago
I have a nexus 10 with a bluetooth keybook but i cannot access the symbols 
above the numbers. ConnectBot is excellent but without access to those symbols 
it makes it unusable.......please fix this.

Original comment by abblet...@gmail.com on 20 Feb 2013 at 6:50

GoogleCodeExporter commented 8 years ago
I have this issue as well.  I was very pleased with connectbot for about 5 
minutes until I found this issue.  I am using a nexus7 and a minisuit keyboard. 
 This keyboard is almost perfect, but doesn't really work with connectbot 
because of this issue (no numbes).  They keyboard lacks a tabkey but I'd 
happily type ^I if I had to...  but that doesn't work either.  I havent tried 
the fork yet but I wanted to mention I don't have a transformer, but I'd really 
like better 'real kbd' support.

Original comment by gham...@gmail.com on 15 May 2013 at 11:52

GoogleCodeExporter commented 8 years ago
This also occurs with a Microsoft Wedge keyboard on a nexus 10. Without 
punctuation characters, a terminal session is essentially useless.

Original comment by charvol...@gmail.com on 30 Jul 2013 at 12:22

GoogleCodeExporter commented 8 years ago
Just a thought, but how about an option to have a customizable set of 
keys/keycombinations onscreen to substitute the non-working hardware keyboard 
equivalents. I use ALT+<num> combination alot, and to just have those buttons 
available onscreen would make my ssh life alot easier :) 

Original comment by reinier....@gmail.com on 20 Aug 2013 at 6:13

GoogleCodeExporter commented 8 years ago
Wanted to add a "me too" to #134, am in the same situation except my mini 
keyboard for the Nexus 7 (the "old" one) has a tab key also. Since it's not 
being detected as a transformer, there's no convenient way (short of ramming on 
a custom .apk) to tell it that there's a hardware keyboard.
Please add a settings option to
"disable keyboard hardware detection, toggle manually by pressing [WHATEVER] 
key combination",
 soon?

Original comment by michiel....@gmail.com on 8 Sep 2013 at 6:51

GoogleCodeExporter commented 8 years ago
Same problem here, N7 2013 with Bluetooth Keyboard (hipstreet)...can't type @ 
nor ! which I need for some of my server passwords

Original comment by vevmeste...@gmail.com on 10 Jan 2014 at 2:01

GoogleCodeExporter commented 8 years ago
================ Almost Complete Workaround ================

This covers an approach to allow for normal touch typing, by a sneaky
remapping of keys to avoid several hard coded Connectbot keypress
actions, while still leaving the layout in a 'working' state for other
apps.  No rooting or forked Connectbot apk required.

Don't get me wrong, patched versions are good, proper upstream fixes
even better.  This is just another reasonable workaround for both.

==> Workaround (TL;DR ver)

In short, this approach is to create a layout to set Shift keys to
Right-AltGraph, then map AltGraph+key to result in the same output as
Shift+key; with the exception of symbol keys, which are assigned to
output Symbol+null when AltGraph+SymbolKey is pressed.  

* Remapping Android keys to avoid usage of 'shift'.
* Sending Connectbot two characters per symbol (it ignores null).

This can all be done with an existing android market app.

================= Requirements & Results ===================

* Requires "Android Keyboard Helper (AKH)" (a paid app)
* Does not require rooting or patches to Connectbot (CB).

==> What this approach can do 
* Disables the Connectbot 'shift-lock' behavior [1].
* Fixes symbol key input (allows normal Shift+NumKey touch typing).

[1] Shift-lock is OK for mobile phones, but is very annoying for
    physical tablet keyboards.  We can use AKH to avoid 'shift'.

==> What this approach can't do
* Left-Alt can't be the 'Search' key on TF700T physical keyboards [2].
* Right-Alt cannot be physically moved on your keyboard.. [3].

[2] The 'Search' key was not wired as a modifier key, it seems.
[3] CB may treat Right-Alt specially, not enough modifier keys to avoid.

==> Downsides 
* Some hard-coded CB shortcuts still remain an issue [4].
* Side-effect for symbol keys in other applications.
* Currently possible unknown side-effects for other apps [5].

[4] If CB treats RightAlt+SomeKey differently, we can't avoid it.
[5] Either use the new layout only for CB, or be mindful of effects.

==> Background
I use Android Keyboard Helper (AKH) for the dvorak layout and for
remapping capslock to ctrl on a TF700T.  AKH also allows for quick
layout switching, null characters, and a string 'macro' feature
required to work around CB issues/features.

========================= Preface ==========================

==> What is Android Keyboard Helper (AKH)

- Allows for remapping keys, including special keys (capslock,etc).
- Used to remap all keys and to use null and 'macros' to fix symbols.
- Fast switching between up to 2 layouts + 1 'no remapping' layout.

 AKH's configuration interface allows for a lot of control over
 assignment of characters to scancodes and modifier combinations. I
 highly recommend it.  Demo and paid version available. [*]

==> Why use "Android Keyboard Helper" ?

Any other method of remapping keys may work for shift-lock, but fixing
symbols requires support for attaching a trigger to a single keypress,
to output a string of characters (optionally 'null'). Android Keyboard
Helper is quite convenient for this and for switching layouts. [6]

[6] I am not yet clear on the implementation AKH uses, but it might be
    possible to use the same behavior to remap.  Need to look at the
    backed up config files and IME/layout framework to reverse it.

====================== The Workaround ======================

==> Breakdown:

 The workaround, very briefly described at the top of the comment,
 is explained (in concept) below.  Reasons for why are described.

= Issue: CB is hard coded to treat shift keys as 'shift-lock'.

 This is the carrot/triangle capslock-like state that the cursor
 enters when Left/Right Shift are pressed.  Great concept for mobile
 but ingrains bad habit and pain for full keyboards.

= Answer: Avoid using the 'shift' modifier all-together.

 The use of AltGraph in place of shift prevents CB from seeing a
 'shift' keypress, thus disabling 'shift-lock'.  However, this does
 not get around the issue with symbol keys. 

= Issue: CB is hard-coded to treat symbol-input differently. [7]

 The catch is that Connectbot still interprets a single symbol as a
 symbol, so simply remapping appears to be useless; however..

 [7] Maybe it was to allow F1-F12 input, but I forget.

= Answer: Use AKH to trick CB by passing the input differently.

 Instead, AKH's string 'macro' reply feature is used, as the
 implementation can trick CB into taking the symbol key input.

= Sub-Issue: AKH either implements 'macro' differently when outputting
  a one character string; or, two characters are required to trick CB.

= Sub-Answer: Two approaches to fixing symbols with 'macros'.

 1. Assign the symbol key to output two of the desired symbol.

    The downside of (1) is that you need to press backspace to delete
    the second symbol, or that it will unavoidably send 2 strokes to
    your ncurses application.  Less likely to break other droid apps.

 2. Assign the symbol key to output the symbol and a null char.

    For (2), CB does not interpret/pass-through the null character to
    the TERM (verified by 'cat | hexdump -C'), thus no backspace is
    required when using CB and this method.

    However, Android text fields /do/ understand a null character, so
    if you output "!<null>" then pressing backspace when you see a "!"
    only deletes the <null> and leaves the "!".  (Note: the UTF <null>
    char is invisible.) Not an issue for CB, for other apps it may be.

 I currently recommend (2) above. But, I imagine that android apps may
 not take too kindly to spurious null characters.. I have not tested
 that fully; thus, I recommend using AKH's keyboard switching shortcut
 to flip between your CB-layout and your "no mapping"-layout (and or
 your normal custom-layout), for CB vs Normal use.

====================== Moving Forward ======================

How to do this with Android Keyboard Helper?

The above provides enough detail to do this; however, there are some
tips to this (such as using Capslock-IgnoreState), what the AltGraph
modifier is called in AHK, identifying scancodes for keys, getting
'null' into the macro string text fields, and general use of AKH to
accomplish the task. (All of it can be done with just AKH, though.)

This comment has gotten too long to include this, but I'll work on a
brief summary with the key details, and will leave a walk-through for
a later time.

Let me know if you use this method or a similar one and if you run
into any issues with other apps and this approach.  Constructive
feedback on problems found would be much appreciated.

Original comment by mtkol...@gmail.com on 10 Oct 2014 at 7:13