GithubHelp home page GithubHelp logo

Comments (12)

gujjwal00 avatar gujjwal00 commented on June 2, 2024

Thank you for the very detailed report @macdanger . This is really helpful.

Before going further, lets see if using raw key events fixes this:

  1. Enable raw key handling in tigervncserver by passing -RawKeyboard=1 argument
  2. Install this APK : app-debug.zip (from #129)
  3. Test key handling

from avnc.

macdanger avatar macdanger commented on June 2, 2024

thanks for your quick response.

60009 ? Ss 0:00 /usr/bin/perl /usr/bin/vncserver -RawKeyboard=1 -localhost no -depth 32 -geometry 1280x800 :1
60011 ? Ssl 1:00 /usr/bin/Xtigervnc :1 -rfbport 5901 -localhost=0 -SecurityTypes VncAuth,TLSVnc -PasswordFile /home/user/.vnc/passwd -ClientWaitTimeMillis 30000 -NeverShared=0 -AlwaysShared=1 -RawKeyboard=1 -geometry 1280x800 -desktop host.domain.net:1 (markus) -depth 32 -auth /home/user/.Xauthority

The RawKeyboard parameter togther with the debug version of avnc did not change much, at least it is still not working. But I can see a difference in regard to the transmitted keycodes:
(does not differ if right-alt-to-super on or off):

KeyPress event, serial 28, synthetic NO, window 0x4c00001,
root 0x3b4, subw 0x0, time 430664614, (593,383), root:(700,492),
state 0x10, keycode 142 (keysym 0x1008ff6b, XF86Open), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x4c00001,
root 0x3b4, subw 0x0, time 430664779, (593,383), root:(700,492),
state 0x10, keycode 20 (keysym 0xdf, ssharp), same_screen YES,
XLookupString gives 2 bytes: (c3 9f) "ß"
XmbLookupString gives 2 bytes: (c3 9f) "ß"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4c00001,
root 0x3b4, subw 0x0, time 430664924, (593,383), root:(700,492),
state 0x10, keycode 20 (keysym 0xdf, ssharp), same_screen YES,
XLookupString gives 2 bytes: (c3 9f) "ß"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4c00001,
root 0x3b4, subw 0x0, time 430665150, (593,383), root:(700,492),
state 0x10, keycode 142 (keysym 0x1008ff6b, XF86Open), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

Overall with RawKeyboard it looks that there is a bigger missmatch between the Book Cover Keyboard layout and the xkb layout on the server: e.g. now I cannot use the curser keys and some other keys.
Maybe the right combination of RawKeyboard and X server keyboard layout would solve the problem but I cannot imagine which keyboard layout I should choose. Currently I'm using /usr/bin/setxkbmap -layout de,us -model pc105 -variant nodeadkeys,altgr-intl
And with that the right alt key (AltGr) isn't really assigned to right-alt as it seems.

EDIT: I just like to add: it does not depend on the Samsung Book Cover keyboard, using the exact same hardware keyboard from my desktop via bluetooth with avnc, avnc generates different keycodes then e.g. tigervncclient. The right-alt (AltGr) key ends up as keycode 108 with tigervncclient but is 142 with avnc using the same hardware keyboard.

from avnc.

gujjwal00 avatar gujjwal00 commented on June 2, 2024

Please try this APK (with RawKeyboard enabled): app-debug.zip

does not differ if right-alt-to-super on or off

Raw key events bypasses this setting.

Overall with RawKeyboard it looks that there is a bigger missmatch between the Book Cover Keyboard layout and the xkb layout on the server: e.g. now I cannot use the curser keys and some other keys.

EDIT: I just like to add: it does not depend on the Samsung Book Cover keyboard, using the exact same hardware keyboard from my desktop via bluetooth with avnc, avnc generates different keycodes then e.g. tigervncclient. The right-alt (AltGr) key ends up as keycode 108 with tigervncclient but is 142 with avnc using the same hardware keyboard.

Yeah, previous APK was not encoding raw key events correctly. I assumed scancodes received from Android were XT scancodes, but actually they are Linux kernel keycodes.

Q: Can you compile TigerVNC from source (or somehow use newer version)?

from avnc.

macdanger avatar macdanger commented on June 2, 2024

Please try this APK (with RawKeyboard enabled): app-debug.zip

Now this new debug version works perfectly! Even the super and cursor keys work correctly!
EDIT: and also with using a full blown logitech bluetooth hardware keyboard.

Q: Can you compile TigerVNC from source (or somehow use newer version)?

you mean update the server binary? I'm using the Debian standard package, which is currently on version:

Xvnc TigerVNC 1.11.0 - built 2022-01-26 17:59
Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12011000, The X.Org Foundation

from avnc.

gujjwal00 avatar gujjwal00 commented on June 2, 2024

you mean update the server binary?

Yes. I was testing TigerVNC 1.13 and it has improved key handling, even without raw key events.

I'm using the Debian standard package, which is currently on version:

That's why I was wondering if you could compile from source.

In any case, raw key events in AVNC still need a bit more polishing, and I will close this issue when it's ready.

from avnc.

gujjwal00 avatar gujjwal00 commented on June 2, 2024

v2.2.0 is now available with raw key event support.
And thank you @macdanger!

from avnc.

macdanger avatar macdanger commented on June 2, 2024

Hi, sorry to jump in here again, but it looks that the newer versions have a slightly different implementation of the raw keys. When using the 2.1.2 (debug) version from this thread, all is perfectly fine. When I use the news version, alt least the super keys don't work. Everything else seems to be the same. Shoult I open a new issue?

from avnc.

gujjwal00 avatar gujjwal00 commented on June 2, 2024

No problem, I will take a closer look later today.

Which specific version is not working correctly: v2.2.0 or v2.2.1

No need to open new issue, I will just reopen this one.

from avnc.

macdanger avatar macdanger commented on June 2, 2024

2.2.1 seems not to work with super keys
I did not try 2.2.0 though

from avnc.

gujjwal00 avatar gujjwal00 commented on June 2, 2024

After a bit of testing, it looks like Super should work correctly. My device intercepts Super key for Google app so I can't test it directly. But if map any other key to Super, it works as expected.

Please run the Key test in AVNC settings for Super keys, and paste event logs here.

from avnc.

macdanger avatar macdanger commented on June 2, 2024

Oh man, sorry, it looks like you are right. now after cleaning up and comparing my config from the 2.1.2 (debug) with the 2.2.1 release - it just works as expected. Strange. Sorry, I hope I didn't cause too much trouble for you checking :-)

from avnc.

gujjwal00 avatar gujjwal00 commented on June 2, 2024

No problem, this sort of thing has happened more than once to me too when testing AVNC with different configurations.

I did find a test which was not running, so that's a net positive.

from avnc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.