atakz / android-vnc-viewer

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

Patch: full keyboard support for trackball-less tablets #237

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of android-vnc-viewer are you using? SVN head (r201)

I'm using the VNC viewer on my Xoom tablet, and since it doesn't have a DPad or 
trackball some features aren't easily usable. Also, Honeycomb added some key 
codes that aren't yet supported by the viewer.

The attached patch is a quick hack to add support for Ctrl, Tab, Escape, and 
arrow keys if the software or hardware keyboard generates appropriate keycodes. 
This is mainly intended as a request for comment to see if there's interest in 
this.

Changes:

- handle keyboard events for Ctrl, Tab, and Esc keys if sent by the input 
device. This should work with hardware Bluetooth/USB keyboards (untested), or 
with an appropriate software keyboard.

- in "Touch Mouse Pan and Zoom" mode, use the Tab key to switch into arrow key 
mode where DPad sends Left/Right/Up/Down cursor events. DPad center switches 
back to "DPad moves mouse" mode.

Implementation notes:

- KEYCODE_ESCAPE and KEYCODE_CTRL_LEFT were only recently added for API level 
11 (Honeycomb), I've hardcoded the key codes from the API docs so that it'll 
still compile with earlier versions.

Original issue reported on code.google.com by Klaus.We...@gmail.com on 18 Apr 2011 at 7:32

GoogleCodeExporter commented 9 years ago
Please ignore this bug, it was confusingly mixing two separate issues.

I've split it into two separate issues with independent patches:

Issue 238:  Patch: Support additional keys, fix modifier handling
Issue 239:  Patch: Cursor key support for "Touch Mouse Pan and Zoom" mode

Original comment by Klaus.We...@gmail.com on 18 Apr 2011 at 5:39