dl60 / connectbot

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

Improve hardware keyboard management for tab #551

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This post is an improvement suggestion, but the option is not available. I 
didn't found any other way to post this, so sorry in advance if this is not 
appropriate.

What steps will reproduce the problem?
1. Install the application on Motorola Droid 3
2. Connect to any server
3. Try to use the hardware tab key
4. Doesn't work

What is the expected output? What do you see instead?
I expected that key to work, and even in changing the "Directory Shortcut" 
method, it doesn't work.

What version of the product are you using (you can see this by using Menu
-> About in the Host List)?
There's no "About" in the menu, even in the host list. I'm using version at 
commit a1894f4 on branch master.

What type of system are you trying to connect to?
Latest Archlinux x86_64

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

Please provide any additional information below.

Output for git diff a1894f4..a65e74e, a65e74e being my last commit fixing this:

diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 7bac312..d29cd82 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -101,6 +101,7 @@
   <string name="pref_bell_notification_summary">Envoyer une notification lorsqu\'un terminal génère une alerte</string>
   <string name="list_keymode_right">Utiliser les touches du côté droit du clavier</string>
   <string name="list_keymode_left">Utiliser les touches du côté gauche du clavier</string>
+  <string name="list_keymode_hardware">Utiliser les touches 
matérielles</string>
   <string name="list_keymode_none">Désactivé</string>
   <string name="list_pubkeyids_none">Ne pas utiliser les clefs de cryptage publiques</string>
   <string name="list_pubkeyids_any">Utiliser une clé pour l\'authentification</string>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index c9090ea..368acd7 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -86,12 +86,14 @@
        <string-array name="list_keymode" translatable="false">
                <item>@string/list_keymode_right</item>
                <item>@string/list_keymode_left</item>
+               <item>@string/list_keymode_hardware</item>
                <item>@string/list_keymode_none</item>
        </string-array>

        <string-array name="list_keymode_values" translatable="false">
                <item>Use right-side keys</item>
                <item>Use left-side keys</item>
+               <item>Use hardware keys</item>
                <item>none</item>
        </string-array>

diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1392622..081f177 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -219,6 +219,8 @@
        <string name="list_keymode_right">"Use right-side keys"</string>
        <!-- Preference selection to indicate use of left side of keyboard for special shortcuts. -->
        <string name="list_keymode_left">"Use left-side keys"</string>
+       <!-- Preference selection to indicate use of hardware keys for slash 
and tab. -->
+       <string name="list_keymode_hardware">"Use hardware keys"</string>
        <!-- Preference selection to indicate never to use special shortcut keys. -->
        <string name="list_keymode_none">"Disable"</string>

diff --git a/src/org/connectbot/service/TerminalKeyListener.java 
b/src/org/connectbot/service/TerminalKeyListener.java
index 952f3cd..b41d105 100644
--- a/src/org/connectbot/service/TerminalKeyListener.java
+++ b/src/org/connectbot/service/TerminalKeyListener.java
@@ -148,6 +148,11 @@ public class TerminalKeyListener implements OnKeyListener, 
OnSharedPreferenceCha
                                                bridge.transport.write(0x09);
                                                return true;
                                        }
+                               } else if 
(PreferenceConstants.KEYMODE_HARDWARE.equals(keymode)) {
+                                       if (keyCode == KeyEvent.KEYCODE_TAB) {
+                                               bridge.transport.write(0x09);
+                                               return true;
+                                       }
                                }

                                return false;
diff --git a/src/org/connectbot/util/PreferenceConstants.java 
b/src/org/connectbot/util/PreferenceConstants.java
index 9e37017..875724f 100644
--- a/src/org/connectbot/util/PreferenceConstants.java
+++ b/src/org/connectbot/util/PreferenceConstants.java
@@ -54,6 +54,7 @@ public class PreferenceConstants {

        public static final String KEYMODE_RIGHT = "Use right-side keys";
        public static final String KEYMODE_LEFT = "Use left-side keys";
+       public static final String KEYMODE_HARDWARE = "Use hardware keys";

        public static final String CAMERA = "camera";

Original issue reported on code.google.com by geoffroy...@gmail.com on 15 Jan 2012 at 12:54

GoogleCodeExporter commented 8 years ago
Has this been applied/reviewed?  And, when will it go into an update for the 
google marketplace version? Thanks, Dow

Original comment by dow4hu...@gmail.com on 14 Mar 2012 at 3:44

GoogleCodeExporter commented 8 years ago
I don't know, but I've a little bug with tab key being taken twice... I'll fix 
it and perhaps post the apk somewhere.

Original comment by geoffroy...@gmail.com on 31 Mar 2012 at 8:17

GoogleCodeExporter commented 8 years ago
I am also having issues using the Tab key on my bluetooth keyboard.  The tab 
key works everywhere except my ConnectBot terminal.

Any suggestions on how to apply this patch/download a signed apk or anything 
else?

Original comment by earthme...@gmail.com on 25 Oct 2012 at 4:23