SwizzyFPS / android-vnc-viewer

Automatically exported from code.google.com/p/android-vnc-viewer
0 stars 0 forks source link

real special keys do not work #219

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have android device with full qwerty keyboard.
2. It has physical control and alt keys.
3. I run debian in a chroot. It works good.
4. I am using tightvnc as a vnc server and xev to look for x events.

What is the expected output? What do you see instead?
I want vncclient to send control and alt keys or their combinations with 
regular keys to the server. But when i press control key nothing happens, when 
i press ctrl+a i see xev's output identical to just 'a' key. The same is with 
alt key.

What version of android-vnc-viewer are you using?
According to setting i am using android-vnc-viewer of version 12. It was 
installed from androidVNC_build20101119.apk downloaded from the project's 
downloads.

Which VNC server/version are you using?  On which platform?
I am using tightvncserver 1.3.9-6.1+b1 on debian wheezy/testing armel port. 
Vncserver identifies itself as "Xvnc version TightVNC-1.3.9". I am starting it 
as "vncserver -lazytight -localhost -compatiblekbd -ac -geometry 1024x600". 
Also i tried "vncserver -geometry 1024x600" with the same result.

What is the size of the desktop you are trying to access (i.e. 1024x768,
1920x1080...)?
1024x600

What device are you using?
Toshiba AC100-116.

Are you using a custom ROM?  If so, which?
No, i am not using custom rom.

Please provide any additional information below.
AC100 has problem (for me) with number keys: in a regular app it is needed to 
press alt+1 (not shift+1) to type '!', but over vnc both alt+1 and shift+1 give 
'!'.

Original issue reported on code.google.com by aleksey.4erepanov on 7 Mar 2011 at 12:57

GoogleCodeExporter commented 9 years ago
this patch makes alt and shift keys to work like something i expect. 
additionally just shift or alt send itself and each combination with regular 
key gives x event with modifier like: press alt (do not release) => pressed 
alt; press and release 'a' => pressed alt, pressed 'a', released alt, released 
'a'; release alt => released alt. control key does not work anyway.
{{{
===================================================================
--- src/android/androidVNC/VncCanvas.java   (revision 192)
+++ src/android/androidVNC/VncCanvas.java   (working copy)
@@ -904,7 +904,7 @@
              case KeyEvent.KEYCODE_DPAD_CENTER:  key = 0xff0d; break;
              default:                            
                  key = evt.getUnicodeChar();
-                 metaState = 0;
+                 //metaState = 0;
                  break;
            }
            try {
}}}

Original comment by aleksey.4erepanov on 9 Mar 2011 at 12:47

GoogleCodeExporter commented 9 years ago
Thanks for the patch--

I think this might break most phone keyboards, but it might be something I 
could make optional so it would work right with full keyboards like yours

BTW-- Are you still having problems building from source?

Original comment by googlec...@antlersoft.com on 22 Mar 2011 at 2:49

GoogleCodeExporter commented 9 years ago
Yes, i still have problems with build. But now i finished my experiments
because i am busy. I used some workarounds to make it comfortable to
work: i am using only this patch and settings in android keylayout to
place right keys in comfortable positions and setting in debian to remap
keys to do what i need. Now i do not have a working control key so i
remaped shift key to be control key in chrooted xserver (by
xmodmap). Also i remaped alt key to be shift key: for regular keys
vncclient sends alt+key and x makes it shift+key, for signs keys (1, 2, ...)
vncclient sends alt+shift+key (i think it is because for key '!' (if we
have so) vncclient sends shift+1) and x translates alt into shift and i
have shift+key as i need. For alt/meta key i use escape that i placed on
alt position. It is enough comfortable in a terminal or emacs. But
terminal (exactly gnome-terminal) does not understard 0x09 as a tab key
but emacs understands it so i am living in emacs (home sweet home). xev
says about sended tab key that it is '(no name)', i tried to remape it
into a real tab without any success. It needs more investigation...

As investigation start i planed to make an android app to show full
information about key pressed and then hardcode known values into
vncclient for me. Now i think it could be done in a more generalized way:
for instance as an universal configurable key translator in the
vncclient in which during setup user presses a key and the vncclient asks for a 
mean of
that key that will be sended each time key will be pressed.

Original comment by aleksey.4erepanov on 23 Mar 2011 at 10:08

GoogleCodeExporter commented 9 years ago
May be i am wrong with ! and shift+1 but for `*` (aka STAR in keylayout) i see 
shift+8 in xev.

Original comment by aleksey.4erepanov on 23 Mar 2011 at 10:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i am sorry, it seems that i am somewhat outdated... new release... i will try 
to build it soon

Original comment by aleksey.4erepanov on 23 Mar 2011 at 10:17

GoogleCodeExporter commented 9 years ago
i build it successfully. i just added both projects from eclipse_projects 
folder as a new android projects into a workspace and build all without 
problems. it seems that other issue solved

Original comment by aleksey.4erepanov on 23 Mar 2011 at 11:11

GoogleCodeExporter commented 9 years ago
See also issue 238, I added a patch there that enables Ctrl+Alt but should 
remain fully compatible with phone keyboards since it keeps the metaState key 
clearing for other modifiers.

Original comment by klausw@google.com on 21 Apr 2011 at 8:11

GoogleCodeExporter commented 9 years ago
I am having this problem on my Droid 4 with Eclipse rom 1. 3. 8 - it apparently 
maps caps lock to Ctrl and SYM to Alt (Based on what I see in Better Terminal 
Emulator Pro) but Ctrl at least doesn't work in VNC to my 
Ubuntu-in-a-chroot-on-the-phone. (Ubuntu 12.04 arm)

I have an idea on how to deal with it when phones use Alt for symbols (As mine 
also does):
When tapping the modifier, then the key, send the symbol. When Holding the 
modifier while pressing the key, send the key-with-modifier. 

Original comment by david...@gmail.com on 20 Jun 2012 at 5:22